Searching \ for '[PIC]: Binary Number Representations in mpasm' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/languages.htm?key=asm
Search entire site for: 'Binary Number Representations in mpasm'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Binary Number Representations in mpasm'
2001\04\07@140952 by Martin McCormick

flavicon
face
       Is there any syntax in mpasm that lets one represent a
numerical value as binary such as the 0b00000101 sort of thing
one can do in C?

       In the overall scheme of things, this is minor, but
sometimes it is handy to represent a number that way as a form of
documentation.

       Is there a good document anywhere that shows all the
different syntax standards that work in mpasm?  I looked at the
documentation that came with it and either missed it or it can
not be done.

       By the way, if you already saw part of this message, that
was an accident.

Martin McCormick

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\04\07@144524 by michael brown

flavicon
face
Unless I am missing the question, you can use   b'01000100' for a binary
version of hex '44' for example.  Decimal numbers can be entered as d'xxx'
where xxx is the decimal number.  For example               iorlw
b'10000000'   will turn on the first bit of whatever is currently loaded
into W.

Michael Brown
Instant Net Solutions
http://www.KillerPCs.net

{Original Message removed}

2001\04\07@144935 by myke predko

flavicon
face
Hi Martin,

Binary numbers are referenced in the B'########' format of MPASM.

For information like this, I click on MPLAB "Help" followed by "MPASM Help"
or "MPASM User's Guide" (Depending on the version of MPLAB you have, you can
have either header in the "Help" Pull Down).

There is also a pdf you can pull down and print out from the Microchip web
site.

myke
{Original Message removed}

2001\04\08@114028 by Olin Lathrop

face picon face
>         Is there any syntax in mpasm that lets one represent a
> numerical value as binary such as the 0b00000101 sort of thing
> one can do in C?

b'00000101'

>         Is there a good document anywhere that shows all the
> different syntax standards that work in mpasm?

Yes, the assembler manual.  Mine is probably a bit old, but in this version
it is documented in section 8.4, "Numeric Constants and Radix", page 91.
You can get the latest version as a PDF from the Microchip web site.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, spam_OUTolinTakeThisOuTspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...