Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 4

ASSIGNMENT

Name: Ananya

Reg. No: 1712855

Trade:Dcs/cde

1)Whar are different types of adressing modes?


1. Immediate addressing.

2. Register addressing.

3. Direct addressing.

4. Indirect addressing.

Immediate addressing

Data is present in the instruction. Load the immediate data to the destination
provided.

Example: MVI R,data

Register addressing

Data is provided through the registers.

Example: MOV Rd, Rs

Direct addressing

Used to accept data from outside devices to store in the accumulator or send the
data

stored in the accumulator to the outside device. Accept the data from the port
00H and

store them into the accumulator or Send the data from the accumulator to the
port

01H.

Example: IN 00H or OUT 01H

Indirect Addressing

This means that the Effective Address is calculated by the processor. And the

contents of the address (and the one following) is used to form a second address.
The

second address is where the data is stored. Note that this requires several
memory

accesses; two accesses to retrieve the 16-bit address and a further access (or
accesses)

to retrieve the data which is to be loaded into the register.

2)What is difference between Direct and Indirect adressing


instruction?
1. Address fields contains the effective address of operand whereas

Address field contains reference of effective address

2. Requires only one memory reference whereas

Requires two memory refrences

3. Fast addressing whereas

Slower than direct addressing mode

4. No further classification whereas

Further classified into two categories

5. No further calculation is required to perform the operation whereas

Require further calculation to find the effective address

3)How physical address is generated?


Physical Address = Base Address + Offset.

Suppose the Data Segment holds the Base Aaddress as 1000h and the data you need is present
in the 0020h memory location (Offset) of the Data Segment. The calculation of the actual
address is done as follows.

1. Left shift the 16-bit address present in the segment register by 4-bits

0001 0000 0000 0000 (0000)

2. Add the 16-bit offset address to this shifted base address

0001 0000 0000 0000 0000

+ 0000 0000 0010 0000

--------------------------------------

0001 0000 0000 0010 0000

At any point of time we can change the base address of the segment registers and use the
memory locations in those segments using the offset.

You might also like