}..........................................................................................................................................................28
get_key() /*得到按键值*/.................................................................................................................28
{..........................................................................................................................................................28
union inkey /*共用体*/.....................................................................................................................28
{.........................................................................................................................................................28
char ch[2];..........................................................................................................................................29
int i;....................................................................................................................................................29
}c;......................................................................................................................................................29
c.i=bioskey(0);...................................................................................................................................29
return(c.i);..........................................................................................................................................29
}..........................................................................................................................................................29
window_xy(int x,int y).......................................................................................................................29
{..........................................................................................................................................................29
union REGS r; /*定义联合体*/........................................................................................................29
r.h.ah=2; /*初始化*/..........................................................................................................................29
r.h.dh=y;.............................................................................................................................................29
r.h.dl=x;..............................................................................................................................................29
r.h.bh=0;.............................................................................................................................................29
int86(0x10,&r,&r);............................................................................................................................29
}..........................................................................................................................................................29
key_choice() /*小键盘键的输入函数*/............................................................................................29
{..........................................................................................................................................................29
int ch,bx=0,by=0;/*起始停留键的位置*/........................................................................................29
do.......................................................................................................................................................29
{.........................................................................................................................................................29
ch=get_key();.....................................................................................................................................29
switch(ch)..........................................................................................................................................29
{.........................................................................................................................................................29
............................................................................................................................................................29
case 0x4f31:res_but(bx,by);bx=0;by=0;get_data(bx,by);break;/*图表键和小键盘的键对应,此
处为 1*/..............................................................................................................................................29
case 0x5032:res_but(bx,by);bx=1;by=0;get_data(bx,by);break;/*2*/.............................................29
case 0x5133:res_but(bx,by);bx=2;by=0;get_data(bx,by);break;/*3*/.............................................29
case 0x4b34:res_but(bx,by);bx=0;by=1;get_data(bx,by);break;/*4*/.............................................30
case 0x4c35:res_but(bx,by);bx=1;by=1;get_data(bx,by);break;/*5*/..............................................30
case 0x4d36:res_but(bx,by);bx=2;by=1;get_data(bx,by);break;/*6*/.............................................30
case 0x4737:res_but(bx,by);bx=0;by=2;get_data(bx,by);break;/*7*/.............................................30
case 0x4838:res_but(bx,by);bx=1;by=2;get_data(bx,by);break;/*8*/.............................................30
case 0x4939:res_but(bx,by);bx=2;by=2;get_data(bx,by);break;/*9*/.............................................30
case 0x5230:res_but(bx,by);bx=0;by=3;get_data(bx,by);break;/*0*/.............................................30
case 0x4e2b :res_but(bx,by);bx=3;by=0;get_data(bx,by);send1();break;/*加*/.............................30
case 0x4a2d :res_but(bx,by);bx=4;by=0;get_data(bx,by);send1();break;/*减*/.............................30
case 0x372a :res_but(bx,by);bx=3;by=1;get_data(bx,by);send1();break;/*乘*/.............................30
case 0x352f:res_but(bx,by);bx=4;by=1;get_data(bx,by);send1();break;/*除*/...............................30