diff options
author | B. Watson <urchlay@slackware.uk> | 2022-11-01 14:14:11 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2022-11-01 14:14:11 -0400 |
commit | 7af500d53f805a7d548782af1b69404a511a196e (patch) | |
tree | 76c956030eeeed2b7d4334f6eb52db67c0fe52c4 | |
parent | 138136c72bfae906ff68af2c3e912e58ea86d1f2 (diff) | |
download | dla-asm-7af500d53f805a7d548782af1b69404a511a196e.tar.gz |
Use getchr for menu.
-rw-r--r-- | dla.s | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -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() |