This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is this an BUG?

unsigned char far ff1 _at_ 0x010001;
unsigned char far ff2 _at_ 0x020001;
unsigned char far ff3 _at_ 0x030001;

void main ()
{ ff1 = 0x20;
ff2 = 0x30;
ff3 = 0x40;
}
Code Optimization: level 8
when compiled->linked generate code below:

6: void main ()
7: { ff1 = 0x20;
0x800019 7420 MOV A,#0x20
0x80001B 7B01 MOV R3,#ff2(0x01)
0x80001D 7A00 MOV R2,#0x00
0x80001F 7901 MOV R1,#ff2(0x01)
0x800021 A558 EMOV @PR0+0,A
8: ff2 = 0x30;
0x800023 7430 MOV A,#0x30
0x800025 A558 EMOV @PR0+0,A
9: ff3 = 0x40;
0x800027 7440 MOV A,#0x40
0x800029 A558 EMOV @PR0+0,A
10: }
0x80002B A522 ERET

the result is
ff1:0x40
ff2:0x00
ff3:0x00
Is this an BUG?

0