2004-05-12 01:48 AM
2004-05-07 06:21 AM
Hi an assembler question.
How do I set a constant so that it can be used in all my asm files In my main.asm file I have #define timeint 10 which works fine when the sub that uses timeint is in my main.asm file I want to create another file called inputs.asm which will have a sub within that will need to use timeint. apart from adding #define timeint 10 to every asm file is there a common file. Tried adding it in my include file but not sure of the Syntax. I am sure there must be a way. Regards Brian2004-05-12 12:40 AM
Brian,
The simplest way is to use a header file (myheader.inc) eg. in your header file #define timeint 10 ; note the space before start of line making sure to include this header wherever needed #include ''myheader.inc'' ld A, #timeout Hope this helps Regards sjo2004-05-12 01:48 AM
Thanks,
I knew it would be simple, but I could not find it documented Re Brian