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 am a newbie user to A51. Can anyone suggest a way to resolve the reported "OVERLAP" conflict caused by the source code listed below which uses Absolute addresses 0x00 - 0x07 that are obviously shared (pre assigned by A51) in Register Bank 0?
In the Timer 0 Interupt, I use the registers (R0-R7) after switching the Register Bank to 0. In the rest of the program, I use the Labels to directly access the memory locations (ie MOV SWTPNTR,#80H ).
The only way I can think to do it is to remove the Labels (and therefore the EQU statements) and have to switch back and forth from Reg Bank to Reg Bank every time I wish to MOV data to the absolute locations. Which would use a lot of excess coding.
Can anyone suggest another way to preserve the absolute labeling for DIRECT addressing them?
BTW, I am using all 4 Reg Banks the same way. The conflict is only reported for addresses 0x00 - 0x07. And this issue has never appeared when using other MCS-51 assemblers.
Thanks.
DSEG ; INDICATE INTERNAL DATA MEMORY SPACE ; ; *** REGISTER BANK 0 *** ; USED BY TIMER 0 ; EQU 00H ; R0 LAMP TABLE POINTER SWTPNTR EQU 01H ; R1 SWTABLE POINTER STROBE EQU 02H ; R2 CURRENT STROBE ; EQU 03H ; R3 COUNTER EQU 04H ; R4 PWVALUE EQU 05H ; R5 DESIRED LAMP INTESITY 00=OFF ; EQU 06H ; R6 ; EQU 07H ; R7 ; *** REGISTER BANK 1 *** ; USED BY TIMER 1
Found the solution: A51 DIRECTIVE: $NOREGISTERBANK Releases the memory reserved for registers.