On Nov 20, 2010, at 1:35 PM, Peter Bigot wrote:
> You could probably avoid the assembler file with a simple:
> 
> uint8_t USBMEM[2048] asm("0x1c00");


I have a couple more (possibly dumb?) questions about this:

First, how does emitting a constant value with the asm() directive result in 
assigning the specified address as the variable's location? It's not clear to 
me how this actually functions, given the documentation I've seen for the asm() 
directive so far at http://mspgcc.sourceforge.net/manual/c1308.html

Second, is there a means to use a preprocessor symbol to specify the address in 
one of these directives? Some of the location pragmas in the code that I'm 
porting use hex constants, while others use preprocessor symbols that are 
pulled from one of the header files. I'd prefer to avoid needing to hard-code 
the corresponding addresses in the C code file(s) if possible. It appears that 
I need to enclose the arguments to the asm() directives in quotes, but that 
keeps the preprocessor symbols from being evaluated.


-- 
Mark J. Blair, NF6X <n...@nf6x.net>
Web page: http://www.nf6x.net/
GnuPG public key available from my web page.





------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to