2 ; Karri Kaksonen, Harry Dodgson 2006-01-07
12 ; --------------------------------------------------------------------------
13 ; The Atari Lynx has a very small keyboard - only 3 keys
14 ; Opt1, Opt2 and Pause.
15 ; But the designers have decided that pressing Pause and Opt1 at the
16 ; same time means Restart and pressing Pause and Opt2 means Flip screen.
18 ; For "easter egg" use I have also included all three keys pressed '?'
19 ; and Opt1 + Opt2 pressed '3'.
20 ; So the keyboard returns '1', '2', '3', 'P', 'R', 'F' or '?'.
26 jsr _kbhit ; Check for char available
33 lda KBEDG ; Pause button is pressed
39 beq @L4 ; Pause + Opt 1 = Reset
41 beq @L5 ; Pause + Opt 2 = Flip
42 lda #'?' ; All buttons pressed
45 lda KBSTL ; Pause alone was the last placed button
48 lda #'P' ; Pause pressed
51 lda #'R' ; Reset pressed
54 lda #'F' ; Flip pressed
57 lda KBEDG ; No Pause pressed
63 lda #'3' ; opt 1 + opt 2 pressed
66 lda #'1' ; opt 1 pressed
69 lda #'2' ; opt 2 pressed