2 Sap
2 Sap
CSE 371
Basic Architecture
SAP (Simple As Possible) Computer
• A Bus organized computer
• All register output to the W bus are three-state, allowing orderly
transfer of data.
• All other register outputs are two-state.
Program Counter(pointer)
• SAP-1 is a very primitive computer; hence, it can perform only Five basic instructions.
LDA<memory_address> e.g. LDA AH
-Loads the accumulator with the contents of the memory address.
ADD <memory_address> e.g, ADD AH
-Adds the contents of the memory address to the accumulator contents.
-sum replaces the original contents of the accumulator.
SUB <memory address> e.g., SUB AH
-Subtracts the contents of the memory address from the accumulator contents.
-sum replaces the original contents of the accumulator.
OUT ( Transfers the accumulator contents to the output)
HLT ( No operation)
Memory-Reference Instructions
• LDA, ADD, and SUB are called memory-reference instructions
because they use data stored in the memory.
• OUT and HLT are not memory-reference instruction because they do
not involve data stored in the memory.
Mnemonics
• LDA, ADD, SUB, OUT, and HLT are the instruction set for
SAP-1.
• Abbreviated instructions like these are called mnemonics
(memory aids).
• Mnemonics are popular in computer work because they
remind of the operation that will take place when the
instruction is executed.
OPCODE
• The computer does not understand LDA, ADD, SUB, OUT, or HLT. Therefore, some kind of code is required
that the computer can interpret. The code that tells the computer which operation to perform is called an
operation code (opcode).
A Few Notes
Assembly language involves working with mnemonics when
writing a program.
The program written with mnemonics is called source program.
Machine language involve working with strings of 0s and 1s.
The program written with machine language is called object program
In SAP-1 the operator translates the source program into an object
program
A Few Notes
T2:Increment State
T3
NOP
Self Study