aboutsummaryrefslogtreecommitdiff
path: root/dla.s
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2022-11-15 01:02:38 -0500
committerB. Watson <urchlay@slackware.uk>2022-11-15 01:02:38 -0500
commit9f730b984c58d76733e79d53ff653232c158f0d8 (patch)
tree0af7f604fe46621af41bf3fcf3d7d656054cf9f7 /dla.s
parentfafd442b6ece11583a0e07da4f96fd5ab20fcee1 (diff)
downloaddla-asm-9f730b984c58d76733e79d53ff653232c158f0d8.tar.gz
dla.xex: add Quit to Save/Redo/New menu.
Diffstat (limited to 'dla.s')
-rw-r--r--dla.s17
1 files changed, 14 insertions, 3 deletions
diff --git a/dla.s b/dla.s
index 6cea1b7..aa5b83d 100644
--- a/dla.s
+++ b/dla.s
@@ -342,8 +342,18 @@ notredo:
cmp #'S' ; Save
beq saveimage
cmp #'N' ; New
- bne waitkey ; ignore any other keystroke
+ bne notnew
jmp getargs
+notnew:
+ cmp #'Q' ; Quit
+ bne waitkey ; ignore any other keystroke, get another
+
+ jsr restore_gr0 ; need the GR.0 screen to show the quit prompt
+ lda #$7d ; clear screen
+ jsr printchr
+ jsr confirm_quit ; this doesn't return if the user says Y
+ jmp getargs ; if he said N, start over (same as New)
+
;;; End of generate()
;;; Subroutine: saveimage
@@ -797,10 +807,11 @@ retrymsg:
; printing to a 32-byte buffer (which we told the OS was the
; start of a GR.0 screen, but that was designated "a lie").
menumsg:
- .byte " "
+ .byte " "
.byte ' ','S'|$80,"ave"
.byte ' ','R'|$80,"edo"
- .byte ' ','N'|$80,"ew? "
+ .byte ' ','N'|$80,"ew"
+ .byte ' ','Q'|$80,"uit?"
.byte 0
exit_prog_msg: