Category : Assembly Language Source Code
Archive   : C--C0200.ZIP
Filename : VGA.H--

 
Output of file : VGA.H-- contained in archive : C--C0200.ZIP

/*
SPHINX Programming (C) 1993.
TITLE: VGA.H--
DESCRIPTION: This file contains a collection of procedures for writing
to VGA mode 19 (320x200, 256 colour) screens.
LAST UPDATED: 26 Dec 1993
PROCEDURES DEFINED IN THIS FILE:
: void ANDPIXEL19( ,x,byte colour,y)
: void _ANDPIXEL19( ,x,byte colour,y)
: void bar19(x,y,xsize,ysize,byte colour)
: void _bar19(x,y,xsize,ysize,byte colour)
: void BLANKVGA()
: void box19(x,y,xsize,ysize,byte colour)
: void _box19(x,y,xsize,ysize,byte colour)
: void CLEARSCREEN19()
: void _CLEARSCREEN19()
: void FILLSCREEN19(byte colour)
: void _FILLSCREEN19(byte colour)
: void getimage19(x,y,xsize,ysize,bufseg,bufoff)
: byte getpixel19(x,y)
: byte _getpixel19(x,y)
: byte GETPIXEL19( ,x, ,y)
: byte _GETPIXEL19( ,x, ,y)
: void line19(x1,y1,x2,y2,byte colour)
: void _line19(x1,y1,x2,y2,byte colour)
: void negpixel19(x,y)
: void _negpixel19(x,y)
: void NEGPIXEL19( ,x, ,y)
: void _NEGPIXEL19( ,x, ,y)
: void notbar19(x,y,xsize,ysize)
: void _notbar19(x,y,xsize,ysize)
: void notbox19(x,y,xsize,ysize)
: void _notbox19(x,y,xsize,ysize)
: void notpixel19(x,y)
: void _notpixel19(x,y)
: void NOTPIXEL19( ,x, ,y)
: void _NOTPIXEL19( ,x, ,y)
: void ORPIXEL19( ,x,byte colour,y)
: void _ORPIXEL19( ,x,byte colour,y)
: void overimage19(x,y,imageloc,byte clearcolour)
: void _overimage19(x,y,imageloc,byte clearcolour)
: void putimage19(x,y,imageloc)
: void _putimage19(x,y,imageloc)
: void putpixel19(x,y,byte color)
: void _putpixel19(x,y,byte color)
: void PUTPIXEL19( ,x,byte colour,y)
: void _PUTPIXEL19( ,x,byte colour,y)
: void putresized19(x,y,newxsize,newysize,imageloc)
: void _putresized19(x,y,newxsize,newysize,imageloc)
: void SETVGAPALETTE( ,first,numbertoset,buffer);
: void trans19(x,y,xsize,ysize)
: void _trans19(x,y,xsize,ysize)
: void UNBLANKVGA()
: void XLINE19(xloc,yloc,length,byte colour)
: void _XLINE19(xloc,yloc,length,byte colour)
: void xorbar19(x,y,xsize,ysize,byte colour)
: void _xorbar19(x,y,xsize,ysize,byte colour)
: void xorbox19(x,y,xsize,ysize,byte colour)
: void _xorbox19(x,y,xsize,ysize,byte colour)
: void xorimage19(x,y,imageloc)
: void _xorimage19(x,y,imageloc)
: void xorline19(x1,y1,x2,y2,byte colour)
: void _xorline19(x1,y1,x2,y2,byte colour)
: void xorpixel19(x,y,byte color)
: void _xorpixel19(x,y,byte color)
: void XORPIXEL19( ,x,byte colour,y)
: void _XORPIXEL19( ,x,byte colour,y)
: void xorxline19(x,y,length,byte colour)
: void _xorxline19(x,y,length,byte colour)
: void xoryline19(x,y,length,byte colour)
: void _xoryline19(x,y,length,byte colour)
: void YLINE19(xloc,yloc,length,byte colour)
: void _YLINE19(xloc,yloc,length,byte colour)
*/


: void CLEARSCREEN19 ()
{DI = 0;
CX = 64000/2;
ES = 0xA000;
AX = 0;
$ REPZ
$ STOSW
}


