Hi,
I'm trying to access memory directly at 0xb800 (text screen). I tried this:
char far* screen = (char far*)0xb8000000 ;
but apparently c++ compiler doesn't know "far" (says "syntax error
before *"). I've tried using __far, _far, FAR, _FAR, and __FAR, all with
the same result. So, then I tried this:
char* screen = (char*)0xb8000;
This compiles fine, but when I try to access it with screen[0]='a', it
gives me segmentation fault. Anyone knows what's wrong with it?
I'm using c++ v3.2.2 that came with my linux box.
Thanks
luph
I'm trying to access memory directly at 0xb800 (text screen). I tried this:
char far* screen = (char far*)0xb8000000 ;
but apparently c++ compiler doesn't know "far" (says "syntax error
before *"). I've tried using __far, _far, FAR, _FAR, and __FAR, all with
the same result. So, then I tried this:
char* screen = (char*)0xb8000;
This compiles fine, but when I try to access it with screen[0]='a', it
gives me segmentation fault. Anyone knows what's wrong with it?
I'm using c++ v3.2.2 that came with my linux box.
Thanks
luph
Comment