Skip to content

Instantly share code, notes, and snippets.

@kaveenr
Created September 13, 2022 01:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaveenr/b80fc9381371982b05d73680586ca127 to your computer and use it in GitHub Desktop.
Save kaveenr/b80fc9381371982b05d73680586ca127 to your computer and use it in GitHub Desktop.
Simplified KIM-1 Keypress
;140000D8A90085F985FA85FB201F1F206A1F85F94C090208EE
;0000010001
; (2022) Kaveen Rodrigo / ukr.lk
; Reference To ROM Routines In The KIM-1
SCANDS = $1f1f
GETKEY = $1f6a
; Reference to SCANDS values
dig12 = $f9
dig34 = $fa
dig56 = $fb
; Start program at free RAM.
.org $0200
init:
cld ; Clear Decimal
lda #$00 ; Initialize SCANDS Values
sta dig12
sta dig34
sta dig56
main_loop:
jsr SCANDS
jsr GETKEY
cmp #$15 ; Handle no key press
beq main_loop
sta dig12 ; Store valid key press
jmp main_loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment