TRSDOS (which stands for the Tandy Radio Shack Disk Operating System) is the operating system for the Tandy TRS-80 line of eight-bit Zilog Z80 microcomputers that were sold through Radio Shack from 1977 through 1991.
Completely unrelated was a version of TRSDOS by Radio Shack for its TRS-80 Model II professional computer from 1979, also based on the Z80 and equipped with 8-inch disk drives.
The later machines in this line, the Models 12, 16 and 6000, used the Z80 as an alternate CPU to its main Motorola 68000 chip and could run this version of TRSDOS for backwards compatibility with older Z80 applications software.
The first version of TRSDOS, by Randy Cook, was so buggy that others wrote alternatives, including NewDOS and LDOS.
The original TRSDOS for the Model I supported only single-sided disks with 35 tracks formatted in single density (sectors are encoded using the frequency modulation technique).
Model III TRSDOS (culminating in version 1.3) supported 40-track disks formatted in double density (using modified frequency modulation).
Actually, a large hard drive could be formatted with more than eight partitions, but TRSDOS can only access eight during any one session.
The Model 4, with its ability to set up a ramdisk (Memdisk), also required a drive number assignment for this.
All versions of TRSDOS use overlays to satisfy most system requests and disk directories are not maintained in memory.
After the initial access this information is maintained in a File Control Block, the memory space for which is supplied by the calling application.
Since the user must not be burdened with the physical details of the storage devices themselves, it is the operating system's responsibility to translate file record access requests into specific drive, track, sector, and head parameters that pinpoint the storage location of each record.
For forty-cylinder disks formatted in double density, standard for the drives installed in the TRS-80 Models III and 4, the granule size is six 256-byte sectors, or 1.5 KB.
Search time is minimized by using a hashing technique to reduce the 11-character string formed from the file name and extension to a one byte value.
The hash table, being one sector in length, can index a maximum of 256 directory records or files.
This makes the access of files transparent to size or nature of the disk device within the scope of the parameters stored in the DCT for that drive.
Entire diskettes can also be assigned master passwords, which may limit user access via the BACKUP and PURGE commands.
Under TRSDOS and LDOS the system is never "logged in" to any current drive as with CP/M, PC DOS and MS-DOS.
Using the DIR directory command as an example: As seen, the dash character - is used to specify a range of drive numbers.
The DIR and CAT (catalog) commands display all file specifications (filespecs) matching the query on all drives.
File access requests issued by applications programs running under TRSDOS work the same way.
TRSDOS (version II) was notable for the inclusion of noise words, similar to the 1959 COBOL specification.
For example, the following commands functioned identically: Since TRSDOS does not have the notion of redirection for disk files as UNIX/Linux and MS-DOS do, the APPEND command is somewhat different in concept than the UNIX or MS-DOS notion of appending via output redirection.
TRSDOS/LS-DOS 6.x print jobs can be redirected (such as to a disk file) by applying the LINK or ROUTE commands to the system *PR device.
Many versions support a simple password security for files and programs, with separate Read/Execute and full access capabilities.
TRSDOS 6.x supports both Owner and User passwords (8 characters max) for disk files.
LS-DOS 6.3 uses the space for the User password for its extended dating scheme (past December 31, 1987).
Although MS-DOS owes its heritage most closely to CP/M and thence to TOPS-10, many of the file manipulation commands are similar to those of TRSDOS.
Some of the following TRSDOS commands exist on disk as distinct program files (DIR/CMD, FORMAT/CMD, BACKUP/CMD) while all others exist as modules condensed into the library files (technically Partitioned Data Sets or PDSs) SYS6/SYS, SYS7/SYS and SYS8/SYS; these include the TRSDOS commands CAT, COPY, LIST, REMOVE, RENAME etc.
Though simple, it demonstrates how an assembler source code is formatted and interacts with the display hardware through TRSDOS.