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

C++, At a shop of marbles, packs of marbles are prepared. Packets are named...

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes

Where trunks lines are run between, Trunks are the lines that run between ...

Trunks are the lines that run between (A)  subscribers and exchange        (B) switching system and power plant (C)  Local Area Network                (D) switching syste

Difference between commit-work and rollback-work tasks, What is the differe...

What is the difference between Commit-work and Rollback-Work tasks? Commit-Work statement "performs" many functions relevant to synchronized execution of tasks.  Rollback-work

Why sram are said to be volatile, Why SRAM are said to be volatile? Bec...

Why SRAM are said to be volatile? Because their contents are lost when power is interrupted. So SRAM are said to be volatile.

Determine the term- files, Determine the term- Files File maintenance i...

Determine the term- Files File maintenance is significant. Updating of files generally involves inserting, amending and deleting data. Example: A bank would amend data

Performance and issues in pipelining-efficiency, Performance and Issues in ...

Performance and Issues in Pipelining Efficiency:  The efficiency of a pipeline can be calculated as the ratio of busy time span to the entire time span including the idle time

Define interrupts, Interrupts are signals which cause the CPU to suspend th...

Interrupts are signals which cause the CPU to suspend the currently executing program and transfer to a special program known as an interrupt handler. Interrupt handler determines

Why stored program control gains superiority over hard wired, In what way i...

In what way is stored program control superior to hard wired control? The SPC gains superiority over hard wired because of following points: SP C Ha

Hill climbing - artificial intelligence, Hill Climbing - Artificial Intelli...

Hill Climbing - Artificial Intelligence: As we've seen, in some problems, finding the search path from primary to goal state is the point of the exercise. In other problems, t

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