Put each asm line in it's own __asm __endasm block.
See sdccman, chapter 3.19. PRAGMAS, comment on pragma preproc_asm.
Borut
Paul wrote:
> I am having trouble with defining a series of asm's in a define
> statement. In particular how to insert newlines without breaking the
> define. SDCC seems to behave differently than other compilers. eg
>
> #define portSAVE_CONTEXT( ucForcedInterruptFlags )
> \
> {
> \
> __asm
> \
> /* Save the status and WREG registers first, as these will get
> modified \
> by the operations below. */
> \
> MOVFF WREG, PREINC1
> \
> __endasm; \
> __asm \
> MOVFF STATUS, PREINC1
> \
> /* Save the INTCON register with the appropriate bits forced
> if \
> necessary - as described above. */
> \
> MOVFF INTCON, WREG
> \
> IORLW ucForcedInterruptFlags
> \
> MOVFF WREG, PREINC1
> \
> __endasm;
> \
> ...
>
> Compiles to assembler as:
> ; ; *** genInline 6286
> MOVFF WREG, PREINC1 MOVFF STATUS, PREINC1 MOVFF INTCON, WREG IORLW
> 0x80 MOVFF WREG, PREINC1
>
>
> How do you create newlines in a defined bit of asm
>
> Thanks,
>
> Paul Neelands
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Sdcc-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user