# Machine code monitor

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Machine_code_monitor
> Markdown URL: https://mediated.wiki/source/Machine_code_monitor.md
> Source: https://en.wikipedia.org/wiki/Machine_code_monitor
> Source revision: 1293554450
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Software that was popular during the home computer era of the 1970s and 1980s

Machine code monitor in a [W65C816S](/source/WDC_65C816) [single-board computer](/source/Single-board_computer), displaying [code disassembly](/source/Disassembler), as well as processor register and memory dumps

[Apple II](/source/Apple_II) [6502](/source/MOS_Technology_6502) machine code monitor

A **machine code monitor** (a.k.a. [machine language](/source/Machine_language) monitor) is [software](/source/Software) that allows a user to enter commands to view and change [memory locations](/source/Memory_address) on a [computer](/source/Computer), with options to load and save memory contents from/to [secondary storage](/source/Secondary_storage). Some full-featured machine code monitors provide detailed control ("single-stepping") of the execution of machine language programs (much like a [debugger](/source/Debugger)), and include absolute-address [code assembly](/source/Assembly_language#Assembler) and [disassembly](/source/Disassembler) capabilities.

Motorola published the [MIKBUG](/source/MIKBUG) ROM monitor for the 6800 in 1973 and the BUFFALO ROM monitor for the [68HC11](/source/Motorola_68HC11).

Machine code monitors became popular during the [home computer](/source/Home_computer) era of the 1970s and 1980s and were sometimes available as resident [firmware](/source/Firmware) in some computers (e.g., the built-in monitors in the [Commodore 128](/source/Commodore_128), [Heathkit H89](/source/Zenith_Z-89) and Zenith laptops). Often, computer manufacturers rely on their ROM-resident monitors to permit users to reconfigure their computers following installation of upgrade hardware, such as expanded main memory, additional disk drives, or different video displays.

It was not unheard of to perform all of one's programming in a monitor in lieu of a full-fledged symbolic assembler. Even after full-featured assemblers became readily available, a machine code monitor was indispensable for [debugging](/source/Debugging) programs. The usual technique was to set break points in the code undergoing testing (e.g., with a [BRK](/source/BRK) instruction in [6502](/source/MOS_Technology_6502) assembly language[1][2][3]) and start the program. When the [microprocessor](/source/Microprocessor) encountered a break point, the test program would be [interrupted](/source/Interrupt) and control would be transferred to the machine code monitor. Typically, this would trigger a [register dump](/source/Processor_register) and then the monitor would await programmer input. Activities at this point might include examining memory contents, [patching code](/source/Patch_(computing)) and/or perhaps altering the processor registers prior to restarting the test program.

In most systems where higher-level languages are employed, [debuggers](/source/Debugger) are used to present a more abstract and friendly view of what is happening within a program. However, the use of machine code monitors persists, especially in the area of [hobby-built computers](/source/Hacker_culture#Home_computing_enthusiasts).[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed)*]

## References

1. **[^](#cite_ref-1)** R.J. Tocci & L.P. Laskowski (1979). [*Microprocessors and Microcomputers: Hardware and Software*](https://archive.org/details/microprocessorsm00tocc/page/379). Prentice-Hall. p. [379](https://archive.org/details/microprocessorsm00tocc/page/379). [ISBN](/source/ISBN_(identifier)) [9780135813225](https://en.wikipedia.org/wiki/Special:BookSources/9780135813225).

1. **[^](#cite_ref-2)** L.A. Leventhal (1986). *6502 Assembly Language Programming*. Osborne/McGraw-Hill. [ISBN](/source/ISBN_(identifier)) [9780078812163](https://en.wikipedia.org/wiki/Special:BookSources/9780078812163).

1. **[^](#cite_ref-3)** A.F. Kuckes & B.G. Thompson (1987). *Apple II in the Laboratory*. UP Archive. p. 93. [ISBN](/source/ISBN_(identifier)) [9780521321983](https://en.wikipedia.org/wiki/Special:BookSources/9780521321983).

---
Adapted from the Wikipedia article [Machine code monitor](https://en.wikipedia.org/wiki/Machine_code_monitor) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Machine_code_monitor?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
