We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello again, I convert an Ascii file (about 10kB size) to HEX using the BIN2HEX and declaring a file start segment of 4800 (...absolute address 0x48000). When starting debugging in simulation mode using uVision2, I load it to my target (load MYFILE.HEX). Using a far pointer I'm trying to read all the memory locations from 0x48000 to 0x4A400 but I get nil on the serial window. I check the memory using the command "Display" and MYFILE is loaded in address 0x40000 (not 0x48000) and even when I redirect the pointer's offset to 0x40000 I still get nothing.
unsigned int i; char far *pointer; pointer=0x48000; for (i=0x0; i<0x2400; i++) { putchar(*(pointer+i)); }
. . FDATA (0x40000-0x4FFFF), FDATA0 (0x40000-0x4FFFF), HDATA (0x40000-0x4FFFF), HDATA0 (0x40000-0x4FFFF), XDATA (0x40000-0x4FFFF), XDATA0 (0x40000-0x4FFFF)) DPPUSE (0=NDATA(0x40000 - 0x47FFF), 2=NCONST(0x0 - 0x3FFF)) CINITTAB (0x10000-0x3FFFF)
You might try using a huge pointer. Look at an assembly listing to see if the address being computed is using pag or seg address. It could be that adding i to a page address doesn't handle crossing page address boundaries.