Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to access ISA device which be mapped memory address 0xF00000~0xF80000?

Status
Not open for further replies.

weitso

Programmer
Oct 10, 2012
2
TW
hi~

We have a ODM x86 PC board which has a on-board NVRAM. (NVRAM can store data even power-off)
The NVRAM is designed as a ISA device. and map to memory address 0xF00000~0xF80000 (For ISA device)
We have test the hardware in MS-windows using utility "rw-everything" (some kind of debug tool)
Now, I want write a C program to do some NVRAM R/W test and run the program in DOS
But as I known, a program cannot access memory address 0xF00000~0xF80000 directly
for example. the following code cannot work.
int *pAddr = (int *)(0xF00000);
printf( "memory: %d", *pAddr );

do anyone know how to do? or has some kind library can access special system memory?

Thanks.

 
Which MS windows OS are you using? Win 95/98/ME or Win NT/2K/XP/Vista/7? They way you access memory is different depending on which one you are using.
 
Hi ~
First of all,thanks for your reply.

l use MS DOS 6.22 .
Do you have any idea?

Thanks
 
Sorry, didn't check that you replied. Which compiler are you using?

If you are using a 16 bit compiler, then the addressing is slightly different.

1) You have to make sure you are using the large model. The small model only has an addressing range of 64K.
2) Check the addressing: 0XF0000 to 0xF8000 is F000:0 to F000:8000. Check if your compiler has a format for segmented addressing. The alternative is to do something like
Code:
unsigned int far * pAddr = 0xF0000000;
printf ("%04x\n", *pAddr);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top