Instruction step

Last updated

An instruction step is a method of executing a computer program one step at a time to determine how it is functioning. This might be to determine if the correct program flow 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.

Computer program Instructions to be executed by a computer

A computer program is a collection of instructions that performs a specific task when executed by a computer. A computer requires programs to function.

Contents

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 / Memory or general purpose register read-out could then be accomplished by observing and noting the console lights.

The program status word (PSW) is an IBM System/360 architecture and successors control register which performs the function of a status register and program counter in other architectures, and more.

Memory information stored in the mind, or the mental processes involved in receiving, storing, and retrieving this information

Memory is the faculty of the brain by which information is encoded, stored, and retrieved when needed.

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

In the context of computer programming, instrumentation refers to an ability to monitor or measure the level of a product's performance, to diagnose errors, and to write trace information. Programmers implement instrumentation in the form of code instructions that monitor specific components in a system. When an application contains instrumentation code, it can be managed by using a management tool. Instrumentation is necessary to review the performance of the application. Instrumentation approaches can be of two types: source instrumentation and binary instrumentation.

A compiler is a computer program that translates computer code written in one programming language into another programming language. The name compiler is primarily used for programs that translate source code from a high-level programming language to a lower level language to create an executable program.

Assembly language low level programming language

An assembly language, often abbreviated asm, is any low-level programming language in which there is a very strong correspondence between the program's statements and the architecture's machine code instructions.

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 simulators 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.

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 the processor's registers.

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 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 testing the software that IBM was developing for that architecture. SIMMON was first described at the IBM SimSymp 1968 symposium, held at Rye, New York.

Related Research Articles

Computer programming process that leads from an original formulation of a computing problem to executable computer programs

Computer programming is the process of designing and building an executable computer program for accomplishing a specific computing task. Programming involves tasks such as: analysis, generating algorithms, profiling algorithms' accuracy and resource consumption, and the implementation of algorithms in a chosen programming language. The source code of a program is written in one or more languages that are intelligible to programmers, rather than machine code, which is directly executed by the central processing unit. The purpose of programming is to find a sequence of instructions that will automate the performance of a task on a computer, often for solving a given problem. The process of programming thus often requires expertise in several different subjects, including knowledge of the application domain, specialized algorithms, and formal logic.

In computing, an optimizing compiler is a compiler that tries to minimize or maximize some attributes of an executable computer program. The most common requirement is to minimize the time taken to execute a program; a less common one is to minimize the amount of memory occupied. The growth of portable computers has created a market for minimizing the power consumed by a program.

Debugger A computer program

A debugger or debugging tool is a computer program that is used to test and debug other programs. The code to be examined might alternatively be running on an instruction set simulator (ISS), a technique that allows great power in its ability to halt when specific conditions are encountered, but which will typically be somewhat slower than executing the code directly on the appropriate processor. Some debuggers offer two modes of operation, full or partial simulation, to limit this impact.

In computer science, an interpreter is a computer program that directly executes, i.e. performs instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program. An interpreter generally uses one of the following strategies for program execution:

  1. parse the source code and perform its behavior directly;
  2. translate source code into some efficient intermediate representation and immediately execute this;
  3. explicitly execute stored precompiled code made by a compiler which is part of the interpreter system.
Breakpoint An intentional stopping or pausing place in a program, used for debugging

In software development, a breakpoint is an intentional stopping or pausing place in a program, put in place for debugging purposes. It is also sometimes simply referred to as a pause.

MBASIC is the Microsoft BASIC implementation of BASIC for the CP/M operating system. MBASIC is a descendant of the original Altair BASIC interpreters that were among Microsoft's first products. MBASIC was one of the two versions of BASIC bundled with the Osborne 1 computer. The name "MBASIC" is derived from the disk file name MBASIC.COM of the BASIC interpreter.

In software engineering, profiling is a form of dynamic program analysis that measures, for example, the space (memory) or time complexity of a program, the usage of particular instructions, or the frequency and duration of function calls. Most commonly, profiling information serves to aid program optimization.

