Mail Archives: djgpp/1998/01/10/18:26:07
At 08:53 1/10/1998 GMT, HackerOC3 wrote:
>I am using mode 13h, and the book I am using has examples to access the video
>buffer. This is what it says to do to fill the screen:
>
>#define SCREEN_WIDTH unsigned int
>#define SCREEN_HEIGHT
>
>unsigned char far *video_buffer =(char far *)0xA0000000L;
>
>void Fill_Screen(int value)
>{
>
>_fmemset(video_buffer,(char)value,SCREEN_WIDTH*SCREEN_HEIGHT+1);
>
>}
>
>dos.h, conio.h, stdio.h, are #included
>
>
>I always get parse errors. I don't know what to do, and I need to get this
>done fast. Please help!
This code was written for some other compiler, probably Borland. Also, as
someone else said, SCREEN_HEIGHT and SCREEN_WIDTH are misdefined. `far' does
not work for DJGPP; you will have to use farptr functions or the Fat DS hack
instead. Read FAQ sections 18.4 and 18.6, and the libc docs for `_far*' and
`movedata'.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -