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 execute. Computer programs are one component of software, which also includes documentation and other intangible components. A computer program ...
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 statements, instructions or function calls of an imperative program are executed or evaluated. The emphasis on explicit control flow distinguishes an ''imper ...
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 remembered, ...
or
general purpose register A processor register is a quickly accessible location available to a computer's processor. Registers usually consist of a small amount of fast storage, although some registers have specific hardware functions, and may be read-only or write-only. ...
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 a collective term for measuring instruments that are used for indicating, measuring and recording physical quantities. The term has its origins in the art and science of scientific instrument-making. Instrumentation can refer to ...
- requiring code to be added during
compile In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
or
assembly Assembly may refer to: Organisations and meetings * Deliberative assembly, a gathering of members who use parliamentary procedure for making decisions * General assembly, an official meeting of the members of an organization or of their representa ...
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 that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
. * instruction set simulation - requiring no code modifications for instruction or statement stepping In some software products which facilitate debugging of
High level languages In computer science, a high-level programming language is a programming language with strong abstraction from the details of the computer. In contrast to low-level programming languages, it may use natural language ''elements'', be easier to use, ...
, 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, usually coded in a high-level programming language, which mimics the behavior of a mainframe or microprocessor by "reading" instructions and maintaining internal variables which represent t ...
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 SIMMON (SIMulation MONitor) was a proprietary software testing system developed in the late 1960s in the IBM Product Test Laboratory, then at Poughkeepsie, N.Y. It was designed for the then-new line of System/360 computers as a vehicle for testi ...
an IBM internal test system which provided instruction stepping


References


See also

*
Instrumentation (computer programming) In the context of computer programming, instrumentation refers to the measure of a product's performance, in order to diagnose errors and to write trace information. Instrumentation can be of two types: source instrumentation and binary instrumenta ...
*
Instruction set simulator An instruction set simulator (ISS) is a simulation 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 which represent t ...
*
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 instruction ...
Debugging {{Comp-sci-stub