trld - convert/combine TRS-80 executables
trld reads one or more TRS-80 programs in .cmd, .cas, .hex or .bas format and saves them as a single .cmd, .cas or .hex file. It supports 250, 500 and 1500 baud .cas cassette image files as well as tokenized and ASCII .bas BASIC program files. Source code for Windows is included; only small changes will be required for other operating systems. These program loading routines are the same ones used in my TRS-80 Model I/III emulator.
trld is a command-line tool. It takes a list of files. The last one is the output file, the rest are loaded in sequence and combined together to form the output. The format of the input files is determined automatically. The output format is chosen depending on the file suffix. For example, to convert a high-speed (1500 baud) cassette file to a .cmd (disk executable format) you would type:
trld original.cas original.cmd
With multiple input files the program start address is taken from the last file. For ".cas" output the name of the SYSTEM file is based on the first 6 letters of the output file name. With
trld file.cmd ..\converted\out.cas
The "..\converted\out.cas" file will be called "OUT" and that's the name you must pass to the SYSTEM command. If you're using Play CAS, it tells you the tape file's name.
While BASIC programs can be loaded, their output is in the form of an executable which will work on a cassette-based TRS-80 Model 3 as a load address is hard-coded. This is odd and unlikely to be useful to many. This can be suprising as you might expect:
trld file.bas file.cas
To output a cassette image file that you load with "CLOAD" but instead get something that loads with "SYSTEM". Converting BASIC programs between different formats is pretty easy but might best be a job for a different utility program.
George Phillips, September 11, 2009. gp2000 -at- shaw.ca