Search   
Home  Print View  

 

Specs

Branch Content

Tape Operations

Read

The READ operation is initiated by Software writing Mode READ to register C. An interrupt is asserted to confirm that mode has changed.

The Drive makes preparations to start reading the tape starting at the current tape position. If it happens to be in a GAP (as it is supposed to), reading starts at the first bit of the block following the GAP. If it is in a data zone instead, the Drive skips to the next GAP, then start reading the next block.

Once an entire byte has been decoded, it is copied to register D and an interrupt is asserted to notify that a byte is waiting for reading. The Software must act quickly to read that byte from D. This process continues, byte after byte, until a GAP is reached in which case the Drive automatically changes to Mode STOP and another interrupt is asserted to notify that.

Software can also abort the READ operation by writing Mode STOP to register C, which is not advisable in normal circumstances because then the tape would stop in data area instead of on a GAP. Software is expected to read an entire block into a buffer. Once the block has been read and the tape has stopped, Software is plenty of time to process that block for their own purposes.
  

Write

The WRITE operation is initiated by Software writing Mode WRITE to register C. An interrupt is asserted to confirm that mode has changed.

The Drive makes preparations to start writing starting at the current tape location. Unlike with READ operation, in this case the Drive does not check for GAPs.

Once the Drive is ready, it asserts an interrupt and Software responses by writing the first byte to register D. The Drive's circuitry senses this write operation and starts encoding and writing the byte to tape. Once finished, a new interrupt is asserted and Software writes the next byte to D in response.

This process continues until Software decides to finish. Normally this occurs when an entire block has been written. Software are then expected to write Mode Make GAP to register C. In response, the Drive let a GAP in the tape and STOPs automatically. An interrupt is asserted because the Mode changed (from Make GAP to STOP).

This completes the writing of a block on tape. Software will possibly initiate a new WRITE operation to write the next block.

A word about Block Length

We already mentioned that the Drive must be agnostic with respect to the tape format. This includes block length. As we can infer from the previous discussion, it is possible for Software to make blocks of variable lengths along the tape. Although this is not the must likely case (fixed-length blocks makes it easy for data manipulation), this specification does not put any restriction on that respect. Care about block length must laid in Software, no Drive's hardware.

LC-81 Homebrew Minicomputer -- this software is based on Help Books running at melissa