Download Print this page

Radio Shack TRS-80 Model II Reference Manual page 255

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

Advertisement

Technical Information
Program Files
In this section we will:
• Describe the required format and structure of program files.
• Summarize the procedure for writing a program file using
TRSDOS
file-access
SYC's.
• Present an illustrated sample program file.
Program File Format
A program file is stored on the diskette in blocks, which might look like this:
The lengths of the blocks will vary, depending on the type of block and the amount
of information in that block. The blocks must be contiguous: there can be no unused
bytes after the end of one block and the beginning of the next.
There are three major types of blocks:
1. Program data blocks. These contain the actual program data, prefixed by four
bytes of header information.
2. Comment blocks. These contain documentation for the programmer.
Comment blocks are not loaded or examined by the loader. Comment blocks are
prefixed by two bytes of header information.
3. Trailer blocks. Each program file ends with a trailer block. It !narks the end of
file and tells
TRSDOS
what to do after the file has been loaded - either to transfer
to a specified address, or to return to the caller. Trailer blocks are always four
bytes long.
291

Advertisement

loading