How do I access a variable in bank 0 ?
If I look in my .m51 file I see my var ISP_VERSION:
CODE 754EH 001AH UNIT ?CO?ISP_VERSION
Now I try to access this var from a different image in a different bank using C code:
ispversion = 0x754E;
sprintf(SendString,"\r\nISP version %s",ispversion );
THIS DOES NOT WORK IT SEEMS!!!
This code is part of my main() function. I see in the .m51 file of this image:
CODE 011DH 0BCAH UNIT ?PR?MAIN?MAIN
But I do not really understand in which bank the main functionis located. I see in my .m51 file also (if relevant):
TYPE BASE LENGTH RELOCATION SEGMENT NAME ----------------------------------------------------- * * * * * * * D A T A M E M O R Y * * * * * * * REG 0000H 0008H ABSOLUTE "REG BANK 0" REG 0008H 0008H ABSOLUTE "REG BANK 1" REG 0010H 0008H ABSOLUTE "REG BANK 2"
I also tried this C code but it did not work as well:
unsigned char code *ispversion;
ispversion = (unsigned char code*)0x754E;
you see: I am not a banking expert (yet)!