2008-10-13 10:42:49 +00:00
|
|
|
; KBD specific patches
|
|
|
|
|
2008-10-13 02:14:07 +00:00
|
|
|
.segment "CODE"
|
|
|
|
|
|
|
|
.ifdef KBD
|
2008-10-13 10:42:49 +00:00
|
|
|
VARTAB_MINUS_2_TO_AY:
|
2008-10-13 02:14:07 +00:00
|
|
|
lda VARTAB
|
|
|
|
sec
|
|
|
|
sbc #$02
|
|
|
|
ldy VARTAB+1
|
|
|
|
bcs LF42C
|
|
|
|
dey
|
|
|
|
LF42C:
|
|
|
|
rts
|
2008-10-13 10:42:49 +00:00
|
|
|
|
|
|
|
; ----------------------------------------------------------------------------
|
|
|
|
GET_UPPER:
|
|
|
|
lda INPUTBUFFERX,x
|
2008-10-13 02:14:07 +00:00
|
|
|
LF430:
|
2008-10-13 10:42:49 +00:00
|
|
|
cmp #'a'
|
2008-10-13 02:14:07 +00:00
|
|
|
bcc LF43A
|
2008-10-13 10:42:49 +00:00
|
|
|
cmp #'z'+1
|
2008-10-13 02:14:07 +00:00
|
|
|
bcs LF43A
|
|
|
|
LF438:
|
|
|
|
sbc #$1F
|
|
|
|
LF43A:
|
|
|
|
rts
|
2008-10-13 10:42:49 +00:00
|
|
|
|
|
|
|
; ----------------------------------------------------------------------------
|
2008-10-16 07:42:48 +00:00
|
|
|
GETLN:
|
2008-10-13 02:14:07 +00:00
|
|
|
ldx #$5D
|
|
|
|
LF43D:
|
|
|
|
txa
|
|
|
|
and #$7F
|
|
|
|
cmp $0340
|
|
|
|
beq LF44D
|
|
|
|
sta $0340
|
|
|
|
lda #$03
|
|
|
|
jsr LDE48
|
|
|
|
LF44D:
|
|
|
|
jsr LDE7F
|
|
|
|
bne RTS4
|
|
|
|
cpx #$80
|
|
|
|
bcc LF44D
|
|
|
|
RTS4:
|
|
|
|
rts
|
2008-10-13 10:42:49 +00:00
|
|
|
|
|
|
|
; ----------------------------------------------------------------------------
|
2008-10-13 02:14:07 +00:00
|
|
|
LF457:
|
|
|
|
lda TXTTAB
|
|
|
|
ldx TXTTAB+1
|
|
|
|
LF45B:
|
|
|
|
sta JMPADRS+1
|
|
|
|
stx JMPADRS+2
|
|
|
|
ldy #$01
|
|
|
|
lda (JMPADRS+1),y
|
|
|
|
beq LF438
|
|
|
|
iny
|
|
|
|
iny
|
|
|
|
lda (JMPADRS+1),y
|
|
|
|
dey
|
|
|
|
cmp $14
|
|
|
|
bne LF472
|
|
|
|
lda (JMPADRS+1),y
|
|
|
|
cmp $13
|
|
|
|
LF472:
|
|
|
|
bcs LF43A
|
|
|
|
dey
|
|
|
|
lda (JMPADRS+1),y
|
|
|
|
tax
|
|
|
|
dey
|
|
|
|
lda (JMPADRS+1),y
|
|
|
|
bcc LF45B
|
|
|
|
LF47D:
|
|
|
|
jmp (JMPADRS+1)
|
|
|
|
.endif
|