Searching \ for '[PIC]: MPASM and MESSG with assembler symbol' 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: 'MPASM and MESSG with assembler symbol'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: MPASM and MESSG with assembler symbol'
2000\11\02@150352 by Tom Crane

flavicon
face
Dear All,
       I want to do something like the following in MPASM,

-----------------------------------------------------------------
; Some assembler code follows
MY_SYMBOL       equ     .42

       MESSG   "Assembled with MY_SYMBOL=", MY_SYMBOL

       movlw   MY_SYMBOL
       ..... < more code follows >
       END
-----------------------------------------------------------------

and have something like the following appear in the .err / .lst file

MESSAGE: (Assembled with MY_SYMBOL=42)

The MESSG directive requires a text string argument and I cannot see
any MPASM commands for evaluating an assembler symbol to a text string.
Any ideas?

Thanks
Tom.

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu




2000\11\02@152932 by Bob Ammerman

picon face
In a macro:

#v(nn)

evaluates to the text equivalent of nn.

Don't know if this will do what you want.

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Original Message removed}

2000\11\02@162531 by Olin Lathrop

flavicon
face
> In a macro:
>
>  #v(nn)
>
> evaluates to the text equivalent of nn.

This works outside macros too.  And yes, it can be used in MESSG directives:

n  equ  27
  messg  The magic value is #v(n).

Produces a message with the #v(n) replaced by "27".


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, .....olinKILLspamspam@spam@cognivis.com, http://www.cognivis.com

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu




2000\11\03@131304 by Tom Crane

flavicon
face
> This works outside macros too.  And yes, it can be used in MESSG directives:
>
> n  equ  27
>    messg  The magic value is #v(n).
>
> Produces a message with the #v(n) replaced by "27".

That does exactly what I was after.
Thanks
Tom.

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




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