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

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

Posted Date: 7/31/2013 6:11:39 AM | Location : United States







Related Discussions:- Program for interchanging the values of two memory locations, Assignment Help, Ask Question on Program for interchanging the values of two memory locations, Get Answer, Expert's Help, Program for interchanging the values of two memory locations Discussions

Write discussion on Program for interchanging the values of two memory locations
Your posts are moderated
Related Questions
(a) The statement "Standards create markets or markets create standards" has been the subject of considerable debate. Discuss the advantages and disadvantages to having multiple

I need the matlab basics for creating and configuring a neural network with 2 hidden layers

Give brief summary of common aspects found in spreadsheets -  It's made up of columns and rows; every row is identified by a number and every column is identified with a letter

The demand placed on a system is explained by a lognormally distributed random variable with mean 50 and standard deviation of 10. The capacity of the system is modeled by a Weibul

Q. Code Density and Smaller Faster Programs? Memory was very expensive in older computer. So there was a need of less memory utilization, which is it was cost effective to have

Change this program so that every client will now send ten integers and receives their sum from the server. In Java, for loops can be easily executed as follows: for (int i = 0 ; i

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

Q. Illustrate benefits of register addressing mode? The key benefits of register addressing are: Register access is faster than memory access and henceforth register add

Explain the term - Rational Rose and Visio 2000 Enterprise Rational Rose: IBM Rational RequisitePro is a powerful and easy-to-use tool for use case management and requirement

What are the various layers of a file system? The file system is composed of lots of dissimilar levels. Each level in the design uses the characteristic of the lower levels to