home *** CD-ROM | disk | FTP | other *** search
-
- /*
- *
- * GDS101 : 初期化
- *
- */
-
- #include <stdio.h>
- #include <dos.h>
-
- unsigned char *GDS_init(unsigned int size) {
- union REGS inregs, outregs;
- struct SREGS segregs;
- unsigned char *wp;
-
- if((wp=(unsigned char *)malloc(size))==NULL)
- return NULL;
- segread(&segregs);
- inregs.x.ax=0x8000;
- int86x(0x92,&inregs,&outregs,&segregs);
- inregs.x.ax=0xF901;
- int86x(0x92,&inregs,&outregs,&segregs);
- inregs.x.ax=0xFA00;
- int86x(0x92,&inregs,&outregs,&segregs);
- *(unsigned int *)wp=0;
- return wp;
- }