The external IBM 5106 tape drive is identical to the one built in the IBM 5100
and IBM 5110 Model 1, and it can only be attached to these models as the 5110
Model 2 and the 5120 lack of some logic on the Base I/O card and perhaps some
routines in ROS. The recording media is the 3M
QIC cassette which is mechanically identical to the DC-600, DC-6150 and others.
Instead of using DC-300 cartridges one can also use DC-600 cartridges without problems. These have a longer tape and thus have a higher capacity, but the magnetical properties are similar enough that they can be used in the IBM drives without any problems.
The adapter of the tape drive is able to transfer the bits coming from tape
to the computer one at a time (per interrupt) or to gather eight of them and
transfering them as a byte. Depending on the mode of the adapter, i.e. whether it is
in bit mode or on byte mode, an interrupt will be generated after each bit or after
eight bit times. Writing is always done bitwise; the processor has to transfer the
bytes one bit at a time.
The drive is can read in forward direction as well as in backward direction. This is used e.g. to find the beginning of a file.
The adapter card for the internal tape drive is located on the Base I/O card H2 (see Cards). An externally connected drive has its own adapter as the control signals are not available on the external bus connectors.
The tape drive is recording onto two tracks and has therefore a two-track R/W head. In contrary to todays QIC tape streamers the tape is not recorded in serpentines, also because the two tracks already make use of the entire tape width. The top track contains format records, the bottom track contains header or data records.
A file on tape consists of a header record with information on the file and of data records with the file data. The number of data records is even due to the MARK command that marks tape files in multiples of 1kB, the minimum number is two. A format record on the upper track is written between each data record.
Format records that are recorded on the upper track indicate if the following record on the lower track is a header or a data record (see below). They also serve as a start/stop zone (like the sector gaps on diskettes) and as a means of synchronization.
The first 251 bytes have a value von $55 and are needed as start/stop zone.
The tape is accelerated or stopped within this zone and is therefore not running
with constant speed.
The next three bytes are $00, $00 and $E7; they are read one bit at a time until the I/O routines find one $00 and then one $E7. This way the I/O routine has synchronized itself to the data coming from the tape. After that the adapter is switched into byte mode.
Then come the ID byte for the lower track ($81 for header record, $18 for data record) and two bytes for the record number.
After 29 zero bytes there is again an ID byte and the three bytes $E7, $00 and $00, but this time in reverse order so that they can be identified while reading backwards.
The header record marks the beginning of a tape file. The first byte contains the file type like it is listed in the directory. Then come two bytes with the file number and two bytes with the actual file size (not the marked file size!). The other bytes of the record depend on the language used, but the contain the optional file name.
The actual file data is contained in the data records. After three synchronizing bytes (see above) comes a record ID byte ($81=header record, $42=end of data, $24=bad record, $18=data record). The 512 data bytes are following next and finally two CRC bytes (like diskette recording) and two zero bytes.