Mail Archives: djgpp/1995/09/01/16:16:32
>
>I don't do any of that, for both 1.6 and 2.0 I've used:
>char * screen
>
>screen=(char*)0xa0000;
>
>screen[x+y*320]=somecolor;
>
>As long as I set stuff up with a INT 10 call it works fine, no need
>to muck with this near/far pointer crapola. *bleh* This is GCC after all,
>not DOS. :)
How do you get this to work? Every time I try to do this I get a GPF!
Here is the code for the simple test program I use (It doesn't work), am I
doing something wrong?
BEGIN------------------------------------------------------------------------
#include <stdlib.h>
#include <stdio.h>
#include <strings.h>
#include <conio.h>
char *vram = (char *) 0xa0000;
void main(void) {
unsigned int index,dummy;
char clrfld[64000];
for (index=0;index<64000;index++)
clrfld[index] = 1;
dummy = getch();
__asm(" movl $0x0013, %ax
int $0x10 ");
strcpy(vram,clrfld);
dummy = getch();
}
END-------------------------------------------------------------------------
Should I use INT86() rather than __asm()?
- Raw text -