Explain direct addressing mode with example, Computer Engineering

Assignment Help:

Q. Explain Direct Addressing Mode with example?

Direct Addressing Mode

A direct operand signifies to contents of memory at an address referred by the name of the variable.

Mode

Description

Example

Direct

The direct operands are also calledas relocatable operands as they represent the offset of a label from the beginning of a segment. On reloading a program even in a different segment will not cause change in the offset that is why we call them relocatable. Please note that a variable is considered in Data segment (DS) and code label in code segment (SS) by default. Thus, in theexample, COUNT, bydefault will be assumed to be

in data segment, while LABEL 1, will be assumed to be in code segment. If we specify, as a direct operand then the address is non-relocatable. Please note the value of segment register will be known only at the run time.

MOV COUNT, CL 

; move CL to COUNT (a

; byte variable)

MOV AL,COUNT 

; move COUNT to AL

JMP LABEL1 

; jump to LABEL1

MOV AX,DS:5 

; segment register and 

; offset

MOV BX,CSEG:2Ch 

; segment name and offset

MOV AX,ES:COUNT 

; segment register and 

; Variable.

; The offsets of these 

; variables are calculated

; with respect to the 

; segment name (register)

; specified in the

; Instruction. 

 

 


Related Discussions:- Explain direct addressing mode with example

How read and write is performed using sockets, How read and write is perfor...

How read and write is performed using sockets? An application program interface gives the details of how can an application program interacts along with protocol software. But

Show the ranges of port numbers, Q. Show the ranges of Port numbers? P...

Q. Show the ranges of Port numbers? Port numbers are divided into three ranges: Well-known ports are those from 0 through 1,023. Registered ports are those from

What are event and its types, What are event and its types? An event is...

What are event and its types? An event is an occurrence at a point in time, like user depresses left button. Event happens instantaneously with regard to time scale. Type

How race around condition can be avoided, How Race Around Condition can...

How Race Around Condition can be avoided? Ans: The race around condition can be avoided if 1. Duration of clock pulse being high is small like comparative to the dela

How free-space is managed using bit vector implementation, How free-space i...

How free-space is managed using bit vector implementation? The free-space list is executed as a bit map or bit vector. Each block is shown by 1 bit. If the block is free, the b

Different ways in which a thread can be cancelled, What are the different w...

What are the different ways in which a thread can be cancelled?  Cancellation of a target thread may occur in two different scenarios: Asynchronous cancellation: One thre

Explain advantages and disadvantages of a active document, Explain advantag...

Explain advantages and disadvantages of a active document. The advantage of an active document over a dynamic document lies in its capability to update the information contin

Explain call and return statements, Q. Explain Call and Return Statements? ...

Q. Explain Call and Return Statements? CALL:       CALL X    Procedure Call to procedure/function named X   CALL instruction causes the following to happen:  1.  Decre

What is structural hazard, What is structural hazard? Structural hazard...

What is structural hazard? Structural hazard is the situation when two instructions needs the use of a given hardware resource at the similar time. The most common case in whic

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd