C166 Assembler v4.20 doesn't accept following RB REGBANK R0-R15 PUBLIC RB It said : Error A39: Illegal PUBLIC/GLOBAL SYMBOL. Why it happend, the same is written in A166 User's guide p.74
Problem is that another module is written in C. There is interrupt procedure in it where I 'd like to call variable with name of register bank declared in first assembler module. How can I do that. Thanks in advance
Instead of using a Registerbank you may simply define 16 words in a normal section in the CLASS IDATA. Then you may define PUBLIC symbols within this section that can be referred in C. In assembly language it is easy to load the CP with the start-address of this section.
I created a section in IDATA class, located variables there with name of register bank for interrupt ?ID?INTERRUPTS SECTION DATA WORD 'IDATA' REGISTER_BANK DSW 16 ?ID?INTERRUPTS ENDS ?PR?INTERRUPTS SECTION CODE WORD 'NCODE' INT_PROC PROC INTERRUPT = int_no scxt CP,#REGISTER_BANK .... .... pop CP reti INT_PROC ENDP but assembler issued a warning A77: MISSING DPP information in line scxt CP,#REGISTER_BANK why? ,#REGISTER_BANK is immediate value
Sorry I forgot about #DATA16