标题: 如何把用PEEK,POKEB函数改用“物理指针直接访问内存
[打印本页]
作者: linzhixiao
时间: 2004-4-2 00:00
标题: 如何把用PEEK,POKEB函数改用“物理指针直接访问内存
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);
}