TSR- - 2


void window_gets();

void window_cleol(), window();

void calc();

char far *vid_mem;

struct window_frame

int startx, endx, starty, endy;

int curx, cury; /* */

unsigned char *p; /* */

char *header; /* */

int border; /* / */

int active; /* / */

frame[MAX_FRAME];

char wp[4000]; /*

/* busy 1, , - 0 */

char busy = 0;

main()

struct address

char far *p;

;

/* */

struct address far *addr = (struct address far *) 20;

addr->p = (char far *) tsr_ap;

set_vid_mem();

tsr(2000);

set_vid_mem()

int vmode;

vmode = video_mode();

if((vmode!=2) && (vmode!=3) && (vmode!=7))

printf("video must be in &0 column text mode");

exit(1);

/* */

if(vmode==7) vid_mem = (char far *) 0xB0000000;

else vid_mem = (char far *) 0xB8000000;

/* TSR- */

void interrupt tsr_ap()

if(!busy)

busy = !busy;

window_main();

busy = !busy;

/* , */

tsr(size)

unsigned size;

union REGS r;

r.h.ah = 49; /* , */

r.h.al = 0; /* */

r.x.ax = size;

int86(0x21, &r, &r);

window_main()

/* , */

make_window(0, " Calculator ", 8, 20, 12, 60, BORDER);

/* window() */

calc();

/*************************************************************/

/* 蠠 */

/*************************************************************/