: void _CLEARSCREEN19 ()
{DI = 0;
CX = 64000/2;
AX = 0;
$ REPZ
$ STOSW
}


: void FILLSCREEN19 () // AL = colour to fill screen
{DI = 0;
CX = 0xA000;
ES = CX;
CX = 64000/2;
AH = AL;
$ REPZ
$ STOSW
}


: void _FILLSCREEN19 () // AL = colour to fill screen
{DI = 0;
CX = 64000/2;
AH = AL;
$ REPZ
$ STOSW
}


: void putpixel19 (word x,y; byte color)
{
ES = 0xA000;
AX = 320*y + x;
BX = AX;
ESBYTE[BX] = color;
}


: void _putpixel19 (word x,y; byte color)
{
AX = 320*y + x;
BX = AX;
ESBYTE[BX] = color;
}


: void xorpixel19 (word x,y; byte color)
{
ES = 0xA000;
AX = 320*y + x;
BX = AX;
ESBYTE[BX] ^= color;
}


: void _xorpixel19 (word x,y; byte color)
{
AX = 320*y + x;

BX = AX;
ESBYTE[BX] ^= color;
}


: void negpixel19 (word x,y)
{
ES = 0xA000;
AX = 320*y + x;
BX = AX;
-ESBYTE[BX];
}


: void _negpixel19 (word x,y)
{
AX = 320*y + x;
BX = AX;
-ESBYTE[BX];
}


: void notpixel19 (word x,y)
{
ES = 0xA000;
AX = 320*y + x;
BX = AX;
!ESBYTE[BX];
}


: void _notpixel19 (word x,y)
{
AX = 320*y + x;
BX = AX;
!ESBYTE[BX];
}


: byte getpixel19 (word x,y)
{
ES = 0xA000;
AX = 320*y + x;
BX = AX;
return(ESBYTE[BX]);
}


: byte _getpixel19 (word x,y)
{
AX = 320*y + x;
BX = AX;
return(ESBYTE[BX]);
}


: void putresized19 (word x,y,newxsize,newysize,imageloc)
word xsize,ysize;
{
ES = 0xA000;
BX = imageloc;
xsize = DSWORD[BX];
ysize = DSWORD[BX+2];
imageloc += 4;
AX = y*320 + x;
SI = AX;
y = 0;
do {
CX = 1;
DI = SI;
do {
CX--;
AX = CX*xsize;
$ DIV newxsize
BX = AX;
AX = y*ysize;
$ DIV newysize
AX = AX*xsize + BX + imageloc;
BX = AX;
ESBYTE[DI] = DSBYTE[BX];
DI++;
CX++;
CX++;
} while( CX < newxsize );
SI += 320;
y++;
} while( y < newysize );
}


: void _putresized19 (word x,y,newxsize,newysize,imageloc)
word xsize,ysize;
{
BX = imageloc;
xsize = DSWORD[BX];
ysize = DSWORD[BX+2];
imageloc += 4;
AX = y*320 + x;
SI = AX;
y = 0;
do {
CX = 1;
DI = SI;
do {
CX--;
AX = CX*xsize;
$ DIV newxsize
BX = AX;
AX = y*ysize;
$ DIV newysize
AX = AX*xsize + BX + imageloc;
BX = AX;
ESBYTE[DI] = DSBYTE[BX];
DI++;
CX++;
CX++;
} while( CX < newxsize );
SI += 320;
y++;
} while( y < newysize );
}


: void xorxline19 (word x,y,length; byte colour)
/* XOR Draw a horizontal line starting at (x,y) going right 'length' number
of pixels in the colour given.
*/
{ES = 0xA000;
AX = 320 * y + x;
BX = AX;
AL = colour;
CX = length;
do {ESBYTE[BX] ^= AL;
BX++;
} while( BX < CX );
}


: void _xorxline19 (word x,y,length; byte colour)
/* XOR Draw a horizontal line starting at (x,y) going right 'length' number
of pixels in the colour given.
*/
{AX = 320 * y + x;
BX = AX;
AL = colour;
CX = length;
do {ESBYTE[BX] ^= AL;
BX++;
} while( BX < CX );
}


