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 types

I've tried to mod the xbanking link file to generate paging for my device.

I was trying to use segment B which is defined between 8000-BFFF. Then page into this to give 128k.

I have set the HData to 0000-1FFFF in the options for far data.

Here are the mods i made.

LOAD_BANK MACRO
LOCAL lab
MOV DPL,R1
MOV DPH,R2
ORL DPH,#80H
;Now generate the page
MOV A,R2
RL A
RL A
ANL A,#03H
MOV ?C?XPAGE1SFR,A

Then used one of the examples from banking and tried this.

FVAR (char, 0x15678) = 0x5A;
i = FVAR (char, 0x15678);

i comes out to be 1. Stepping through the assembly code looks fine.

Is this correct usage?

David

Parents
  • The far types are between 02.7F so if i define the data to be of type far wouldn't it then call these routines and pass this in via R3?

    Just because the ram is xdata does that matter?

    Also the example project, ADuC812 which is supposed to show the usage of far types actually doesn't work. The simulator generates an access violation on the far memory calls. HData is set to the ranges you talk about it.
    I haven't change this example but was hoping to use it as a guide.

    David

Reply
  • The far types are between 02.7F so if i define the data to be of type far wouldn't it then call these routines and pass this in via R3?

    Just because the ram is xdata does that matter?

    Also the example project, ADuC812 which is supposed to show the usage of far types actually doesn't work. The simulator generates an access violation on the far memory calls. HData is set to the ranges you talk about it.
    I haven't change this example but was hoping to use it as a guide.

    David

Children
No data