Small fixes

This commit is contained in:
Joppe Blondel
2026-10-10 14:07:05 +02:00
parent 7d7ab196c3
commit ff5918b1ab
+18 -3
View File
@@ -4577,6 +4577,8 @@ FULLCPY:
LD HL,0100H ; Program and variables start here
LD (BASTXT),HL
DEC HL ; RUN starts one byte before the program
LD (HL),A ; Install its zero end-of-line sentinel
LD HL,FULLMSG ; Announce the alternate layout
CALL PRS
@@ -4743,6 +4745,8 @@ CLPRINTHEADER:
call PRS
pop hl
call PRS
ld hl,CLCLRF ; keep block progress off the filename line
call PRS
pop de
pop bc
ret
@@ -4796,9 +4800,9 @@ CLREADBLOCK:
push hl ; preserve the first copy
ld a,'.' ; block read correctly
call OUTC
ld a,'o' ; skip redundant copy
call OUTC
call BIOS_CAS_READ_BLOCK_DRY
ld a,'o' ; redundant copy has been skipped
call OUTC
jr 2$
3$: ld a,'x' ; block failed, try redundant block
call OUTC
@@ -4911,7 +4915,16 @@ CSAVEB: inc hl ; skip #
pop de ; start address
push hl
ld a,TAPE_TYPE_BINARY
CSOUT: call CSWRITEHEADER ; bc = block count, preserves de
CSOUT: push af ; preserve the header type
push bc ; preserve the exact file length
push de ; preserve the data source address
ld hl,CSSTARTMSG ; ask the user to start recording
call PRS ; print the prompt
call BIOS_GETC ; wait until the user is ready
pop de ; restore the data source address
pop bc ; restore the exact file length
pop af ; restore the header type
call CSWRITEHEADER ; bc = block count, preserves de
call CSWRITEBLOCKS
ld hl,CLCLRF
call PRS
@@ -4920,6 +4933,8 @@ CSOUT: call CSWRITEHEADER ; bc = block count, preserves de
pop bc
ret
CSSTARTMSG: .db "Record tape, then press a key...",0ah,0dh,00h
; -------------------------------------------------------
; Build and write a header and its redundant copy
; needs bc (file length in bytes)