a7042ddbe4
Use wrappers to call the kernal in bank 15 instead of implementing kernal functionality within the cc65 libs (eats performance but is much smaller and simpler). Improved startup/shutdown code allows a return to the system bank without calling the BASIC cold start vector. git-svn-id: svn://svn.cc65.org/cc65/trunk@2793 b7a2c559-68d2-44c3-8de9-860c34a00d81
30 lines
410 B
ArmAsm
30 lines
410 B
ArmAsm
;
|
|
; Ullrich von Bassewitz, 2003-12-20
|
|
;
|
|
; int kbhit (void);
|
|
;
|
|
|
|
.export _kbhit
|
|
|
|
.importzp sysp0
|
|
.import return0, return1
|
|
|
|
.include "cbm610.inc"
|
|
|
|
.proc _kbhit
|
|
ldx IndReg
|
|
lda #$0F
|
|
sta IndReg
|
|
ldy #$D1 ; Number of keys in kbd buffer
|
|
lda (sysp0),y
|
|
stx IndReg
|
|
bne L1
|
|
jmp return0
|
|
L1: jmp return1
|
|
.endproc
|
|
|
|
|
|
|
|
|
|
|
|
|