注册 登录
编程论坛 汇编论坛

请教一下这段汇编代码的含义

古浪 发布于 2013-11-01 11:15, 753 次点击
程序代码:
push    word ptr [bp+0]
call    sub_156
jnz     short loc_E2
cli
mov     al, 0D1h
out     64h, al         ; AT Keyboard controller 8042.
call    sub_156
mov     al, 0DFh
out     60h, al         ; AT Keyboard controller 8042.
call    sub_156
mov     al, 0FFh
out     64h, al  ; AT Keyboard controller 8042.
                 ; Reset the keyboard and start internal diagnostics
call    sub_156
sti

loc_E2:
       mov     ax, 0BB00h
int     1Ah
and     eax, eax
;以下省略

sub_156  proc near
       sub     cx, cx

    loc_158:
       in      al, 64h     ; AT Keyboard controller 8042.
       jmp     short $+2
       and     al, 2
       loopne  loc_158
       and     al, 2
       retn
sub_156 endp

跪求高手赐教!!
2 回复
#2
孔家2013-11-01 17:52
这段代码涉及8042键盘控制器的知识,还有端口操作,BIOS,貌似那个1aH中断和BIOS时间有关
#3
古浪2013-11-01 18:34
回复 2楼 孔家
感谢回复。是这样,期待高手给出关于这里对键盘具体做了什么操作的详细解释,感激不尽!
1