You are on page 1of 2

Computer Architecture & Organization Test 10%

Name _____________________________Id no. __________Sec_____


Determine the addressing mode used in the source operand field of each instruction and
show the execution of the following instructions.

Assume the instruction format given below.

Opcode Operand(destination) Operand(source)

1. MOV R1, [100]


Addressing mode=___________________________________

CPU registers Memory


R1 99 12

R2 100 44

101 0

102 23

103 56

104 8

2. MOV R1,[R2]
Addressing mode=__________________________________

CPU registers Memory


R1 99 12

R2 104 100 44

101 0

102 23

103 56

104 8

April 24, 2017 1


3. MOV R1, [R2+100]
Addressing mode =___________________________________

CPU registers Memory


R1 99 12

R2 2 100 44

101 0

102 23

103 56

104 8

4. Consider the following assembly program.


Memory
MOV R1 , 5 99 23
MOV R2 , 0
Loop: DEC R1 100 40
JZ Exit
101 10
MOV R3 , [R2+100]
ADD AC , R3 102 5
JMP Loop
Exit: HLT 103 15

104 20

A. What type of instructions are used


in the program? CPU Registers
B. What addressing modes are used AC 0
in the program?
C. What will be the values of R1 0
AC,R1,R2 & R3 after the execution
of the program? R2 0

R3 0

April 24, 2017 2