Re: Passing an address to a #define in C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



GusSabina <gussabina@xxxxxxxxx> writes:

> I need to put an specific machine code in any part of the memory. This code
> is for some hardware module that can understand it. Of course, gcc will not
> understand it, so I need to use .word 0xfc to create that code.
> Now, I would like to create a pseudo assembler for my module, in following
> way:
>
> #define       LOAD         asm(".word 0xFC \n\t");
> #define       INSTRUCTION2   asm(.word  0x4b \n\t");
> #define       GOTO(label)         asm(".word " #label " \n\t");

That last has to be "asm goto", q.v.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux