You are on page 1of 2

Kelvin Kadonya Ngeleja 658724

SPRING SEMESTER – 2020

APT2022-A

INTRODUCTION TO ASSEMBLY PROGRAMMING

CAT (OUT OF 30)

a) The following is a section of an assembly language program. Complete the missing entries

in the assembly language program and write it down. Also, record the contents of all the

registers after the program is successfully executed. [12 marks]

MOV AX, 2AH ; …………………………………………………. ………………… ; Load the 16-bit data 008EH to
register AX MOV CX, 05H ; ………………………………………………. ……………………..; Transfer content of
register AX to SI MOV DI, BX ; ………………………………………………. ……………… ; Transfer content of
register CX to BP END ; ……………………………………………….

b) Suppose that DS=1200H, BX=0300H, LIST=0450H, and SI=0500H. Given that physical

address equals to effective address plus offset address, determine the address accessed by

each of the following instructions in assembly programming. [8 marks]

I. MOV LIST[SI], DX
(move the contents of memory location sI
addressed by the register DX to the register LIST SI)
II. MOV CX, [BX+SI]
(move the contents of memory location
addressed by the register BX+SI to the register CX)

c) Using examples of your own, explain the following types of addressing modes supported

by the 8086 microprocessor. [10 marks]

1. Register indirect addressing mode


Indirect addressing mode uses instructions that include the address of a value that points to the
effective address of the operand. The instructions point to either a register or a memory
location, and the location would contain the effective address of the operand in memory.
Add R1, (R2)+ // OR
Kelvin Kadonya Ngeleja 658724

R1 = R1 +M[R2]
R2 = R2 + d

2. Port addressing mode

In this mode, effective address of operand is present in instruction itself.

Single memory reference to access data.

No additional calculations to find the effective address of the operand.

ADD R1, 4000 - In this the 4000 is effective address of operand.

You might also like