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
This example is from the far memory section and the simulator reports an error when performing this code. FVAR (char, 0x015678) = 0x5A; i = FVAR (char, 0x015678); Also using unsigned char far large_array[0xC000]; still places the array in the xdata segment. When stepping through the simulator R3 contains 01 instead of 02 for far data. David
Make sure that you selected the LX51 linker and AX51 assembler when you select the device from the device database. Jon
They were selected. David
View all questions in Keil forum