From 7af500d53f805a7d548782af1b69404a511a196e Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 1 Nov 2022 14:14:11 -0400 Subject: Use getchr for menu. --- dla.s | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'dla.s') diff --git a/dla.s b/dla.s index d379c42..504a30a 100644 --- a/dla.s +++ b/dla.s @@ -8,7 +8,6 @@ ; to use 1 byte for the X coordinate. .include "atari.inc" - .macpack atari ; for scrcode macro .include "xex.inc" loadaddr = $2000 @@ -260,25 +259,22 @@ main_done: jsr printmsg ; user might have hit some random key during plotting; ignore it. -keyloop: ldx #$ff stx CH waitkey: - lda CH - cmp #$ff - beq waitkey + jsr getchr ; see what key was hit - and #$3f ; ignore shift and inverse - cmp #$28 ; Redo + and #$5f ; ignore case + cmp #'R' ; Redo bne notredo jmp generate notredo: - cmp #$3e ; Save + cmp #'S' ; Save beq saveimage - cmp #$23 ; New - bne keyloop ; ignore any other keystroke + cmp #'N' ; New + bne waitkey ; ignore any other keystroke jmp getargs ;;; End of generate() -- cgit v1.2.3