Machine Code Monitor
A machine code monitor (aka machine language monitor or computer code monitor, short monitor) is a software program that allows a user to observe the status of a computer from a low-level language perspective. In addition to monitoring, users are able to manipulate memory locations using machine code commands, as well as load/save data from/to a secondary storage device. Some Commodore computers (C128, C16, C116, Plus/4) have built-in machine code monitors, while others (VIC-20, C64) require additional programs.
Early computers could only use line-printers to display the status of a computer. Later, when the computer monitor became a viable option for dynamically displaying the status of a computer, software was used to allow the user to monitor this status. Machine code monitors therefore became very popular from the start of the home computer era of the 1970s. Some of these machine code monitors were available as firmware, some as third-party hardware and some as software. The first machine code monitors had no symbolic assembly language capability, and all translation between machine code and assembly language was achieved by the programmer. Even once multi-feature assemblers became more readily available, a machine code monitor remained indispensable for debugging programs. The general decline of assembly language software written from scratch has made the use of a machine code monitor somewhat of a lost art. Nevertheless, the use of machine code monitors persists; especially in the area of hobby-built computers.
Long data strings of numbers and letters could be difficult to visualise as a program and inevitably some debugging would be required. A common technique when writing machine code programs was to set a halt in the machine code program. Generally this was using the break instruction
00 (which was later represented as BRK in three-letter mnemonic assembly language). When the CPU encountered this breakpoint, the program would be interrupted and control would be transferred to the machine code monitor. Typically this would trigger a register dump and then the monitor would await programmer input. Activities at this point might include examining memory contents, changing code and/or perhaps altering the processor registers prior to restarting the program.
- View and change CPU status (such as registers and flags).
- Program run at a desired address.
- View and modify memory areas, typically in different formats (such as hex dump, PETSCII, and Sprite data)
- Save/Load into a memory area to/from a secondary storage device.
- Value/pattern/string fill.
- Value/pattern/string search.
- Set breakpoints.
- Tracing/Single Stepping.
- Search using address ranges.
- Number conversions.
- Calculation of arithmetic and logical expressions.
- Moving memory areas.
- Moving machine code with adjustment of the absolute references.
- Insert/delete machine code instructions in existing program with adjustment of the absolute references.
- Input/output functions for printers/mass storage/floppy disk drive.
- Repair BASIC vectors or BASIC programs.
- Sprite functions.
Monitors need to run in text mode and not in a GUI. Although this does not matter for an emulated environment, on original hardware the memory use is so restrictive that the most basic display mode of the CPU is required.
Commodore Specific Monitors
||Jim Butterfield, Compute! Magazine, January 1983, Issue 32, Page 162|
||Jim Butterfield, Transactor, Volume 6, Issue 4, Disk 9|| - Compatible with TEDMON |
- Sits below $A000
|RAT MON 64||Software re-load||4KB||
||CHIP Magazine, January 1984|
||64er Magazine, February 1985|
|MADS Monitor||Software re-load||4KB||
||Commodore, 1982||part of the Macro Assembler Development System|
|MLM64 Plus||Software re-load||4KB||
||INPUT 64 Magazine, March 1985|
||MC Magazine, October 1983||TIM clone|
||Commodore||BASIC 3.5, BASIC 7.0|
||Commodore||SYS call depends upon model|
|Final Cartridge 3||Plug-in module||
||RISKA B.V. Home & Personal Computers|
|Action Replay||Plug-in module||
|Help||Plug-in module re-load||and|
|Help Plus||Plug-in module re-load||and|
|EMON||Plug-in module re-load||4KB||
|SpeedDOS plus||EPROM||Elektronik Service|
and or |
|GNU General Public License||PC-based software|
- Compute! Issue 32, Jan. 1983, p. 162: Supermon64
- Transactor Disk 9 includes Supermon+ for C64, VIC-20 and PET.
- The built-in machine code monitor, accessed 28 October 2014.