我正在使用此代码从键盘获取输入,但我想不出一种方法来获取像“shift + a”= A 这样的组合键
keypressed:
in al,60h
test al,80h
jnz keypressed
and al,7fh
mov bx,table
dec al
xlat
cmp al,0
je key
call put_char
key:
in al,60h
test al,80h
jz key
jmp keypressed
table db 0x01,"1234567890-=",0X0E,0x0F,'qwertyuiop[]',0x1C,0,"asdfghjkl;'",0,0,0,"zxcvbnm,./",0,0,0," ",0
注意 - putchar 是我制作的一个程序,它可以在 al 中打印任何内容。