Add KIM-1 functions to write to the 7-segment LED display and get
keypresses from the keypad. Includes sample program illustrating how to use them. Tested on real KIM-1 hardware.
This commit is contained in:
18
libsrc/kim1/getkey.s
Normal file
18
libsrc/kim1/getkey.s
Normal file
@@ -0,0 +1,18 @@
|
||||
;
|
||||
; int __fastcall__ getkey();
|
||||
;
|
||||
|
||||
.include "kim1.inc"
|
||||
|
||||
.import popa
|
||||
|
||||
.export _getkey
|
||||
|
||||
.proc _getkey
|
||||
|
||||
jsr KEYIN ; Open up keyboard channel
|
||||
jsr GETKEY ; Get key code
|
||||
ldx #0 ; MSB of return value is zero
|
||||
rts
|
||||
|
||||
.endproc
|
||||
Reference in New Issue
Block a user