ibm PCjr — 5-50

(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 DS: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' into memory.

All 8259 interrupts are 'disabled' during the cassette- ' read' operations. Data Record Architecture The WRITE-BLOCK routine uses the following format to record a tape block onto a cassette tape: (CASSETTE TAPE BLOCK) Leader Sync Bit Sync Data Byte Block CRC Data Block CRC I Motor On I Motor Off Cassette Write- Block Format 5-50 BIOS Cassette Logic