To enter the machine code monitor type TIM
at the basic prompt.
D <start address> <end address>
The D
command is used to disassemble machine code instructions. It allows you to view the assembly instructions corresponding to a range of memory addresses.
To use this command, provide the start and end addresses of the memory range you want to disassemble. For example, D C000 C100
would disassemble the machine code instructions between memory addresses C000
and C100
.
G [<address>]
The G
command is used to jump to a specific memory address and start executing the machine code instructions from that address.
To use this command, you can provide an optional address parameter. If you specify an address, the program will jump to that address and start executing from there. If no address is provided, the program will use the address shown in the register display.
Please note that in order for the execution to return to the monitor, the machine code program must end with a BRK
instead of a RTS
. Without a break instruction the program execution may continue indefinitely or result in unexpected behavior.
H <start address> <end address> <byte> [<byte>]...
The H
command is used to search for specific bytes in memory. It lists all addresses in the given range that contain the specified byte pattern.
To use this command, provide the start and end addresses of the memory range to search within, followed by the byte or bytes you want to find. For example, H C000 D000 BB
would search for occurrences of the byte BB
in the memory range between addresses C000
and D000
.
You can also search for multiple bytes by providing additional bytes separated by spaces. For example, H C000 D000 12 34 AB
would search for occurrences of the byte pattern 12 34 AB
in the specified memory range.
L ["<filename>"[,<drive>]]
The L
command is used to load machine code into memory from a file.
To use this command, provide the filename of the binary file you want to load and a two digit drive number. For example, L "PROGRAM.PRG",08
would load the machine code from the file "PROGRAM.PRG" into memory from drive 8.
To load from cassette you can omit the drive number or use drive 01. If you also omit the filename it will load the first program from tape.
M <start address> <end address>
The M command displays the contents of memory, allowing you to view and edit the values stored at specific addresses. You can overwrite values and press return on the line to save the changes.
To use this command, provide the start and end addresses of the memory range you want to display. For example, M C000 C100
would display the memory contents between addresses C000
and C100
.
R
The R
command displays the values of the CPU registers, allowing you to view and edit their current state
To use this command, simply enter R
and the register values will be displayed on the screen. You can overwrite a value and press return to save the changes.
S "[<logical file number>:]<filename>",<drive>,<start address>,<end address>
The S
command is used to save a range of memory to a file. It allows you to specify the filename, drive, and memory range for the save operation.
To use this command, provide the following parameters:
"[<logical file number>:]<filename>"
: Specify the filename in quotes and optionally include the logical file number (default is 0). For example,"0:PROGRAM.PRG"
specifies the filename as "PROGRAM.PRG" and the logical file number as 0.<drive>
: Specify the drive number using two digits. For example,08
represents the first disk drive,01
represents the cassette.<start address>
: Specify the start address of the memory range to save.<end address>
: Specify the end address of the memory range to save.
For example, S "0:PROGRAM.PRG",08,C000,C100
would save the memory contents between addresses C000
and C100
to the file "PROGRAM.PRG" on drive 8.
T <start> <end> <new start>
The T
command is used to copy bytes from one memory location to another.
To use this command, provide the start and end addresses of the memory range you want to copy, followed by the address to where the bytes will be written.
For example, T C000 C200 C550
would copy the bytes from addresses C000
to C200
into the new memory location starting at address C550
.
X
The X
command is used to exit the machine code monitor and return to the BASIC prompt.
To use this command, simply enter X
.