Download Print this page

Radio Shack TRS-80 Model II Reference Manual page 253

Disk operating system
Hide thumbs Also See for TRS-80 Model II:

Advertisement

BC
Technical Information
Programming with TRSDOS
This section tells you how to execute your own machine-language programs
under TRSDOS.
It
includes two sections:
• Program Entry Conditions- how control is transferred to your program
after it is loaded from disk.
• Handling Programmed Interrupts- how to write an interrupt service
routine for
key processing and TIMER interrupts.
To create and use a program:
1. Enter the program into memory, either with DEBUG. an assembler, or via
the serial interface channel from another device.
2. Use the DUMP command to save the program as an executable disk file,
setting load and transfer addresses.
3. To run the program, input the file name to the TRSDOS command
interpreter (TRSDOS READY mode).
Program Entry Conditions
Upon entry to your program, TRSDOS sets up the following registers:
=
Address of first byte following your program, i.e., the first free
byte for use by your program
DE
=
Highest memory address not protected byTRSDOS, i.e., the end of
memory which can be used by your program
HL
=
Address of buffer containing the last command entered to the TRSDOS
command interpreter. The first byte of the buffer contains the length of the
command line, not including the carriage return. The text of the command
follows this length byte. For example:
length
1st byte 2nd byte
of text
of com-
of com-
n
mand
mand
X'OD'
289

Advertisement

loading