Skip to content

Commit

Permalink
Improve ESCAPE handling during *JSETUP.
Browse files Browse the repository at this point in the history
A doubled-up "Escape" error on exit remains a distinct possibility!
  • Loading branch information
Tom Seddon committed Dec 5, 2024
1 parent fd4de6f commit 7c3f210
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion ADJIROM.s65
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ jno: .fill 1
jkeys: .fill 1
use_overlay: .fill 1
action_index: .fill 1
old_escape_action: .fill 1
.endsection

jsr reset_default_vectors
Expand Down Expand Up @@ -1102,6 +1102,11 @@ keys:
.text "Hold SHIFT, then ESCAPE to cancel",10,13
.text "Hold SHIFT, then CTRL for NONE",10,13
.text 0

lda osbyte_var(229)
sta old_escape_action
lda #1
sta osbyte_var(229)

lda #0
sta action_index
Expand Down Expand Up @@ -1141,6 +1146,8 @@ actions_loop:
ldx #0
jsr osbyte

jsr restore_escape_action

jsr hook_question

bit $ff
Expand Down Expand Up @@ -1179,9 +1186,13 @@ print_keys_loop:
.endif

jsr print_hook_info

jmp install

done:
restore_escape_action:
lda old_escape_action
sta osbyte_var(229)
rts

hook_question:
Expand Down

0 comments on commit 7c3f210

Please sign in to comment.