mirror of
https://github.com/bobbimanners/emailler.git
synced 2025-04-07 05:37:12 +00:00
Made get_key_if_available actually work.
On the A2 get_key deletes any already pressed key. Therefore it's a bad idea(tm) to call it to retrieve the key detected in get_key_if_available. So now get_key_if_available insteads retrieves the key on its own via direct hw access. This was already done the very same way in check_for_abort_key. And apart from not working as expected the benefit of get_key displaying a cursor wasn't useful here anyway because get_key was supposed to return right away with the pressed key so the cursor wouldn't have been visible at all.
This commit is contained in:
parent
9dd014cded
commit
344d76829a
@ -17,10 +17,13 @@ get_key:
|
||||
; inputs: none
|
||||
; outputs: A contains ASCII value of key just pressed (0 if no key pressed)
|
||||
get_key_if_available:
|
||||
bit $c000 ; key down?
|
||||
bmi get_key
|
||||
lda $c000 ; current key pressed
|
||||
bmi :+
|
||||
lda #0
|
||||
rts
|
||||
: bit $c010 ; clear the keyboard strobe
|
||||
and #$7f
|
||||
rts
|
||||
|
||||
; check whether the escape key is being pressed
|
||||
; inputs: none
|
||||
|
Loading…
x
Reference in New Issue
Block a user