: void xoryline19 (word x,y,length; byte colour)
/* XOR Draw a vertical line starting at (x,y) going down 'length' number
of pixels in the colour given.
*/
{ES = 0xA000;
AX = 320 * y + x;
BX = AX;
AL = colour;
CX = length;
loop(CX)
{ESBYTE[BX] ^= AL;
BX += 320;
}
}


: void _xoryline19 (word x,y,length; byte colour)
/* XOR Draw a vertical line starting at (x,y) going down 'length' number
of pixels in the colour given.
*/
{AX = 320 * y + x;
BX = AX;
AL = colour;
CX = length;
loop(CX)
{ESBYTE[BX] ^= AL;
BX += 320;
}
}


: void box19 (word x,y,xsize,ysize; byte color)
{
ES = 0xA000;
$DB 0xB8,0x40,
0x1,0x36,0xF7,0x66,0xA,0x36,0x3,0x46,0xC,0x89,
0xC6,0x89,0xC7,0x36,0x8A,0x46,0x4,0x36,0x8B,0x56,
0x8,0x89,0xD1,0xF3,0xAA,0x81,0xC6,0x40,0x1,0x36,
0x8B,0x4E,0x6,0x83,0xF9,0x2,0x74,0x13,0x72,0x17,
0x89,0xD3,0x4B,0x49,0x49,0x26,0x88,0x4,0x26,0x88,
0x0,0x81,0xC6,0x40,0x1,0xE2,0xF4,0x89,0xF7,0x89,
0xD1,0xF3,0xAA
}

: void _box19 (word x,y,xsize,ysize; byte color)
{
$DB 0xB8,0x40,
0x1,0x36,0xF7,0x66,0xA,0x36,0x3,0x46,0xC,0x89,
0xC6,0x89,0xC7,0x36,0x8A,0x46,0x4,0x36,0x8B,0x56,
0x8,0x89,0xD1,0xF3,0xAA,0x81,0xC6,0x40,0x1,0x36,
0x8B,0x4E,0x6,0x83,0xF9,0x2,0x74,0x13,0x72,0x17,
0x89,0xD3,0x4B,0x49,0x49,0x26,0x88,0x4,0x26,0x88,
0x0,0x81,0xC6,0x40,0x1,0xE2,0xF4,0x89,0xF7,0x89,
0xD1,0xF3,0xAA
}


: void bar19 (word x,y,xsize,ysize; byte color)
{
ES = 0xA000;
$DB 0xB8,0x40,
0x1,0x36,0xF7,0x66,0xA,0x36,0x3,0x46,0xC,0x89,
0xC6,0x36,0x8A,0x46,0x4,0x36,0x8B,0x56,0x8,0x36,
0x8A,0x5E,0x6,0x89,0xF7,0x89,0xD1,0xF3,0xAA,0x81,
0xC6,0x40,0x1,0xFE,0xCB,0x75,0xF2
}

: void _bar19 (word x,y,xsize,ysize; byte color)
{
$DB 0xB8,0x40,
0x1,0x36,0xF7,0x66,0xA,0x36,0x3,0x46,0xC,0x89,
0xC6,0x36,0x8A,0x46,0x4,0x36,0x8B,0x56,0x8,0x36,
0x8A,0x5E,0x6,0x89,0xF7,0x89,0xD1,0xF3,0xAA,0x81,
0xC6,0x40,0x1,0xFE,0xCB,0x75,0xF2
}


: void getimage19 (word x,y,xsize,ysize,bufseg,bufoff)
{
$DB 0x1E,0xB8,0x0,0xA0,0x8E,0xD8,0x36,
0xC4,0x7E,0x4,0xB8,0x40,0x1,0x36,0xF7,0x66,0xC,
0x36,0x3,0x46,0xE,0x89,0xC2,0x36,0x8B,0x46,0xA,
0xAB,0x89,0xC3,0x36,0x8B,0x46,0x8,0xAB,0x89,0xD6,
0x89,0xD9,0xF3,0xA4,0x81,0xC2,0x40,0x1,0x48,0x75,
0xF3,0x1F
}


