this function

mov ah, 01h
int 16

reads the state of the keyboard right....but where's the key that was pressed stored? How would I use it?


after I get that where the state of the keyboard stored?
Posted on 2004-06-20 16:56:18 by incognito
it is stored in BIOS area 0040.

here's a code fragment how to read keys without INT 16h



getkey:
push ds
push bx
push 0040H
pop ds
xor ax,ax
mov BX,ds:[001Ah]
cmp BX,ds:[001Ch]
jz short getkey_1
mov AX,[BX]
INC BX
INC BX
CMP BX,ds:[0082h]
JNZ short @F
MOV BX,ds:[0080h]
@@:
MOV ds:[001Ah],BX
getkey_1:
pop bx
pop ds
ret
Posted on 2004-06-21 01:17:42 by japheth
Afternoon, incognito.

I moved this thread to the Heap as its content is not related to win32asm ;p .

Cheers,
Scronty
Posted on 2004-06-21 03:45:49 by Scronty
Thanks guys, I am mainly doing x86 assembly and didn't really know which board this belonged under.
Posted on 2004-06-21 13:19:44 by incognito