enable and disable cursor when reading a line of keyboard input via chrin
This commit is contained in:
1 parent
296fdcfd7a
commit
13a7aee1d2
2 files changed
+14
No files matched your search
@@ -70,7 +70,17 @@ no_blink_cursor:
|
||||
|
||||
rts
|
||||
|
||||
disable_cursor:
|
||||
lda #$ff
|
||||
sta cursor_blink_disable
|
||||
;; FALL THROUGH
|
||||
hide_cursor_if_visible:
|
||||
bit cursor_is_visible
|
||||
bpl undraw_cursor
|
||||
rts
|
||||
|
||||
enable_cursor:
|
||||
lda #$00
|
||||
sta cursor_blink_disable
|
||||
rts
|
||||
|
||||
@@ -45,6 +45,8 @@ not_end_of_input:
|
||||
|
||||
read_from_keyboard:
|
||||
|
||||
jsr enable_cursor
|
||||
|
||||
;; Wait for a key
|
||||
lda keys_in_key_buffer
|
||||
beq chrin_repeat
|
||||
@@ -53,6 +55,8 @@ read_from_keyboard:
|
||||
cmp #$0d
|
||||
bne not_enter
|
||||
|
||||
jsr disable_cursor
|
||||
|
||||
jsr pop_keyboard_buffer
|
||||
|
||||
jsr hide_cursor_if_visible
|
||||
|
||||
Reference in new issue
Block a user