home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
turbo_c
/
blit.arc
/
BT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1988-02-21
|
754b
|
41 lines
#include <dos.h>
#include "blit.h"
#define video(x) {_AX = x;geninterrupt(0x10);}
#define mouse(x) {_AX = x;geninterrupt(0x33);}
/*
* this code assumes an EGA and a mouse.
*/
main()
{
struct bitmap src, dest;
int buttons;
video(0x10);
printf("hello");
src.bounds.left = 8;
src.bounds.right = 28;
src.bounds.top = 0;
src.bounds.bot = 14;
src.bytes = dest.bytes = 80;
src.pntr = dest.pntr = MK_FP(0xa000, 0);
mouse(1);
do {
mouse(3);
buttons = _BX;
dest.bounds.left = _CX;
dest.bounds.top = _DX;
dest.bounds.right = dest.bounds.left + 20;
dest.bounds.bot = dest.bounds.top + 14;
mouse(2);
blit(&src, &dest, or_verb);
mouse(1);
} while (buttons == 0);
mouse(2);
video(0x3);
}