home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FreeWare Collection 2
/
FreeSoftwareCollection2pd199x-jp.img
/
ms_dos
/
fmgraph
/
g_chrhnd.c
< prev
next >
Wrap
Text File
|
1990-06-14
|
634b
|
35 lines
#include <stdio.h>
#include <dos.h>
struct CHARHANDL {
unsigned type;
unsigned char mode,reserve;
};
extern unsigned char gds_fshift;
extern unsigned gds_wrkoff;
extern unsigned gds_wrkseg;
int g_charhandling(unsigned char mode)
{
union REGS reg;
struct SREGS seg;
struct {
unsigned len;
struct CHARHANDL chr;
} gdata;
segread(&seg);
reg.h.ah=gds_fshift+0x0f;
reg.x.di=(unsigned)&gdata;
seg.ds=seg.ss;
gdata.len=4;
gdata.chr.type=0x5162;
gdata.chr.mode=mode;
gdata.chr.reserve=0;
reg.x.bx=gds_wrkoff;
seg.es=gds_wrkseg;
int86x(0x92,®,®,&seg);
return (int)reg.h.ah;
}