Instruction Step
   HOME

TheInfoList



OR:

An instruction step is a method of executing a
computer program A computer program is a sequence or set of instructions in a programming language for a computer to Execution (computing), execute. It is one component of software, which also includes software documentation, documentation and other intangibl ...
one step at a time to determine how it is functioning. This might be to determine if the correct
program flow In computer science, control flow (or flow of control) is the order in which individual Statement (computer science), statements, Instruction (computer science), instructions or function calls of an imperative programming, imperative computer pro ...
is being followed in the program during the execution or to see if variables are set to their correct values after a single step has completed.


Hardware instruction step

On earlier computers, a knob on the computer console may have enabled step-by-step execution mode to be selected and execution would then proceed by pressing a "single step" or "single cycle" button.
Program status word The program status word (PSW) is a register that performs the function of a status register and program counter, and sometimes more. The term is also applied to a copy of the PSW in storage. This article only discusses the PSW in the IBM System/3 ...
/
Memory Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembe ...
or general purpose register read-out could then be accomplished by observing and noting the console lights.


Software instruction step

On later platforms with multiple users, this method was impractical and so single step execution had to be performed using software techniques.


Software techniques

*
Instrumentation Instrumentation is a collective term for measuring instruments, used for indicating, measuring, and recording physical quantities. It is also a field of study about the art and science about making measurement instruments, involving the related ...
- requiring code to be added during compile or assembly to achieve statement stepping. Code can be added manually to achieve similar results in interpretive languages such as
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
. * instruction set simulation - requiring no code modifications for instruction or statement stepping In some software products which facilitate debugging of High level languages, it is possible to execute an entire HLL statement at a time. This frequently involves many machine instructions and execution pauses after the last instruction in the sequence, ready for the next 'instruction' step. This requires integration with the compilation output to determine the scope of each statement. Full
Instruction set simulator An instruction set simulator (ISS) is a simulation model (abstract), model, usually coded in a high-level programming language, which mimics the behavior of a mainframe or microprocessor by "reading" instructions and maintaining internal variables ...
s however could provide instruction stepping with or without any source, since they operate at machine code level, optionally providing full trace and debugging information to whatever higher level was available through such integration. In addition they may also optionally allow stepping through each assembly (machine) instruction generated by a HLL statement. Programs composed of multiple 'modules' compiled from a mixture of compiled languages, and even instructions created "on-the-fly" in dynamically allocated memory, could be accommodated using this technique.


Examples of programs providing 'Software' instruction step

* SIMMON an IBM internal test system which provided instruction stepping


References


See also

*
Instrumentation (computer programming) In computer programming, instrumentation is the act of modifying software so that analysis can be performed on it. Generally, instrumentation either modifies source code or binary code. Execution environments like the JVM provide separate interfa ...
*
Instruction set simulator An instruction set simulator (ISS) is a simulation model (abstract), model, usually coded in a high-level programming language, which mimics the behavior of a mainframe or microprocessor by "reading" instructions and maintaining internal variables ...
*
Program status word The program status word (PSW) is a register that performs the function of a status register and program counter, and sometimes more. The term is also applied to a copy of the PSW in storage. This article only discusses the PSW in the IBM System/3 ...
*
Instruction cycle The instruction cycle (also known as the fetch–decode–execute cycle, or simply the fetch–execute cycle) is the cycle that the central processing unit (CPU) follows from boot-up until the computer has shut down in order to process instructions ...
Debugging {{Comp-sci-stub