Mail Archives: djgpp/1992/08/04/23:34:10
It is supposed to be possible to access memory devices by simply doing:
unsigned char *fb_mem, *fb_ptr;
/* frame buffer memory at 0xA00000 size 0x80000*/
fb_ptr = fb_mem = (unsigned char *)(0xE0000000 + 0xA00000)
/* clear screen */
for(i = 0; i < 0x80000; i++, fp_ptr++)
*fp_ptr = 0xff;
fb_ptr = fb_mem;
for(i = 0; i < 0x80000; i++, fp_ptr++)
assert(*fp_ptr == 0xff);
Is this correct? (It doesn't work for me...)
I get segmentation faults at 0x800000ae when I do this.
Has anyone managed to get something like this to work? (Above 1MB, I have it
working myself for memory between 640kB and 1MB.)
The pc has:
* 486/25 DX cpu
* Opti 82C482 memory controller w. 128kB cache
* 4MB of ram
* Dos 5 with himem.sys
* No high memory loading etc
Jonas Olsson
- Raw text -