View previous topic :: View next topic |
Author |
Message |
boro Guest
|
CCS asm macro |
Posted: Wed Apr 06, 2005 11:00 pm |
|
|
Hi all
Please help ? I have asm program and want use it in CCS program.
Asm code have macro definitions as:
JNB macro FADDR,NBIT,ADDR
BTFSS FADDR,NBIT
GOTO ADDR
endm
CCS assembler failure to understand this macro.
I try to predefine :
#define JNB(FADDR,NBIT,ADDR) {#asm
BTFSS FADDR,NBIT
GOTO ADDR
#endasm
}
but not work.
How predefine macro for work with CCS?
Thank you in advance. |
|
|
Ttelmah Guest
|
|
Posted: Thu Apr 07, 2005 2:18 am |
|
|
Key thing. If you have line breaks in a #define, they must be 'escaped', with a '\' character, or the define will end at the line break. In your example, your #define, will actually be translated as:
#define JNB(FADDR,NBIT,ADDR) {#asm
Which is not what you want!.
Add the '\' to the end of each line except the last, and see if it works.
Best Wishes |
|
|
boro Guest
|
SSC asm macro |
Posted: Thu Apr 07, 2005 5:30 am |
|
|
ALL RIGHT!
Thank you Ttelmah! |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|