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
Massively Parallel System Indicates to a "parallel computer system" involving a huge number of processors. The numbers in a huge number of processors keeps increasing and curre

Now let's get a grip on how to add interactivity to your web documents by way of the tag. With this tag you can add to your web pages a guestbook, surveys, order forms, ge

Explain the Architectural framework for electronic commerce. An application independent framework to categorize service interaction relies on four basic dimensions   1.  Ser

Explain the architecture of SS7 . A block schematic diagram of the CCITT no. 7 signaling system is demonstrated in figure. Signal messages are passed by the central proces

What are the two ways of producing a list within a transaction? By submitting a separate report. By using leave to list-processing.

Determine the Example - "fork-join" module initial_fork_join(); reg clk,reset,enable,data; initial begin $monitor("‰g clk=‰b reset=‰b enable=‰b data=‰b", $time, cl

Question: a) Evary cell in a cellular network is assigned a band of frequencies. The allocated frequencies are divided into two types of channels. Indentify and describe each t

Any function can be expressed in a truth table.A truth table lists all possible combinations ofinputs and gives the output produced in eachcase.Truth tables must include all combin

Mention the various IC logic families. Ans. Different  IC Logic Families: Digital IC's are fabricated through employing either the Unipolar or the Bipolar Technologies and are te

Q. Requirements of decision support system? a) Fast computation A decision maker is able to perform a large number of computations very quickly and that too at a low cost