The timer is I set I to mode 3, which means the timer outputs a square wave with a period given by its count register. The timer's period is changed on the fly for each data byte I written I to the cassette. If the number of data bytes to be I written I is not an integral multiple of 256, then, after the last desired data byte from memory has been I written I , the data block is extended to 256 bytes of writing multiples of the last data byte. The last block is closed with two CRC bytes as usual. After the last data-block, a trailer consisting of four bytes of all 1 bits is I written I. Finally, the cassette motor is I turned off I , if there are no errors reported by the routine.
All 8259 interrupts are I disabled I during cassette-write operations. j-250/15 -j J I I Zero Bit ~500/15-1 J L...--I --lone Bit I.. 1000/15-------- __ 1 Cassette-Write Timing Chart Cassette Read The READ-BLOCK routine I turns on I the cassette drive motor and then delays for approximately 0.5 second to allow the motor to come up to speed. The READ-BLOCK routine then searches for the leader and must detect all 1 bits for approximately 1/4 of the leader length before it can look for the sync (0) bit. After the sync bit is detected, the sync byte BIOS Cassette Logic 5-49