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

far memory

Hi All,

I wrote the follwing:

char far *fp;

fp = (long) 0x1e00a5;
*fp = 0x89;
tmp = *fp;

expecting to see value 0x89 at far address 0x1e00a5.

on the debugger >D X:0x1e00a5 results 0.

The assembler :
; fp = (long) 0x1e00a5; ; SOURCE LINE # 20 MOV R3,#01EH MOV R2,A MOV R1,#0A5H
;---- Variable 'fp?045' assigned to Register 'R1/R2/R3' ----
; *fp = 0x89; ; SOURCE LINE # 21 MOV A,#089H LCALL ?C?CSTPTR
I expected CSTXPTR with long DPTR MOVX instead I got:

CSTPTR with MOVC
What I’m doing wrong ??

0