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

Recursion, Ask qurecurrion for short noteestion

Ask qurecurrion for short noteestion

Persuasive communication , 1)   Discuss various types of persuasive communi...

1)   Discuss various types of persuasive communication you might be needed to write or present in your professional and personal life. 2)    Describe two ways to organize a resume

Show system call for cloning, Show System call for cloning.  Standard f...

Show System call for cloning.  Standard form of Clone function is as follows: Int clone (Int (*FN) (), void *child stack, Int flag, intargs,); Parameter FN is Pointer fro

Illustrate left shift register with parallel load, Q. Illustrate Left shift...

Q. Illustrate Left shift register with parallel load? A register that shifts data in one direction only is known as Uni-directional shift register and a register that can shift

When do you do load and performance testing, We perform load testing once w...

We perform load testing once we are completed with interface (GUI) testing. Modern system architectures are large and difficult. Whereas one user testing primarily on functionality

Which translator perform macro expansion, Which translator perform macro ex...

Which translator perform macro expansion, is called? Ans. Macro pre-processor perform macro expansion.

What is function overloading, a. Describe function declaration, function de...

a. Describe function declaration, function definition and function cell using a suitable example. Explain the function prototype? b. What is function overloading? When do we use

Illustrate about probability of collision, Illustrate about probability of ...

Illustrate about probability of collision? Probability of collision: There is a triangle and on this let’s assume that there are three ants one on each corner and are free t

What is a customer-to-business transaction, What is a customer-to-business ...

What is a customer-to-business transaction? C2B (customer-to-business): The most significant activity into e-commerce isn’t selling. That is buying. Rather often which do

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