Added start of csave command and bios write block

This commit is contained in:
Joppe Blondel
2026-10-09 16:13:50 +02:00
parent c84b3fdc97
commit a34ad82444
4 changed files with 296 additions and 3 deletions
+28 -1
View File
@@ -106,6 +106,12 @@ boot_copy:
jp wait_silence
.ORG BIOS_CAS_READ_BLOCK_DRY
jp read_block_dry
.ORG BIOS_CAS_GET_BUFFER
jp get_buffer
.ORG BIOS_CAS_WRITE_BLOCK
jp write_block
.ORG BIOS_DELAY_MS
jp delay_ms
; -------------------------------------------------------
; BIOS ENTRY
@@ -528,6 +534,27 @@ bank:
out (SYSTEM_REGISTER),a
jr 2$
; -------------------------------------------------------
; Delay a certain miliseconds
; needs a (ms, zero returns immediately)
; uses b,c
; @1MHz each iteration takes 1000T plus 23T overhead
; -------------------------------------------------------
delay_ms:
or a ; 4T
ret z ; 5T when not taken
ld b,a ; 4T
1$:
ld c,61 ; 7T
2$:
dec c ; 4T
jr nz,2$ ; 12/7T, loop takes 971T
nop ; 4T
nop ; 4T
dec b ; 4T
jp nz,1$ ; 10T
ret
; -------------------------------------------------------
; Strings
; -------------------------------------------------------
@@ -536,4 +563,4 @@ msg_header: .db "BIOS v1.0 - Joppe Blondel",00dh,00ah,000h
; -------------------------------------------------------
; Other files
; -------------------------------------------------------
#include "tape.asm"
#include "tape.asm"