home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boldly Go Collection
/
version40.iso
/
TS
/
17A
/
DRWIN101.ZIP
/
SCRUTIL.H
< prev
next >
Wrap
C/C++ Source or Header
|
1991-07-23
|
3KB
|
66 lines
#ifndef __SCRUTIL_H
#define __SCRUTIL_H
#ifndef BYTE
#define BYTE unsigned char
#endif
#ifndef WORD
#define WORD unsigned int
#endif
#ifndef LWORD
#define LWORD unsigned long int
#endif
#define SCRSEG_MONO 0xB0000000UL /*monochrome video RAM*/
#define SCRSEG_COLOR 0xB8000000UL /*color video RAM*/
#define SCRMOD 0x00400049UL /*pointer to video mode byte in RAM*/
#define SCRCOLUMN 0x0040004AUL /*pointer to number of columns word*/
#define SCRPAGSIZ 0x0040004CUL /*pointer to page size word in RAM*/
#define SCRPAGOFF 0x0040004EUL /*pointer to current page offset word*/
#define SCRPAGCUR 0x00400050UL /*pointer to 8 page cursor words*/
#define SCRCURSIZ 0x00400060UL /*pointer to cursor size word in RAM*/
#define SCRPAG 0x00400062UL /*pointer to current page number*/
#define SCREGAROWS 0x00400084UL /*pointer to EGA (rows-1) byte*/
enum SCREEN_MODES { /*video modes for setscrmod*/
TEXT_40_25_BW =0x0000, /*25 rows, 40 columns, b/w text*/
TEXT_40_25 =0x0001, /*same, but color*/
TEXT_80_25_BW =0x0002, /*25 rows, 80 columns, b/w text*/
TEXT_80_25 =0x0003, /*same, but color*/
GRAP_320_200_4 =0x0004, /*graphics, 320x200, 4 color*/
GRAP_320_200_4_BW =0x0005, /*same, grey-scale*/
GRAP_640_200_2 =0x0006, /*2-color (BW)*/
MONO_80_25 =0x0007, /*monochrome text*/
GRAP_160_200_16 =0x0008, /*back to graphics modes*/
GRAP_320_200_16 =0x0009,
GRAP_640_200_4 =0x000A,
TEXT_80_HI =0x1112 /*either 50 (VGA) or 43 (EGA) rows*/
}; /*screen video modes*/
int ptrcmp(void far *p,void far *q); /*compares two pointers*/
void memcpynf(void near *n,void far *f,WORD k); /*copies to near from far*/
void memcpyfn(void far *f,void near *n,WORD k); /*copies to far from near*/
void memcpyi(void* dpp,void* spp,WORD n); /*interruptables...*/
void memcpyfni(void far* dpp,void near* spp,WORD n);
void memcpynfi(void near* dpp,void far* spp,WORD n);
WORD getcrow(void); /*get cursor row on screen*/
WORD getccol(void); /*get cursor col on screen*/
void setcpos(WORD row,WORD col); /*set cursor row, column on screen*/
WORD getcsiz(void); /*get cursor size (start/stop lines)*/
void setcsiz(WORD siz); /*set cursor size*/
WORD getsmod(void); /*get screen video mode*/
void setsmod(WORD mod); /*set screen video mode*/
WORD getsrows(void); /*get number of text rows available*/
WORD getscols(void); /*get number of text columns*/
WORD getsrowscols(void); /*get rows in LSB, columns in MSB*/
WORD far *setscrseg(void); /*sets scrseg to point to video RAM*/
extern WORD far *scrseg; /*pointer to video RAM*/
#endif