: void line19 (word x1,y1,x2,y2; byte color)
{
ES = 0xA000;
$DB 0xB8,0x40,
0x1,0x36,0x8B,0x7E,0x4,0x36,0x8B,0x4E,0xA,0x36,
0x8B,0x5E,0xC,0x36,0x8B,0x56,0x6,0x36,0x8B,0x6E,
0x8,0x39,0xD1,0x7E,0x4,0x87,0xCA,0x87,0xDD,0x89,
0xD6,0xF7,0xE1,0x89,0xF2,0x1,0xD8,0x87,0xC7,0x29,
0xDD,0x29,0xCA,0xBE,0x1,0x0,0x83,0xFD,0x0,0x7F,
0x5,0x83,0xEE,0x2,0xF7,0xDD,0x39,0xD5,0x7E,0x2A,
0x89,0xE9,0x1,0xD2,0x89,0xD3,0x29,0xEB,0x1,0xED,
0x26,0x88,0x5,0x83,0xF9,0x0,0x74,0x14,0x83,0xFB,
0x0,0x7C,0x6,0x81,0xC7,0x40,0x1,0x29,0xEB,0x1,
0xD3,0x1,0xF7,0x26,0x88,0x5,0xE2,0xEC,0x5D,0xC2,
0xA,0x0,0x89,0xD1,0x1,0xED,0x89,0xEB,0x29,0xD3,
0x1,0xD2,0x26,0x88,0x5,0x83,0xF9,0x0,0x74,0x14,
0x83,0xFB,0x0,0x7C,0x4,0x1,0xF7,0x29,0xD3,0x1,
0xEB,0x81,0xC7,0x40,0x1,0x26,0x88,0x5,0xE2,0xEC
}

: void _line19 (word x1,y1,x2,y2; byte color)
{
$DB 0xB8,0x40,
0x1,0x36,0x8B,0x7E,0x4,0x36,0x8B,0x4E,0xA,0x36,
0x8B,0x5E,0xC,0x36,0x8B,0x56,0x6,0x36,0x8B,0x6E,
0x8,0x39,0xD1,0x7E,0x4,0x87,0xCA,0x87,0xDD,0x89,
0xD6,0xF7,0xE1,0x89,0xF2,0x1,0xD8,0x87,0xC7,0x29,
0xDD,0x29,0xCA,0xBE,0x1,0x0,0x83,0xFD,0x0,0x7F,
0x5,0x83,0xEE,0x2,0xF7,0xDD,0x39,0xD5,0x7E,0x2A,
0x89,0xE9,0x1,0xD2,0x89,0xD3,0x29,0xEB,0x1,0xED,
0x26,0x88,0x5,0x83,0xF9,0x0,0x74,0x14,0x83,0xFB,
0x0,0x7C,0x6,0x81,0xC7,0x40,0x1,0x29,0xEB,0x1,
0xD3,0x1,0xF7,0x26,0x88,0x5,0xE2,0xEC,0x5D,0xC2,
0xA,0x0,0x89,0xD1,0x1,0xED,0x89,0xEB,0x29,0xD3,
0x1,0xD2,0x26,0x88,0x5,0x83,0xF9,0x0,0x74,0x14,
0x83,0xFB,0x0,0x7C,0x4,0x1,0xF7,0x29,0xD3,0x1,
0xEB,0x81,0xC7,0x40,0x1,0x26,0x88,0x5,0xE2,0xEC
}


: void notbar19 (word x,y,xsize,ysize)
{
ES = 0xA000;
$DB 0xB8,0x40,
0x1,0x36,0xF7,0x66,0x8,0x36,0x3,0x46,0xA,0x36,
0x8B,0x56,0x6,0x36,0x8A,0x5E,0x4,0x89,0xC7,0x89,
0xD1,0x26,0xF6,0x15,0x47,0xE2,0xFA,0x5,0x40,0x1,
0xFE,0xCB,0x75,0xEF
}

: void _notbar19 (word x,y,xsize,ysize)
{
$DB 0xB8,0x40,
0x1,0x36,0xF7,0x66,0x8,0x36,0x3,0x46,0xA,0x36,
0x8B,0x56,0x6,0x36,0x8A,0x5E,0x4,0x89,0xC7,0x89,
0xD1,0x26,0xF6,0x15,0x47,0xE2,0xFA,0x5,0x40,0x1,
0xFE,0xCB,0x75,0xEF
}


