I try to access a large data buffer using a far pointer that can exceed the 64k boundary, using the method introduced in http://www.keil.com/support/docs/2663.htm.
But when I made the declaration as follows and compiled the codes, an compiling error came up: SF1PROG.C(82): error C129: missing ';' before '*'
#include <absacc.h> unsigned char far *farBuff = FARRAY(unsigned char, 0x110000);
Can anyone help me out? Thank you so much.
A normal 8032 does not have any hardware for far addressing. How is the simulator supposed to know that you intend to have such? You'd need to either pick a device that has built-in extended addressing, or configure the simulator to know that you have such hardware, even though the device you picked does not.
Unfortunately, I'm not very familiar with running code under the simulator. (My 8051 projects involve a core embedded in a fairly complex ASIC, and it would take a very long time to write a simulator for the ASIC just so the 8051 code could be executed. Easier to run on a real target.)
See the far memory examples such as the one in
C:\Keil\C51\EXAMPLES\FarMemory\4MB Variables on Classic 8051
Thank you for your kind help. You noted that:
or configure the simulator to know that you have such hardware, even though the device you picked does not.
Would you please explain in detail how I can configure the simulator? Do I need to configure XBANKING.A51?
Thank you!