From: Zafi R. <zr...@gm...> - 2011-08-29 23:40:45
|
How about: #define SOMEASMHERE __asm\ ASM INSTRUCTION; \ OTHER ONE; \ ETC; \ __endasm; Regards, Zafi. On Tue, Aug 30, 2011 at 12:51 AM, Mario <mar...@gm...> wrote: > Hello, its me ...once again. > > I have tried to do the following. > > #define SOMEASMHERE __asm\ > ASM INSTRUCTION\ > OTHER ONE\ > ETC\ > __endasm; > > where “ASM INSTRUCTION”, “OTHER ONE”, “ETC”, are ...assembler instructions. > SDCC does not complain at all but I get error code 256. from gpasm. > > The strange part, is that it will work with a single asm instruction > inside, for example. > > #define SOMEASMHERE __asm\ > ASM INSTRUCTION\ > __endasm; > > Works as expected, but... if I do.- > > #define SOMEASMHERE __asm\ > ASM INSTRUCTION\ > OTHER ONE\ > __endasm; > > Only “ASM INSTRUCTION” will be included and the second one wont, as if > I have never entered it. > If I try with three or more, the error code 256 from gpasm happens. > > However I have found a workaround for this bug: > > #define SOMEASMHERE __asm ASM INSTRUCTION __endasm;/ > __asm OTHER ONE __endasm;/ > __asm ETC __endasm; > > which works alright for this. > Greetings. > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even better > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > Sdcc-user mailing list > Sdc...@li... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > |