registers and memory locations. How machine
instructions within an instruction set are classified differ
by computer type and manufacturer.
Instructions Classified by Function
Instructions can be classified in general terms by
the type of operation they peformdata movement,
transfer of control or program sequencing, arithmetic,
and logical.
MOVEMENT INSTRUCTIONS. Movement
instructions literally move the data in some way. They
include internal, external, and data assignment
instructions.
Internal Instructions.Internal instructions
move the data within the confines of the computer.
They include the following examples:
l
l
l
Load Load the A register with the contents
specified by the operand
Move (transfer) Move the
register to another register
Store Store the contents of
specified memory address
contents of one
a register into a
External Instructions.Instructions dedicated to
I/O are external instructions. They include inputting
data from a peripheral device, such as a magnetic tape
unit or outputting data to a peripheral, such as a printer.
Data Assignment (Special-Purpose)
Instructions. Data assignment instructions include
those that set or clear status indicating bits that are
normally held in an active status or flag register. Some
examples of active status registers include state
indicators, upper/lower control indicator of half-word
instructions, interrupt lockouts, memory lockout
inhibit, bootstrap mode, fixed point overflow, and
compare designators. Some examples of flag bits are
equal to zero, sign (+ or ), carry, and parity (odd or
even).
TRANSFER OF CONTROL OR PROGRAM
SEQUENCING CONTROL INSTRUCTIONS.
Transfer of control or program sequencing control
instructions enable the programmer to change the
sequence in which instructions are executed by
branching to another area of a program. They also
include instructions for a subroutine to perform a
function.
Branching Instructions. Branching instructions
make it possible to change the sequence in which the
computer peforms instructions. An unconditional
branching instruction always causes a jump to a new
area of memory.
An example is a jump (JMP)
instruction. Branching instructions often use a modifier
in the instruction to establish a condition to be met.
These types of branching instructions are called
conditional branching instructions. A conditional
branching instruction causes a jump to a new area of
memory only when a specific condition is met, such as
IF A = 0 JUMP TO.... A conditional branching
instruction may also rely on the setting of a switch on
the computers controlling device to be included with
the instruction, such as IF JUMP 1 SWITCH IS SET
JMP TO . . . .
Subroutine. A subroutine may include a function
that is routinely repeated, such as incrementing or
decrementing an index register or a short multiply
routine when no multiply instruction exists. Some
functions performed in a subroutine may include stack
pointer management and data buffering algorithms
such as last-in, first-out (LIFO) and first-in, first-out
(FIFO) methods.
ARITHMETIC INSTRUCTIONS. Arithmetic
instructions include add, subtract, multiply, divide,
shift, increment, decrement, clear, and negation
instructions. Depending on the design of the computer,
absolute numbers are involved in arithmetic
calculations. Also depending on the design, math pac
and numeric data coprocessor are used in some
computers in addition to the normal arithmetic
instructions available. They execute the arithmetic
instructions the CPUs ALU cannot and are still
controlled by the CPUs program control.
LOGICAL INSTRUCTIONS. Logical in-
structions include and, or, not, exclusive or/nor, com-
pares, and shift instructions. They are often used in
computers with multiply or divide instructions, in
calculations to isolate bits. They also include compare
type instructions.
Compare type instructions are
greater than (>), less than (<), equal to (=), not equal to
(<>), check for positive, and check for negative.
Instructions Classified by Their Action on
Operands
Instructions may also be classified by their action
on an operand. They may read, store, or replace an
operand. For example, ADD LOGICAL PRODUCT is
classified as a read instruction; STORE LOGICAL
PRODUCT is classified as a store instruction; and
REPLACE SELECTIVE CLEAR is classified as a
8-4