『楼 主』:
如何把用PEEK,POKEB函数改用“物理指针直接访问内存
使用 LLM 解释/回答一下
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);
}
|