Академический Документы
Профессиональный Документы
Культура Документы
Topics to be covered…
•Phases of Instruction processing
•Instruction Set Architecture (ISA) of LC-3 Computer
•Operate Instruction
• AND
• ADD
• NOT
1
Computer Programming TA C162
2
Computer Programming TA C162
3
Computer Programming TA C162
4
Computer Programming TA C162
F
For instructions that require memory access
to get the operands; compute address used D
for access.
EA
Example:
OP
• Add offset to base register (as in LDR)
EX
5
Computer Programming TA C162
EX
6
Computer Programming TA C162
EX
7
Computer Programming TA C162
8
Computer Programming TA C162
• Data types
16-bit 2’s complement integer
• Addressing modes
How is the location of an operand specified?
Non-memory addresses: immediate, register
Memory addresses: PC-relative, indirect, base+offset
10
Computer Programming TA C162
Operate Instructions
Only three operations: ADD, AND, NOT
11
Computer Programming TA C162
NOT (Register)
12
Computer Programming TA C162
13
Computer Programming TA C162
14
Computer Programming TA C162
15
Computer Programming TA C162
Solution 1
Assuming the values A and B are in R0 and R1
1001 001 001 111111
NOT R1 R1
R1 NOT(R1)
16
Computer Programming TA C162
Solution 2
17
Computer Programming TA C162
Solution 3
ADD R2 R2 R3
R2R2+R3
Contents of R3 are copied to R2
18