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 shows the NewDos/80 Ready and Mini-NewDos/80 Ready prompts, reads a command line, converts it to upper case, looks the name up in the command table at 4F6FH, parses (and, where the command wants it, opens) the filespec, and starts the overlay function that carries the command out; a name that is not in the table is run as a program. It also handles DOS-CALL, MINI-DOS (MDRET, MDBORT), the exit after every command, filespec extraction, default extensions, and the LIB and CLS commands.

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, LC, VERIFY and most of PURGE. Sub-function 8 of its function E5H is not used on the Model III and returns error 2AH.

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

Executor for library commands TIME, DATE, AUTO, ATTRIB, PROT, DUMP, HIMEM and the 1st part of PURGE, SYSTEM and PDRIVE.

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 BOOT, CHAIN, CHNON, DO, MDCOPY, PAUSE and STMT, and the source of the keys a chain file gives the keyboard. Enqueues and dequeues named routines and runs each one called by *name.

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. It also holds the end of a diskette COPY, which SYS6/SYS jumps into to verify the destination diskette and bring its GAT up to date.

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 the BASIC direct command REF (lists the lines that use a variable, refer to a line number or hold a piece of text, or makes a full cross reference). 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" (the array sort) and for CMD"F=ERASE" and CMD"F=KEEP". Must be on the system diskette if these will be executed.

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