TRS-80 DOS - NEWDOS/80 v2.0 for the Model III - Disassembled

Overview

Disassembly Highlights

This page serves as the index for the commented disassembly of the NEWDOS/80 v2.0 system files. Over time, this section will be populated with summary highlights for each system file/overlay.

SYS Files and their Purposes

DOS-Related

BOOT/SYS

Must occupy the first granule of every diskette. On data diskettes this file serves only to reject an attempt to boot using this diskette in drive 0. On system diskettes, the first sector contains the machine code for loading the DOS system from the drive 0 diskette when a power on, reset or jump to location 0 occurs. On NEWDOS/80 system diskettes, the 2nd sector is a duplicate of the first (required for booting on the Model III), and the 3rd sector contains system control information set up by the DOS commands SYSTEM and PDRIVE. FORMAT or the format part of COPY creates this file automatically.

A detailed, commented disassembly of BOOT/SYS can be found here.

SYS0/SYS

DOS's resident module loaded by the bootstrap routine and remains permanently in main memory, except for the DOS initialization routines in the overlay area which are overlaid when no longer needed. SYS0/SYS handles DOS initialization, disk I/O, clock interrupts, load of other system modules, keyboard intercept, etc.

A detailed, commented disassembly of SYS0/SYS can be found here.

SYS1/SYS

Interrogates DOS commands. It routes Supervisor Calls (RST 28H) from programs and BASIC, parses command lines into uppercase, matches against the command table at 4F6FH (with abbreviation support), and dispatches via SVC sub-functions or direct jumps. It manages "NEWDOS/80 READY" and "MINI-NEWDOS/80 READY" prompts, NMI/BREAK handling for program interruption, filename parsing/validation, and drive prefix insertion.

A detailed, commented disassembly of SYS1/SYS can be found here.

SYS2/SYS

Creates files, opens FCBs, allocates file space, allocates FDEs, encodes passwords and loads users programs to be run. Executor for library commands RENAME and LOAD.

A detailed, commented disassembly of SYS2/SYS can be found here.

SYS3/SYS

Closes FCBs, kills files, insert/deletes entries from 25ms chain. Executor for library commands BLINK, BREAK, CLOCK, DEBUG, JKL, LCDVR, LC, VERIFY and most of PURGE.

A detailed, commented disassembly of SYS3/SYS can be found here.

SYS4/SYS

Displays DOS error messages.

A detailed, commented disassembly of SYS4/SYS can be found here.

SYS5/SYS

DEBUG facility.

A detailed, commented disassembly of SYS5/SYS can be found here.

SYS6/SYS

Executor for library commands FORMAT, COPY and APPEND.

A detailed, commented disassembly of SYS6/SYS can be found here.

SYS7/SYS

A detailed, commented disassembly of SYS7/SYS can be found here.

SYS8/SYS

Executor for library commands DIR and FREE.

A detailed, commented disassembly of SYS8/SYS can be found here.

SYS9/SYS

Executor for library commands BASIC2, BOOT, CHAIN, CHNON, MDCOPY, PAUSE and STMT. Enqueues and dequeues user logical routines and routes each invocation.

A detailed, commented disassembly of SYS9/SYS can be found here.

SYS14/SYS

Executor for CLEAR, CREATE, ERROR, LIST, PRINT and ROUTE.

A detailed, commented disassembly of SYS14/SYS can be found here.

SYS15/SYS

Executor for FORMS and SETCOM.

A detailed, commented disassembly of SYS15/SYS can be found here.

SYS16/SYS

Executor for most of PDRIVE.

A detailed, commented disassembly of SYS16/SYS can be found here.

SYS17/SYS

Executor for WRDIRP and most of SYSTEM.

A detailed, commented disassembly of SYS17/SYS can be found here.

BASIC-Related

BASIC/CMD

NEWDOS/80 v2.0 Implementation of BASIC.

A detailed, commented disassembly of BASIC/CMD can be found here.

SYS10/SYS

Executes BASIC statement's GET and PUT statements and must be on the system diskette if either statement is to be executed.

A detailed, commented disassembly of SYS10/SYS can be found here.

SYS11/SYS

Executor of the BASIC direct command RENUM. Must be present if RENUM will be used.

A detailed, commented disassembly of SYS11/SYS can be found here.

SYS12/SYS

Executes BASIC direct command REF and has part of the PDRIVE code. Must be on the system diskette if REF will be executed.

A detailed, commented disassembly of SYS12/SYS can be found here.

SYS13/SYS

Displays BASIC's error messages and executes 1st part of RENUM. Must be on the system diskette whenever BASIC is active.

A detailed, commented disassembly of SYS13/SYS can be found here.

SYS18/SYS

BASIC direct statement executor. Must be on the system diskette whenever BASIC is active.

A detailed, commented disassembly of SYS18/SYS can be found here.

SYS19/SYS

Executor for BASIC statements LOAD, RUN, MERGE, SAVE and CMD"F"DELETE. Must be on the system diskette whenever BASIC is active.

A detailed, commented disassembly of SYS19/SYS can be found here.

SYS20/SYS

Executor for a number of disk BASIC statements and usually is the module resident when BASIC is executing a program. Must be on the system diskette whenever BASIC is active..

A detailed, commented disassembly of SYS20/SYS can be found here.

SYS21/SYS

Executor for CMD"O" and must be on the system diskette if CMD"O" will be executed..

A detailed, commented disassembly of SYS21/SYS can be found here.