: void notbox19 (word x,y,xsize,ysize)
{
ES = 0xA000;
$DB 0xB8,0x40,
0x1,0x36,0xF7,0x66,0x8,0x36,0x3,0x46,0xA,0x89,
0xC6,0x89,0xC7,0x36,0x8B,0x56,0x6,0x89,0xD1,0x26,
0xF6,0x15,0x47,0xE2,0xFA,0x81,0xC6,0x40,0x1,0x8B,
0x4E,0x4,0x83,0xF9,0x2,0x74,0x13,0x72,0x19,0x89,
0xD3,0x4B,0x49,0x49,0x26,0xF6,0x14,0x26,0xF6,0x10,
0x81,0xC6,0x40,0x1,0xE2,0xF4,0x89,0xD1,0x26,0xF6,
0x14,0x46,0xE2,0xFA
}

: void _notbox19 (word x,y,xsize,ysize)
{
$DB 0xB8,0x40,
0x1,0x36,0xF7,0x66,0x8,0x36,0x3,0x46,0xA,0x89,
0xC6,0x89,0xC7,0x36,0x8B,0x56,0x6,0x89,0xD1,0x26,
0xF6,0x15,0x47,0xE2,0xFA,0x81,0xC6,0x40,0x1,0x8B,
0x4E,0x4,0x83,0xF9,0x2,0x74,0x13,0x72,0x19,0x89,
0xD3,0x4B,0x49,0x49,0x26,0xF6,0x14,0x26,0xF6,0x10,
0x81,0xC6,0x40,0x1,0xE2,0xF4,0x89,0xD1,0x26,0xF6,
0x14,0x46,0xE2,0xFA
}


: void overimage19 (word x,y,imageloc; byte clearcolor)
{
ES = 0xA000;
$ DB 0xB8,0x40,
0x1,0x36,0x8B,0x76,0x6,0x36,0xF7,0x66,0x8,0x36,
0x3,0x46,0xA,0x89,0xC3,0x36,0x8A,0x66,0x4,0x8B,
0x14,0x8B,0x6C,0x2,0x83,0xC6,0x4,0x89,0xD1,0x89,
0xDF,0xAC,0x38,0xE0,0x74,0x3,0x26,0x88,0x5,0x47,
0xE2,0xF5,0x81,0xC3,0x40,0x1,0x4D,0x75,0xEA
}

: void _overimage19 (word x,y,imageloc; byte clearcolor)
{
$ DB 0xB8,0x40,
0x1,0x36,0x8B,0x76,0x6,0x36,0xF7,0x66,0x8,0x36,
0x3,0x46,0xA,0x89,0xC3,0x36,0x8A,0x66,0x4,0x8B,
0x14,0x8B,0x6C,0x2,0x83,0xC6,0x4,0x89,0xD1,0x89,
0xDF,0xAC,0x38,0xE0,0x74,0x3,0x26,0x88,0x5,0x47,
0xE2,0xF5,0x81,0xC3,0x40,0x1,0x4D,0x75,0xEA
}


: void putimage19 (word x,y,imageloc)
{
ES = 0xA000;
$ DB 0xB8,0x40,
0x1,0x36,0x8B,0x76,0x4,0x36,0xF7,0x66,0x6,0x36,0x3,
0x46,0x8,0x8B,0x14,0x8B,0x5C,0x2,0x83,0xC6,0x4,
0x89,0xC7,0x89,0xD1,0xF3,0xA4,0x5,0x40,0x1,0x4B,
0x75,0xF4
}

: void _putimage19 (word x,y,imageloc)
{
$ DB 0xB8,0x40,
0x1,0x36,0x8B,0x76,0x4,0x36,0xF7,0x66,0x6,0x36,0x3,
0x46,0x8,0x8B,0x14,0x8B,0x5C,0x2,0x83,0xC6,0x4,
0x89,0xC7,0x89,0xD1,0xF3,0xA4,0x5,0x40,0x1,0x4B,
0x75,0xF4
}


