Model I TRSDOS Disk BASIC Commands
Model I TRSDOS Disk BASIC contained a number of extra commands and enhancements to Level II BASIC, not all related to disk. The commands were documented in the TRSDOS 2.3 Reference Manual. All other TRS-80 operating systems with a Disk BASIC supported these commands, although often CMD and NAME used different syntax.
Language Enhancements
These extra BASIC commands had nothing to do with disk, but were useful enhancements. All of the commands were built on hooks in the Level II BASIC ROM reserved for future use by Level III BASIC. This explains the ?L3 ERROR you receive if you attempt to invoke them from cassette BASIC.
Command | Description |
---|---|
&H | hexadecimal constant prefix |
&O | octal constant prefix |
CMD “D” | enable and load the debugger |
CMD “I” | return a command to TRSDOS |
CMD “R” | enable interrupts |
CMD “S” | return normally to TRSDOS |
CMD “T” | disable interrupts |
DEF FN | define an implicit BASIC statement function |
DEF USR n | define the entry point for an external machine-language routine (n = 0 to 9) |
INSTR | find substring in source string |
LINE INPUT | input a line from the keyboard |
MID$= | replace portion of target string |
NAME | renumber a program (BASICR only) |
TIME$ | get date and time |
USR n | call external routine (n = 0 to 9, previously defined with DEF USR) |
File manipulation
These commands were used for loading and saving BASIC program files.
Command | Description |
---|---|
KILL “filename” | delete a program or data file from the disk |
LOAD “program” | load a BASIC program from disk |
MERGE “program” | merge an ASCII BASIC program on disk with the program in memory |
RUN “program” | load and execute a BASIC program stored on disk |
SAVE “program” | save the BASIC program in memory onto disk |
File access
These commands could read from and write to disk files, providing both sequential and random access.
Command | Description |
---|---|
OPEN | open a file for access |
CLOSE | close an open file |
INPUT# | read from disk (sequential mode) |
LINE INPUT# | read a line of data from disk (sequential mode) |
PRINT# | write to disk (sequential mode) |
GET | read from disk (random access mode) |
PUT | write to disk (random access mode) |
FIELD | assign field names and sizes to a random access file buffer |
LSET | place value in specified buffer, right padded with spaces |
RSET | place value in specified buffer, left padded with spaces |
CVD | restore double-precision number to numeric form after GET from disk |
CVI | restore integer number to numeric form after GET from disk |
CVS | restore single-precision number to numeric form after GET from disk |
EOF | determine if end-of-file encountered |
LOF | return number of last record in file |
MKD$ | convert double-precision number to string before it is PUT to disk |
MKI$ | convert integer number to string before it is PUT to disk |
MKS$ | convert single-precision number to string before it is PUT to disk |
Dirk Martin says:
Ah…these were the good ‘ol days.
Still got my Model I and Model III.
Both work fine.