We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have an interrupt service routine written in assembly that I am using register set 1 to pass data back and forth to the main program. In my main program I have: BYTE AudioTemp0 _at_ 0x08; // R0 BYTE AudioTemp1 _at_ 0x09; // R1 BYTE AudioRXLo _at_ 0x0a; // R2 BYTE AudioRXHi _at_ 0x0b; // R3 BYTE AudioTXLo _at_ 0x0c; // R4 BYTE AudioTXHi _at_ 0x0d; // R5 BYTE ClockLow _at_ 0x0e; // R6 BYTE Clock10ms _at_ 0x0f; // R7 And in the interrupt service routine I have: Timer2IntSegment SEGMENT CODE RSEG Timer2IntSegment USING 1 I just use the variables directly as R0-R7 for speed reasons. But when I compile I get: *** WARNING L4: DATA SPACE MEMORY OVERLAP FROM: 0008H TO: 0008H *** WARNING L4: DATA SPACE MEMORY OVERLAP FROM: 0009H TO: 000FH *** WARNING L4: DATA SPACE MEMORY OVERLAP FROM: 000AH TO: 000FH *** WARNING L4: DATA SPACE MEMORY OVERLAP FROM: 000BH TO: 000FH *** WARNING L4: DATA SPACE MEMORY OVERLAP FROM: 000CH TO: 000FH *** WARNING L4: DATA SPACE MEMORY OVERLAP FROM: 000DH TO: 000FH *** WARNING L4: DATA SPACE MEMORY OVERLAP FROM: 000EH TO: 000FH How can I tell the linker that this is OK? Do I somehow use an Extern to tell the assembly code that this is OK?
RSEG Timer2IntSegment USING 1 ; - this derective does not switch register bank! It reserve memory for registers. BYTE AudioTemp0 _at_ 0x08; // R0 - reserve the same memory... just remove line "USING 1" from program PUSH PSW MOV PSW,#08H ........... POP PSW - something about this can be used to swicth register bank.