: void trans19 (word x,y,xsize,ysize)
{
ES = 0xA000;
$DB 0xB8,0x40,
0x1,0x36,0xF7,0x66,0x8,0x36,0x3,0x46,0xA,0x36,
0x8B,0x56,0x6,0x36,0x8B,0x5E,0x4,0x89,0xC7,0x89,
0xC6,0x89,0xD1,0xF3,0xA4,0x5,0x40,0x1,0x4B,0x75,
0xF2
}

: void _trans19 (word x,y,xsize,ysize)
{
$DB 0xB8,0x40,
0x1,0x36,0xF7,0x66,0x8,0x36,0x3,0x46,0xA,0x36,
0x8B,0x56,0x6,0x36,0x8B,0x5E,0x4,0x89,0xC7,0x89,
0xC6,0x89,0xD1,0xF3,0xA4,0x5,0x40,0x1,0x4B,0x75,
0xF2
}


: void xorbar19 (word x,y,xsize,ysize; byte color)
{
ES = 0xA000;
$ DB 0xB8,0x40,
0x1,0x36,0xF7,0x66,0xA,0x36,0x3,0x46,0xC,0x89,
0xC6,0x36,0x8A,0x46,0x4,0x36,0x8B,0x56,0x8,0x36,
0x8A,0x5E,0x6,0x89,0xF7,0x89,0xD1,0x26,0x30,0x5,
0x47,0xE2,0xFA,0x81,0xC6,0x40,0x1,0xFE,0xCB,0x75,
0xEE
}

: void _xorbar19 (word x,y,xsize,ysize; byte color)
{
$ DB 0xB8,0x40,
0x1,0x36,0xF7,0x66,0xA,0x36,0x3,0x46,0xC,0x89,
0xC6,0x36,0x8A,0x46,0x4,0x36,0x8B,0x56,0x8,0x36,
0x8A,0x5E,0x6,0x89,0xF7,0x89,0xD1,0x26,0x30,0x5,
0x47,0xE2,0xFA,0x81,0xC6,0x40,0x1,0xFE,0xCB,0x75,
0xEE
}


: void xorbox19 (word x,y,xsize,ysize; byte color)
{
ES = 0xA000;
$ DB 0xB8,0x40,
0x1,0x36,0xF7,0x66,0xA,0x36,0x3,0x46,0xC,0x89,
0xC6,0x89,0xC7,0x36,0x8A,0x46,0x4,0x36,0x8B,0x56,
0x8,0x89,0xD1,0x26,0x30,0x5,0x47,0xE2,0xFA,0x81,
0xC6,0x40,0x1,0x36,0x8B,0x4E,0x6,0x83,0xF9,0x2,
0x74,0x13,0x72,0x19,0x89,0xD3,0x4B,0x49,0x49,0x26,
0x30,0x4,0x26,0x30,0x0,0x81,0xC6,0x40,0x1,0xE2,
0xF4,0x89,0xD1,0x26,0x30,0x4,0x46,0xE2,0xFA
}

: void _xorbox19 (word x,y,xsize,ysize; byte color)
{
$ DB 0xB8,0x40,
0x1,0x36,0xF7,0x66,0xA,0x36,0x3,0x46,0xC,0x89,
0xC6,0x89,0xC7,0x36,0x8A,0x46,0x4,0x36,0x8B,0x56,
0x8,0x89,0xD1,0x26,0x30,0x5,0x47,0xE2,0xFA,0x81,
0xC6,0x40,0x1,0x36,0x8B,0x4E,0x6,0x83,0xF9,0x2,
0x74,0x13,0x72,0x19,0x89,0xD3,0x4B,0x49,0x49,0x26,
0x30,0x4,0x26,0x30,0x0,0x81,0xC6,0x40,0x1,0xE2,
0xF4,0x89,0xD1,0x26,0x30,0x4,0x46,0xE2,0xFA
}


: void xorimage19 (word x,y,imageloc)
{
ES = 0xA000;
$DB 0xB8,0x40,
0x1,0x36,0x8B,0x76,0x4,0x36,0xF7,0x66,0x6,0x36,
0x3,0x46,0x8,0x8B,0x14,0x8B,0x5C,0x2,0x83,0xC6,
0x4,0x89,0xC5,0x89,0xEF,0x89,0xD1,0xAC,0x26,0x30,
0x5,0x47,0xE2,0xF9,0x81,0xC5,0x40,0x1,0x4B,0x75,
0xEE
}

