Machine code monitor

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

Machine code monitor in a W65C816S single-board computer, displaying code disassembly, as well as processor register and memory dumps
Apple II 6502 machine code monitor

Machine code monitors became popular during the home computer era of the 1970s and 1980s and were sometimes available as resident firmware in some computers (e.g., the built-in monitors in the Commodore 128, Heathkit H89 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 programs. The usual technique was to set break points in the code undergoing testing (e.g., with a BRK instruction in 6502 assembly language[1][2][3]) and start the program. When the microprocessor encountered a break point the test 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, patching code and/or perhaps altering the processor registers prior to restarting the test program.

The general decline of scratch-written assembly language software has made the use of a machine code monitor somewhat of a lost art. In most systems where higher-level languages are employed, debuggers 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.

References

  1. R.J. Tocci & L.P. Laskowski (1979). Microprocessors and Microcomputers: Hardware and Software. Prentice-Hall. p. 379. ISBN 9780135813225.
  2. L.A. Leventhal (1986). 6502 Assembly Language Programming. Osborne/McGraw-Hill. ISBN 9780078812163.
  3. A.F. Kuckes & B.G. Thompson (1987). Apple II in the Laboratory. UP Archive. p. 93. ISBN 9780521321983.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.