fetches instructions,
decodes instructions, causes
instructions to be carried out
Control Unit
a special register with
individual bit positions that give
the status of the CPU (control
flags) or results of arithmetic
operations (status flags)
Flags
always
contains the offset of the next
instruction. The IP and CS
registers combine to form the
complete address. IP is also
known as PC – the program
counter.
IP(Instruction Pointer)
Branches to a specific location in
memory
BRANCH 40
Branches to a specific location in
memory if the accumulator is
negative
BRANCHNEG 41
Branches to a specific location in
memory if the accumulator is zero
BRANCHZERO 42
HALT
43
Reads a word from the terminal into
a specific location in memory
READ 10
Writes a word from a specific
location in memory to the terminal
WRITE 11
Loads a word from a specific
location in memory into the
accumulator
LOAD 20
Stores a word from the accumulator
into a specific location in memory
STORE 21
Adds a word from a specific location
in memory to the word in the
accumulator(Leaves the result in the accumulator)
ADD 30
Subtracts a word from a specific
location in memory from the word in
the accumulator
(leaves result in the accumulator
SUBTRACT 31
fetches instructions,
decodes instructions, causes
instructions to be carried out
Control Unit
performs arithmetic operations
(addition, etc.) on data.
Arithmetic logical unit (ALU)
high speed memory cells
(don’t need to go through the bus to
access). They vary in number and
purpose on different machines.
Registers
communication pathways
connecting different
devices/components
Buses
also known as
general purpose registers: AX,
BX, CX, DX
Data registers
Used for arithmetic operations
and data movement
Data registers
fastest for
arithmetic operations. Some math
instructions only use AX.
AX – accumulator
This register can hold an
address of a procedure or variable.
BX can also perform arithmetic and
data movement.
BX – base
this register acts as a
counter for repeating or looping
instructions
CX – counter
this register has a
special role in multiply and divide
operations. In multiplication it holds
the high 16 bits of the product. In
division it holds the remainder.
DX – data
are used as
base locations for program
instructions, data, and the stack.
Segment registers