Program for interchanging the values of two memory locations, Computer Engineering

Assignment Help:

Q. Program for interchanging the values of two Memory locations?

Program for interchanging the values of two Memory locations 

; input: Two memory variables of same size: 8-bit for this program

 

DATA SEGMENT

                        VALUE1 DB             0Ah                 ;Variables

                        VALUE2 DB             14h 

DATA ENDS

CODE SEGMENT

ASSUME CS:CODE, DS:DATA 

 MOV AX, DATA                                                      ; Initialise data segments

 MOV DS, AX                                                           ; using AX

 MOV AL, VALUE1                                                  ; Load Value1 into AL

 XCHG VALUE2,AL                                                 ; exchange AL with Value2.

 MOV VALUE1,AL                                                               ; Store A1 in Value1

INT 21h                                                                      ; Return to Operating system

CODE ENDS

END


Related Discussions:- Program for interchanging the values of two memory locations

Describe program control instructions, Q. Describe Program Control Instruct...

Q. Describe Program Control Instructions? These instructions specify conditions for altering the sequence of program execution or we can say in other words that the content of

Linear model., what is linear model and its type

what is linear model and its type

Fundamental change to the cloud to support mobility, Question: The abun...

Question: The abundance of resources and the ease of access to cloud computing can help to bridge the gap the resource gap for mobile computing. Nevertheless some fundamental c

Define refresh circuits, Define Refresh Circuits? It is a circuit which...

Define Refresh Circuits? It is a circuit which make sure that the contents of a DRAM are maintained when every row of cells are accessed periodically.

How authoring packages supports scripting language, How authoring packages ...

How authoring packages supports scripting language Many authoring packages support a scripting language to allow for even more sophisticated applications to be produced. Scrip

Define local area network, LAN is a privately - owned computer networks con...

LAN is a privately - owned computer networks confined to small geographical area, like a factory or an office widely used to connect office PCs to share resources and information.

What is fish bone diagram, What is Fish Bone Diagram? Or Explain Ishikawa D...

What is Fish Bone Diagram? Or Explain Ishikawa Diagram. Fish Bone Diagram is also known as Ishikawa Diagram or Cause and Effect Diagram. It is known as Fish Bone Diagram be

What do you mean by loader, Q. What do you mean by Loader? Loader is a ...

Q. What do you mean by Loader? Loader is a program that assigns absolute addresses to program. These addresses are produced by adding the address from where program is loaded i

What is a shell, What is a shell? A shell is an interactive user interf...

What is a shell? A shell is an interactive user interface to an operating system services that permits an user to enter commands as character strings or by a graphical user int

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