以下为:DOS16位的键盘模拟输入,但是因为DOS32 不支持pokeb,peek内存函数.本.我现在需要在DOS32也有此功能的函数,但我不能转换到WATCOM DOS32能支持的函数.(注意不是WATCOM DOS16位)
请懂WATCOM c/c++的高手,帮我一下,非常感谢.
void keyboard(int choice,char key)
{
int offset,i;
offset=peek(0x40,0x1c);
for(i=0;key!='\x0';i++)
{
if(choice==0)
{
pokeb(0x40,offset,0x00);
pokeb(0x40,offset,key);
}
if(choice!=0)
{
pokeb(0x40,offset,key);
pokeb(0x40,offset+1,0x00);
}
offset=offset+2;
if(offset==0x3e)offset=0x1e;
}
pokeb(0x40,0x1c,offset);
}
请懂WATCOM c/c++的高手,帮我一下,非常感谢.
void keyboard(int choice,char key)
{
int offset,i;
offset=peek(0x40,0x1c);
for(i=0;key!='\x0';i++)
{
if(choice==0)
{
pokeb(0x40,offset,0x00);
pokeb(0x40,offset,key);
}
if(choice!=0)
{
pokeb(0x40,offset,key);
pokeb(0x40,offset+1,0x00);
}
offset=offset+2;
if(offset==0x3e)offset=0x1e;
}
pokeb(0x40,0x1c,offset);
}
