Re: A89: Keys
[Prev][Next][Index][Thread]
Re: A89: Keys
In a message dated 2/5/00 12:06:39 PM Pacific Standard Time,
KeysDezes@aol.com writes:
> How do you get a key code in 89 asm? I've tried a number of different
ways,
> and none seem to work. Help me!
>
move.w (doorsos::kb_vars+$1e), d0 ;move the key code into d0
clr.w (doorsos::kb_vars+$1c) ;clear the keypress flag
;this moves the keycode into d0
;if you want a more sophisticated way try this. this will put a nul into d0
if no key is pressed
tst.w (doorsos::kb_vars+$1c) ;is there a key?
bne keypressed ;if yes.. go to keypressed
clr.w d0 ;clear the old key
bra nokey
keypressed:
move.w (doorsos::kb_vars+$1e), d0 ;move the key code into d0
clr.w (doorsos::kb_vars+$1c) ;clear the keypress flag
nokey:
hope this helps