Assignment 3: First Semester Session 1441/1442 AH
Assignment 3: First Semester Session 1441/1442 AH
First Semester
Session 1441/1442 AH
Student Name :
Student ID :
Student Signature :
Total Marks
(In Figure) / 6 Marks
Total Marks
(In Words)
https://www.coursehero.com/file/140688888/Assignmnet-3pdf/
Outcome 1 &2 [6]
Q1. [1.2] [2]
a. Illustrate with an example the following addressing mode
I. Immediate II. Direct III. Indirect IV. Register V. Register Indirect VI. Displacement
b. Sketch a neat diagram to represent its functionality.
Q2. Illustrate branching, conditional jumping and unconditional jumping of the Control Instruction.
Write an example for each one. [1.2] [1]
Q3. Write the mnemonics to multiply the two numbers. First assign the value 25H and 32H into
registers. Then write mnemonics to find the multiplication. [1.2] [1]
Q4. Write the difference between direct and register indirect addressing. [1.1] [1]
Best of Luck
https://www.coursehero.com/file/140688888/Assignmnet-3pdf/
Q1.
Mode Algorithm Principal Advantage Principal Disadvantage
Immediate Operand = A No memory reference Limited operand magnitude
Direct EA = A Simple Limited address space
Indirect EA = (A) Large address space Multiple memory references
Register EA = R No memory reference Limited address space
Register indirect EA = (R) Large address space Extra memory reference
Displacement EA = A + (R) Flexibility Complexity
Direct: ADD BYTE_VALUE, DL; Adds the register in the memory location
https://www.coursehero.com/file/140688888/Assignmnet-3pdf/
Register indirect: LDR R2, [R0]; Load R2 with the word pointed by R0
Q2.
Branching instructions refer to the act of switching execution to a different instruction sequence as a result of
executing a branch instruction.
The three types of branching instructions are:
• Jump (unconditional and conditional)
• Call (unconditional and conditional)
• Return (unconditional and conditional)
Unconditional Jump Instructions: Transfers the program sequence to the described memory address
https://www.coursehero.com/file/140688888/Assignmnet-3pdf/
Conditional Jump Instructions: Transfers the program sequence to the described memory address only if the
condition in satisfied.
Q3.
Q4.
Q5.
It is the physical designation of a function of the physical address and memory management unit (MMU) that
the programmer does not see. In a virtual memory device, the virtual address or registry is the active address.
The active address in a machine without virtual memory will be either a memory master address or a register,
so the effective address is an offset for the header instruction.
https://www.coursehero.com/file/140688888/Assignmnet-3pdf/
Powered by TCPDF (www.tcpdf.org)