Hi, I verify that SDCC can't compile macros if it have more than one assembly line wrapped by _asm/_endasm.
In example:
#define SAVE_TASK_CTX(stack_low, stack_high) \
{ \
/* Disable global interrupt. */ \
_asm \
bcf INTCON, 6, 0 \
movff STATUS, PREINC1 \
movff WREG, PREINC1 \
_endasm \
/* Store the necessary registers to the stack. */ \
...
}
One work around is wrap each line by _asm and _endasm:
#define SAVE_TASK_CTX(stack_low, stack_high) \
{ \
/* Disable global interrupt. */ \
_asm \
bcf INTCON, 6, 0 \
_endasm; \
_asm \
movff STATUS, PREINC1 \
_endasm; \
_asm \
movff WREG, PREINC1 \
_endasm; \
/* Store the necessary registers to the stack. */ \
...
}
Cheers,
Alan
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user
