
A machine code monitor (
machine language
In computer programming, machine code is computer code consisting of machine language instructions, which are used to control a computer's central processing unit (CPU). For conventional binary computers, machine code is the binaryOn nonb ...
monitor) is
software
Software consists of computer programs that instruct the Execution (computing), execution of a computer. Software also includes design documents and specifications.
The history of software is closely tied to the development of digital comput ...
that allows a user to enter commands to view and change
memory locations on a
computer
A computer is a machine that can be Computer programming, programmed to automatically Execution (computing), carry out sequences of arithmetic or logical operations (''computation''). Modern digital electronic computers can perform generic set ...
, with options to load and save memory contents from/to
secondary storage
Computer data storage or digital data storage is a technology consisting of computer components and Data storage, recording media that are used to retain digital data. It is a core function and fundamental component of computers.
The cent ...
. Some full-featured machine code monitors provide detailed control ("single-stepping") of the execution of machine language programs (much like a
debugger
A debugger is a computer program used to test and debug other programs (the "target" programs). Common features of debuggers include the ability to run or halt the target program using breakpoints, step through code line by line, and display ...
), and include absolute-address
code assembly and
disassembly
A disassembler is a computer program that translates machine language into assembly languageāthe inverse operation to that of an assembler. The output of disassembly is typically formatted for human-readability rather than for input to an asse ...
capabilities.
Motorola published the
MIKBUG ROM monitor for the 6800 in 1973 and the BUFFALO ROM monitor for the
68HC11.
Machine code monitors became popular during the
home computer
Home computers were a class of microcomputers that entered the market in 1977 and became common during the 1980s. They were marketed to consumers as affordable and accessible computers that, for the first time, were intended for the use of a s ...
era of the 1970s and 1980s and were sometimes available as resident
firmware
In computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, h ...
in some computers (e.g., the built-in monitors in the
Commodore 128
The Commodore 128, also known as the C128, is the last 8-bit home computer that was commercially released by Commodore Business Machines (CBM). Introduced in January 1985 at the CES in Las Vegas, it appeared three years after its predecessor, t ...
,
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
In engineering, debugging is the process of finding the Root cause analysis, root cause, workarounds, and possible fixes for bug (engineering), bugs.
For software, debugging tactics can involve interactive debugging, control flow analysis, Logf ...
programs. The usual technique was to set break points in the code undergoing testing (e.g., with a
BRK instruction in
6502
The MOS Technology 6502 (typically pronounced "sixty-five-oh-two" or "six-five-oh-two") William Mensch and the moderator both pronounce the 6502 microprocessor as ''"sixty-five-oh-two"''. is an 8-bit microprocessor that was designed by a small ...
assembly language
) and start the program. When the
microprocessor
A microprocessor is a computer processor (computing), processor for which the data processing logic and control is included on a single integrated circuit (IC), or a small number of ICs. The microprocessor contains the arithmetic, logic, a ...
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.
In most systems where higher-level languages are employed,
debugger
A debugger is a computer program used to test and debug other programs (the "target" programs). Common features of debuggers include the ability to run or halt the target program using breakpoints, step through code line by line, and display ...
s 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.{{Cn, date=August 2023
References
*
Microcomputer software