VGA Memory

Hi,
I tried to make a game using double buffering.
I declared a pointer to the VGA memory using the syntax :
char unsigned far * onscreen;
onscreen=(unsigned char *)MK_FP(0xa000,0);

this statement return a NULL pointer to onscreen. When I still try to execute the program, the system crashes. Any help????
Bi,
Ritesh Tonk

Comments

  • : Hi,
    : I tried to make a game using double buffering.
    : I declared a pointer to the VGA memory using the syntax :
    : char unsigned far * onscreen;
    : onscreen=(unsigned char *)MK_FP(0xa000,0);
    :
    : this statement return a NULL pointer to onscreen. When I still try to execute the program, the system crashes. Any help????
    : Bi,
    : Ritesh Tonk
    :
    looks like the problems with assigning the pointer somehow. Probably with the MK_FP macro ( whatever that is, make far pointer maybe?? ) Anyway, last time i messed with pointers to vga ram i used this..

    onscreen = ( unsigned char* )(0xa0000000);

    but that was back when snakes used to walk. Anyway, give that a go :)



  • : Hi,
    : I tried to make a game using double buffering.
    : I declared a pointer to the VGA memory using the syntax :
    : char unsigned far * onscreen;
    : onscreen=(unsigned char *)MK_FP(0xa000,0);
    :
    : this statement return a NULL pointer to onscreen. When I still try to execute the program, the system crashes. Any help????
    : Bi,
    : Ritesh Tonk
    :
    You must use this:
    onscreen=(unsigned char far*)0xa0000000L;
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories