Cassette Status Description AH =00 No Errors AH = 01 Cyclic Redundancy Check (CRC) Error in Read Block AH =02 No Data Transitions AH =04 No Leader AH = 80 Invalid Command Note: The carry flag will be set on any error. AH Cassette Status Cassette Write The WRITE-BLOCK routine 'writes' a tape block onto the cassette tape. The :tape block is described in "Data Record Architecture" later in this section. The WRITE-BLOCK routine 'turns on' the cassette drive motor and' writes' the leader (256 bytes of all l's) to the tape, 'writes' a synchronization bit (0), and then 'writes' a synchronization byte (ASCII character hex 16). Next, the routine 'writes' the number of data bytes specified by CX.
After each data block of 256 bytes, a 2-byte cyclic redundancy check (CRC) is , written'. The data bytes are taken from the memory location 'pointed' at by DS:BX. The WRITE-BLOCK routine 'disassembles' and 'writes' the byte a bit-at-a-time to the cassette. The method used is to • set' Timer 2 to the period of the desired data bit. The timer is 'set' to a period of 1.0 millisecond for a 1 bit and 0.5 millisecond for a 0 bit. 5-48 BIOS Cassette Logic