: void _xorimage19 (word x,y,imageloc)
{
$DB 0xB8,0x40,
0x1,0x36,0x8B,0x76,0x4,0x36,0xF7,0x66,0x6,0x36,
0x3,0x46,0x8,0x8B,0x14,0x8B,0x5C,0x2,0x83,0xC6,
0x4,0x89,0xC5,0x89,0xEF,0x89,0xD1,0xAC,0x26,0x30,
0x5,0x47,0xE2,0xF9,0x81,0xC5,0x40,0x1,0x4B,0x75,
0xEE
}


: void xorline19 (word x1,y1,x2,y2; byte color)
{
ES = 0xA000;
$DB 0xB8,0x40,
0x1,0x36,0x8B,0x7E,0x4,0x36,0x8B,0x4E,0xA,0x36,
0x8B,0x5E,0xC,0x36,0x8B,0x56,0x6,0x36,0x8B,0x6E,
0x8,0x39,0xD1,0x7E,0x4,0x87,0xCA,0x87,0xDD,0x89,
0xD6,0xF7,0xE1,0x89,0xF2,0x1,0xD8,0x87,0xC7,0x29,
0xDD,0x29,0xCA,0xBE,0x1,0x0,0x83,0xFD,0x0,0x7F,
0x5,0x83,0xEE,0x2,0xF7,0xDD,0x39,0xD5,0x7E,0x2A,
0x89,0xE9,0x1,0xD2,0x89,0xD3,0x29,0xEB,0x1,0xED,
0x26,0x30,0x5,0x83,0xF9,0x0,0x74,0x14,0x83,0xFB,
0x0,0x7C,0x6,0x81,0xC7,0x40,0x1,0x29,0xEB,0x1,
0xD3,0x1,0xF7,0x26,0x30,0x5,0xE2,0xEC,0x5D,0xC2,
0xA,0x0,0x89,0xD1,0x1,0xED,0x89,0xEB,0x29,0xD3,
0x1,0xD2,0x26,0x30,0x5,0x83,0xF9,0x0,0x74,0x14,
0x83,0xFB,0x0,0x7C,0x4,0x1,0xF7,0x29,0xD3,0x1,
0xEB,0x81,0xC7,0x40,0x1,0x26,0x30,0x5,0xE2,0xEC
}

: void _xorline19 (word x1,y1,x2,y2; byte color)
{
$DB 0xB8,0x40,
0x1,0x36,0x8B,0x7E,0x4,0x36,0x8B,0x4E,0xA,0x36,
0x8B,0x5E,0xC,0x36,0x8B,0x56,0x6,0x36,0x8B,0x6E,
0x8,0x39,0xD1,0x7E,0x4,0x87,0xCA,0x87,0xDD,0x89,
0xD6,0xF7,0xE1,0x89,0xF2,0x1,0xD8,0x87,0xC7,0x29,
0xDD,0x29,0xCA,0xBE,0x1,0x0,0x83,0xFD,0x0,0x7F,
0x5,0x83,0xEE,0x2,0xF7,0xDD,0x39,0xD5,0x7E,0x2A,
0x89,0xE9,0x1,0xD2,0x89,0xD3,0x29,0xEB,0x1,0xED,
0x26,0x30,0x5,0x83,0xF9,0x0,0x74,0x14,0x83,0xFB,
0x0,0x7C,0x6,0x81,0xC7,0x40,0x1,0x29,0xEB,0x1,
0xD3,0x1,0xF7,0x26,0x30,0x5,0xE2,0xEC,0x5D,0xC2,
0xA,0x0,0x89,0xD1,0x1,0xED,0x89,0xEB,0x29,0xD3,
0x1,0xD2,0x26,0x30,0x5,0x83,0xF9,0x0,0x74,0x14,
0x83,0xFB,0x0,0x7C,0x4,0x1,0xF7,0x29,0xD3,0x1,
0xEB,0x81,0xC7,0x40,0x1,0x26,0x30,0x5,0xE2,0xEC
}


