CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

CCS asm macro

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
boro
Guest







CCS asm macro
PostPosted: Wed Apr 06, 2005 11:00 pm     Reply with quote

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







PostPosted: Thu Apr 07, 2005 2:18 am     Reply with quote

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
PostPosted: Thu Apr 07, 2005 5:30 am     Reply with quote

ALL RIGHT!

Thank you Ttelmah! Very Happy
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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