Mail Archives: djgpp/1992/12/03/20:57:30
I have a memory mapped board at d000:0000 in my machine. The first
four bytes contain 0b 01 22 22.
I wrote and compiled the following program under djgpp 1.09:
#include <stdio.h>
main(int argc, char *argv[]) {
unsigned long *a = (unsigned long *) 0xf00f0000L;
printf("0x%08x\n",*a);
}
When run, it correctly displays the first four bytes of my AMI BIOS.
However, when I change where a points to to:
unsigned long *a = (unsigned long *) 0xf00d0000L;
which should be the beginning of my card at d000:0000 and run the program
I get:
Exception 13 (0xd) at eip:108d
at the instruction that is actually attempting to do the access
to 0xf00d0000.
If I run under debug32, I can issue the command 'm 0xf00d0000' before
or after the exception, and it correctly displays the bytes from the
memory at d000:0000.
So where did I mess up?
I'm running on an Intel 486/33 with 8MBs Ram.
brian AT apt DOT bungi DOT com
- Raw text -