1
0
mirror of https://github.com/Klaus2m5/VTL02.git synced 2024-11-22 03:30:55 +00:00

fixed load/save with error causes a loop in prnum:

This commit is contained in:
Klaus2m5 2015-11-24 20:28:44 +01:00
parent bc79ed5c12
commit 30d970341a

View File

@ -1845,7 +1845,7 @@ skip_bs:
load: load:
lda #0 ; setup dma control block lda #0 ; setup dma control block
sta dma_cmd sta dma_cmd
sta gthan+1 ; return code upper byte = 0 sta arg+1 ; return code upper byte = 0
stx dma_dat ; program # stx dma_dat ; program #
lda #lo(prgm) ; from lda #lo(prgm) ; from
sta dma_dat sta dma_dat
@ -1856,7 +1856,7 @@ load:
lda #7 ; load eep command lda #7 ; load eep command
sta dma_cmd sta dma_cmd
lda dma_sta ; get status lda dma_sta ; get status
sta gthan sta arg
cmp #$17 cmp #$17
bne load_fail bne load_fail
lda dma_dat ; get end of program address lda dma_dat ; get end of program address
@ -1870,7 +1870,7 @@ load:
save: save:
lda #0 ; setup dma control block lda #0 ; setup dma control block
sta dma_cmd sta dma_cmd
sta gthan+1 ; return code upper byte = 0 sta arg+1 ; return code upper byte = 0
stx dma_dat ; program # stx dma_dat ; program #
lda #lo(prgm) ; from lda #lo(prgm) ; from
sta dma_dat sta dma_dat
@ -1883,11 +1883,11 @@ save:
lda #6 ; save eep command lda #6 ; save eep command
sta dma_cmd sta dma_cmd
lda dma_sta ; get status lda dma_sta ; get status
sta gthan sta arg
cmp #$16 cmp #$16
beq save_OK beq save_OK
load_fail: load_fail:
ldx gthan ; print error number ldx #arg ; print error number
jsr prnum jsr prnum
save_OK: save_OK:
jmp start jmp start