msbasic/kim_loadsave.s

63 lines
1.3 KiB
ArmAsm
Raw Normal View History

2008-10-13 02:05:35 +00:00
.segment "CODE"
SAVE:
tsx
stx INPUTFLG
lda #$37
sta $F2
lda #$FE
sta $17F9
lda TXTTAB
ldy TXTTAB+1
sta $17F5
sty $17F6
lda VARTAB
ldy VARTAB+1
sta $17F7
sty $17F8
jmp L1800
ldx INPUTFLG
txs
lda #<QT_SAVED
ldy #>QT_SAVED
jmp STROUT
QT_LOADED:
.byte "LOADED"
.byte $00
QT_SAVED:
.byte "SAVED"
.byte $0D,$0A,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00
LOAD:
lda TXTTAB
ldy TXTTAB+1
sta $17F5
sty $17F6
lda #$FF
sta $17F9
2008-10-17 07:04:05 +00:00
lda #<L27A6
ldy #>L27A6
2008-10-17 07:34:52 +00:00
sta GORESTART+1
sty GORESTART+2
2008-10-13 02:05:35 +00:00
jmp L1873
2008-10-17 07:04:05 +00:00
L27A6:
2008-10-13 02:05:35 +00:00
ldx #$FF
txs
2008-10-17 07:04:05 +00:00
lda #<RESTART
ldy #>RESTART
2008-10-17 07:34:52 +00:00
sta GORESTART+1
sty GORESTART+2
2008-10-13 02:05:35 +00:00
lda #<QT_LOADED
ldy #>QT_LOADED
jsr STROUT
ldx $17ED
ldy $17EE
txa
bne L27C2
nop
L27C2:
nop
stx VARTAB
sty VARTAB+1
jmp FIX_LINKS