Brief description of Hobetta
The first 13 bytes are an exact copy of the original
header. Next two bytes of length in sec-
pax; because it is a multiple of 256, then the first one is always
zero, and the second is the number of sectors. And lastly-
Two bytes are the checksum. Count-
it is simple - all the previous ones are summed up
15 bytes, the number is multiplied by 257 and
the sum_of_numbers_from_0_to_14 is added i.e.
105.
Here is the procedure for Z80 Asm:
; to input de = header address
ld hl,0
ld b,15
m1: ld a,(de)
add a,l
ld l,a
jr nc,m2
inc h
m2:inc de
djnz m1
add a,h
ld h,a
ld c,105
add hl,bc ; hl = Hobeta sum
Mikhail Kondratyev
───────────────────
Share your thoughts about the article