: void UNBLANKVGA ()
{
DX = 0x3C6;
AL = 0xFF;
$ OUT DX,AL
}


: void BLANKVGA ()
{
DX = 0x3C6;
AL = 0;
$ OUT DX,AL
}


: void XLINE19 () /* AX = xloc, BX = yloc, CX = length, DL = colour */
{
DI = AX;
BX >< DX;
AX = 320 * DX;
DI += AX;
ES = 0xA000;
AL = BL;
$ REPZ
$ STOSB
}


: void _XLINE19 () /* AX = xloc, BX = yloc, CX = length, DL = colour */
{
DI = AX;
BX >< DX;
AX = 320 * DX;
DI += AX;
AL = BL;
$ REPZ
$ STOSB
}


: void YLINE19 () /* AX = xloc, BX = yloc, CX = length, DL = colour */
{
DI = AX;
BX >< DX;
AX = 320 * DX;
DI += AX;
ES = 0xA000;
loop(CX)
{
ESBYTE[DI] = BL;
DI += 320;
}
}


: void _YLINE19 () /* AX = xloc, BX = yloc, CX = length, DL = colour */
{
DI = AX;
BX >< DX;
AX = 320 * DX;
DI += AX;
loop(CX)
{
ESBYTE[DI] = BL;
DI += 320;
}
}


: void SETVGAPALETTE () /* BX=first, CX=numbertoset, DX=bufferoffset */
{
ES = DS;
AX = 0x1012;
$ INT 0x10
}


: byte GETPIXEL19 () /* BX = xloc, DX = yloc */
{
AX = 320 * DX;
BX += AX;
ES = 0xA000;
AL = ESBYTE[BX];
}


: byte _GETPIXEL19 () /* BX = xloc, DX = yloc */
{
AX = 320 * DX;
BX += AX;
AL = ESBYTE[BX];
}


: byte NOTPIXEL19 () /* BX = xloc, DX = yloc */
{
AX = 320 * DX;
BX += AX;
ES = 0xA000;
!ESBYTE[BX];
}


: byte _NOTPIXEL19 () /* BX = xloc, DX = yloc */
{
AX = 320 * DX;
BX += AX;
!ESBYTE[BX];
}


: byte NEGPIXEL19 () /* BX = xloc, DX = yloc */
{
AX = 320 * DX;
BX += AX;
ES = 0xA000;
-ESBYTE[BX];
}


: byte _NEGPIXEL19 () /* BX = xloc, DX = yloc */
{
AX = 320 * DX;
BX += AX;
-ESBYTE[BX];
}


: void XORPIXEL19 () /* BX = xloc, CL = colour, DX = yloc */
{
AX = 320 * DX;
BX += AX;
ES = 0xA000;
ESBYTE[BX] ^= CL;
}


: void _XORPIXEL19 () /* BX = xloc, CL = colour, DX = yloc */
{
AX = 320 * DX;
BX += AX;
ESBYTE[BX] ^= CL;
}


: void ANDPIXEL19 () /* BX = xloc, CL = colour, DX = yloc */
{
AX = 320 * DX;
BX += AX;
ES = 0xA000;
ESBYTE[BX] &= CL;
}


: void _ANDPIXEL19 () /* BX = xloc, CL = colour, DX = yloc */
{
AX = 320 * DX;
BX += AX;
ESBYTE[BX] &= CL;
}


: void ORPIXEL19 () /* BX = xloc, CL = colour, DX = yloc */
{
AX = 320 * DX;
BX += AX;
ES = 0xA000;

ESBYTE[BX] |= CL;
}


: void _ORPIXEL19 () /* BX = xloc, CL = colour, DX = yloc */
{
AX = 320 * DX;
BX += AX;
ESBYTE[BX] |= CL;
}


: void PUTPIXEL19 () /* BX = xloc, CL = colour, DX = yloc */
{
AX = 320 * DX;
BX += AX;
ES = 0xA000;
ESBYTE[BX] = CL;
}


: void _PUTPIXEL19 () /* BX = xloc, CL = colour, DX = yloc */
{
AX = 320 * DX;
BX += AX;
ESBYTE[BX] = CL;
}


/* end of VGA.H-- */