Hi,
the pdata keyword is accepted but does not work
in two respects:
pdata volatile char u,v;
main()
{
u=1;
v=2;
}
results (with linker warnings) in:
144 ;pdata.c:5: u=1;
145 ; genAssign
0038 90 00 00 146 mov dptr,#_u
003B 74 01 147 mov a,#0x01
003D F0 148 movx @dptr,a
149 ;pdata.c:6: v=2;
150 ; genAssign
003E 90 00 00 151 mov dptr,#_v
0041 74 02 152 mov a,#0x02
0043 F0 153 movx @dptr,a
- Both variables are located at 0x0000.
- The pdata addressing mode is not used.
With correct pdata addressing it would be something like:
mov r0,#_u
mov a,#0x01
movx @r0,a
mov r0,#_v
mov a,#0x02
movx @r0,a
A quick and dirty solution would be to treat
pdata variables as if they were declared xdata?
Regards,
Frieder
Logged In: YES
user_id=888171
Fixed in SDCC 2.4.6