I have one question about accessing high byte of 2-byte idata variable.
Case 1: for xdata variable we can use below to access the higher byte:
#define ADDR *((_2BYTE xdata *) 0x0800) #define ADDRH *((_1BYTE xdata *) 0x0800) #define ADDRL *((_1BYTE xdata *) 0x0801)
If ADDRH is enough to make decision then we can just use ADDRH, instead of ADDR(2-byte)... This save code space...
Case 2: if ADDR is declared as "idata" then is there any way achieving the same goal like Case 1 ?
All we want to do is "save code base"...
Thanks in advance...
charvar = (shortvar << 8) generates no shifts
Erik
IS that always the case, or does it depend on optimisation level?
Is what i know.
However since it shows in the assembler from the compiler and Keil for some reason does what could be compilation optimization in the linker I guess it is even so at opt = 0.