sync byte (ASCII character hex 16) is read.
If
the sync byte
is
read correctly, the data portion can be read.
If
a correct sync
byte
is
not
found, the routine goes back and searches for the
leader again. The data
is
read a bit at a time and assembled into
bytes. After each byte
is
assembled, it is written into memory at
location ES:BX and
BX
is
incremented by
1.
After each multiple of 256 data bytes
is
read, the
CRC
is read
and compared to the
CRC
generated.
If
a
CRC
error
is
detected,
the routine exits with the carry flag set to indicate an error and
the status of
AH
set to hex 01.
DX
contains the number of bytes
written to memory.
The time of day interrupt(IRQO)
is
disabled during the
cassette-read operation.
Data Record Architecture
The write-block routine uses the following format to record a tape
block onto a cassette tape.
Component
Description
Leader
256
Bytes (of All 1 's)
Sync Bit
One 0 Bit
Sync
Byte
ASCII Character Hex
16
Data Blocks
256
Bytes in Length
CRC
2 Bytes
for
each Data Block
Data Record Components
System BIOS
5-27