This commit is contained in:
Michael Steil 2008-10-18 06:38:54 +00:00
parent 19e6867e20
commit a5f2c9ddcc
3 changed files with 50 additions and 47 deletions

37
kbd_loadsave.s Normal file
View File

@ -0,0 +1,37 @@
.segment "CODE"
SLOD:
ldx #$01
.byte $2C
PLOD:
ldx #$00
ldy CURLIN+1
iny
sty JMPADRS
jsr LFFD3
jsr VARTAB_MINUS_2_TO_AY
ldx #$02
jsr LFF64
ldx #$6F
ldy #$00
jsr LE39A
jsr LE33D
jmp CLEARC
.byte $FF,$FF,$FF
; ----------------------------------------------------------------------------
VER:
lda #$13
ldx FAC
beq LE397
lda $DFF9
LE397:
jmp FLOAT
LE39A:
lda VARTAB,x
clc
adc $051B,y
sta VARTAB,y
lda VARTAB+1,x
adc $051C,y
sta VARTAB+1,y
; !!! next instruction is an RTS!

View File

@ -50,12 +50,10 @@ QT_BREAK:
.byte CR,LF," Brk" .byte CR,LF," Brk"
.byte 0 .byte 0
.byte $54,$D0 ; ??? .byte $54,$D0 ; ???
.else .elseif .def(MICROTAN)
.ifdef MICROTAN
.byte CR,LF," BREAK" .byte CR,LF," BREAK"
.byte 0 .byte 0
.else .else
.byte CR,LF,"BREAK" .byte CR,LF,"BREAK"
.byte 0 .byte 0
.endif .endif
.endif

View File

@ -1,3 +1,5 @@
; MICROTAN has some nonstandard extension to LIST here
.segment "CODE" .segment "CODE"
MEMERR: MEMERR:
@ -298,49 +300,16 @@ L2405:
; ---------------------------------------------------------------------------- ; ----------------------------------------------------------------------------
.ifdef KBD .ifdef KBD
SLOD: .include "kbd_loadsave.s"
ldx #$01
.byte $2C
PLOD:
ldx #$00
ldy CURLIN+1
iny
sty JMPADRS
jsr LFFD3
jsr VARTAB_MINUS_2_TO_AY
ldx #$02
jsr LFF64
ldx #$6F
ldy #$00
jsr LE39A
jsr LE33D
jmp CLEARC
.byte $FF,$FF,$FF
; ----------------------------------------------------------------------------
VER:
lda #$13
ldx FAC
beq LE397
lda $DFF9
LE397:
jmp FLOAT
LE39A:
lda VARTAB,x
clc
adc $051B,y
sta VARTAB,y
lda VARTAB+1,x
adc $051C,y
sta VARTAB+1,y
.endif .endif
.ifdef CONFIG_2 .ifdef CONFIG_2
; !!! kbd_loadsave.s requires an RTS here!
RET3: RET3:
rts rts
.endif .endif
.if .def(CBM1) || .def(OSI) || .def(KIM) || .def(MICROTAN) .ifndef CONFIG_NO_INPUTBUFFER_ZP
L2420: L2420:
.ifdef OSI .ifdef OSI
jsr OUTDO jsr OUTDO
@ -386,7 +355,7 @@ INLIN2:
cmp #$0D cmp #$0D
beq L2453 beq L2453
.ifndef CONFIG_NO_LINE_EDITING .ifndef CONFIG_NO_LINE_EDITING
cmp #$20 ; line editing cmp #$20
bcc INLIN2 bcc INLIN2
.ifdef MICROTAN .ifdef MICROTAN
cmp #$80 cmp #$80
@ -397,7 +366,7 @@ INLIN2:
cmp #$40 ; @ cmp #$40 ; @
beq L2423 beq L2423
.ifdef MICROTAN .ifdef MICROTAN
cmp #$7F ; _ cmp #$7F ; DEL
.else .else
cmp #$5F ; _ cmp #$5F ; _
.endif .endif
@ -413,13 +382,13 @@ L2443:
sta INPUTBUFFER,x sta INPUTBUFFER,x
inx inx
.ifdef OSI .ifdef OSI
.byte $2C .byte $2C; XXX
.else .else
bne INLIN2 bne INLIN2
.endif .endif
L244C: L244C:
.ifndef CONFIG_NO_LINE_EDITING .ifndef CONFIG_NO_LINE_EDITING
lda #$07 lda #$07 ; BEL
jsr OUTDO jsr OUTDO
bne INLIN2 bne INLIN2
.endif .endif
@ -808,7 +777,7 @@ L25A6:
.else .else
.ifdef MICROTAN .ifdef MICROTAN
php php
jmp LE21C jmp LE21C ; patch
LC57E: LC57E:
.else .else
bcc L2581 bcc L2581
@ -821,7 +790,7 @@ L2581:
jsr FNDLIN jsr FNDLIN
.ifdef MICROTAN .ifdef MICROTAN
plp plp
beq LC598 beq L2598
.endif .endif
jsr CHRGOT jsr CHRGOT
.ifdef MICROTAN .ifdef MICROTAN
@ -833,11 +802,10 @@ L2581:
bne L2520 bne L2520
jsr CHRGET jsr CHRGET
.ifdef MICROTAN .ifdef MICROTAN
beq LC598 beq L2598
jsr LINGET jsr LINGET
beq L25A6 beq L25A6
rts rts
LC598:
.else .else
jsr LINGET jsr LINGET
bne L2520 bne L2520