Merge branch 'master' into master
This commit is contained in:
@@ -39,7 +39,7 @@ _cputcxy:
|
||||
ldx CHARCOLOR
|
||||
cpx OLD_CHARCOLOR
|
||||
beq do_not_change_color_foreground
|
||||
|
||||
|
||||
stx OLD_CHARCOLOR ; Store CHARCOLOR into OLD_CHARCOLOR
|
||||
|
||||
|
||||
@@ -93,9 +93,9 @@ do_not_change_color:
|
||||
CHARCOLOR:
|
||||
.res 1
|
||||
OLD_CHARCOLOR:
|
||||
.res 1
|
||||
.res 1
|
||||
BGCOLOR:
|
||||
.res 1
|
||||
.res 1
|
||||
OLD_BGCOLOR:
|
||||
.res 1
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
.import __MAIN_START__, __MAIN_SIZE__
|
||||
|
||||
.include "zeropage.inc"
|
||||
.include "telestrat.inc"
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
; Place the startup code in a special segment.
|
||||
|
||||
17
libsrc/telestrat/kbhit.s
Normal file
17
libsrc/telestrat/kbhit.s
Normal file
@@ -0,0 +1,17 @@
|
||||
;
|
||||
; Jede, 2021-02-01
|
||||
;
|
||||
; int kbhit (void);
|
||||
;
|
||||
|
||||
.export _kbhit
|
||||
|
||||
.include "telestrat.inc"
|
||||
|
||||
_kbhit:
|
||||
BRK_TELEMON XRD0
|
||||
ldx #$00
|
||||
txa
|
||||
rol
|
||||
eor #$01
|
||||
rts
|
||||
@@ -13,11 +13,11 @@
|
||||
sta ptr3
|
||||
stx ptr3+1 ; save count as result
|
||||
|
||||
eor #$FF
|
||||
sta ptr2
|
||||
txa
|
||||
eor #$FF
|
||||
sta ptr2+1 ; remember -count-1
|
||||
inx
|
||||
stx ptr2+1
|
||||
tax
|
||||
inx
|
||||
stx ptr2 ; save count with each byte incremented separately
|
||||
|
||||
jsr popptr1 ; get buf
|
||||
jsr popax ; get fd and discard
|
||||
@@ -51,9 +51,9 @@ next:
|
||||
rts
|
||||
|
||||
|
||||
L1: inc ptr2
|
||||
L1: dec ptr2
|
||||
bne L2
|
||||
inc ptr2+1
|
||||
dec ptr2+1
|
||||
beq L9
|
||||
L2: ldy #0
|
||||
lda (ptr1),y
|
||||
|
||||
Reference in New Issue
Block a user