Front panel

A front panel was used on early electronic computers to display and allow the alteration of the state of the machine's internal registers and memory. The front panel usually consisted of arrays of indicator lamps, toggle switches, and push buttons mounted on a sheet metal face plate. In early machines, CRTs might also be present. Prior to the development of CRT system consoles, many computers such as the IBM 1620 had console typewriters.

Turbo Debugger (TD) was a machine-level debugger for MS-DOS executables, intended mainly for debugging Borland Turbo Pascal (TP), and later Turbo C (TC) programs, sold by Borland. This tool was a full-screen debugger displaying both TP or TC source and corresponding assembly-language instructions, with powerful capabilities for setting breakpoints, watching the execution of instructions, monitoring machine registers, etc. TD could be used for programs not generated by Borland compilers, but without showing source statements; it was by no means the only debugger available for non-Borland executables, and not a significant general-purpose debugger.

A computer architecture simulator is a program that simulates the execution of computer architecture.

In computer performance, the instruction path length is the number of machine code instructions required to execute a section of a computer program. The total path length for the entire program could be deemed a measure of the algorithm's performance on a particular computer hardware. The path length of a simple conditional instruction would normally be considered as equal to 2, one instruction to perform the comparison and another to take a branch if the particular condition is satisfied. The length of time to execute each instruction is not normally considered in determining path length and so path length is merely an indication of relative performance rather than in any sense absolute.

A decompiler is a computer program that takes an executable file as input, and attempts to create a high level source file which can be recompiled successfully. It is therefore the opposite of a compiler, which takes a source file and makes an executable. Decompilers are usually unable to perfectly reconstruct the original source code, and as such, will frequently produce obfuscated code. Nonetheless, decompilers remain an important tool in the reverse engineering of computer software.

Emulator system that emulates a real system such that the behavior closely resembles the behavior of the real system

In computing, an emulator is hardware or software that enables one computer system to behave like another computer system. An emulator typically enables the host system to run software or use peripheral devices designed for the guest system. Emulation refers to the ability of a computer program in an electronic device to emulate another program or device. Many printers, for example, are designed to emulate Hewlett-Packard LaserJet printers because so much software is written for HP printers. If a non-HP printer emulates an HP printer, any software written for a real HP printer will also run in the non-HP printer emulation and produce equivalent printing. Since at least the 1990s, many video game enthusiasts have used emulators to play classic arcade games from the 1980s using the games' original 1980s machine code and data, which is interpreted by a current-era system.

Program animation or Stepping refers to the now very common debugging method of executing code one "line" at a time. The programmer may examine the state of the program, machine, and related data before and after execution of a particular line of code. This allows evaluation of the effects of that statement or instruction in isolation and thereby gain insight into the behavior of the executing program. Nearly all modern IDEs and debuggers support this mode of execution. Some testing tools allow programs to be executed step-by-step optionally at either source code level or machine code level depending upon the availability of data collected at compile time.

MikroSim

MikroSim is an educational software computer program for hardware-non-specific explanation of the general functioning and behaviour of a virtual processor, running on the Microsoft Windows operating system. Devices like miniaturized calculators, microcontroller, microprocessors, and computer can be explained on custom-developed instruction code on a register transfer level controlled by sequences of micro instructions (microcode). Based on this it is possible to develop an instruction set to control a virtual application board at higher level of abstraction.

A high-level language computer architecture (HLLCA) is a computer architecture designed to be targeted by a specific high-level language, rather than the architecture being dictated by hardware considerations. It is accordingly also termed language-directed computer design, coined in McKeeman (1967) and primarily used in the 1960s and 1970s. HLLCAs were popular in the 1960s and 1970s, but largely disappeared in the 1980s. This followed the dramatic failure of the Intel 432 (1981) and the emergence of optimizing compilers and reduced instruction set computing (RISC) architecture and RISC-like CISC architectures, and the later development of just-in-time compilation for HLLs. A detailed survey and critique can be found in Ditzel & Patterson (1980).

References

    See also