csave-cload roundtrip irl works

This commit is contained in:
Joppe Blondel
2026-10-09 17:07:17 +02:00
parent a34ad82444
commit af3dcaf5fb
3 changed files with 52 additions and 9 deletions
+6 -4
View File
@@ -636,7 +636,7 @@ gen_byte:
; -------------------------------------------------------
gen_leader:
; short leader
ld b,50 ; generate 50 short pulses
ld b,100 ; generate 100 short pulses
1$:
call gen_short
dec b
@@ -644,7 +644,7 @@ gen_leader:
cp 0
jr nz,1$ ; repeat if not done
; long leader
ld b,50 ; generate 50 long pulses
ld b,100 ; generate 100 long pulses
2$:
call gen_long
dec b
@@ -669,8 +669,9 @@ gen_leader:
; Writes the block stored in the block buffer
; -------------------------------------------------------
write_block:
push de
push bc
push de
push hl
; calculate the crc16 over the block
ld hl, BLOCK_BUFFER
ld a, BLOCK_SIZE-2 ; dont use crc value in block
@@ -706,8 +707,9 @@ write_block:
ld a,200
call delay_ms
pop bc
pop hl
pop de
pop bc
ret
; -------------------------------------------------------
; Strings