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

What is stack addressing, Q. What is Stack Addressing? In this addressi...

Q. What is Stack Addressing? In this addressing technique operand is implied as top of stack. It isn't explicit however implied. It employs a CPU Register known as Stack Pointe

Perform binary addition and subtraction on two numbers, Q Develop a menu ...

Q Develop a menu driven program to perform Binary addition and subtraction on two numbers that are inputted. Check that entered numbers are in base 2 or not else error messag

Resource management techniques, a company has 4 machines to do 3 jobs.each ...

a company has 4 machines to do 3 jobs.each job can be assigned to one and only machine.determine the job assignments which will minimize the total cost

Project, the project database is avilable?

the project database is avilable?

By which transport protocol used, The transport protocol used by TFTP (Triv...

The transport protocol used by TFTP (Trivial File Transfer Protocol) is? The transport protocol used through Trivial File Transfer Protocol is UDP.

Webforms application and to an mvc application, What is the difference amon...

What is the difference among adding routes, to a webforms application and to an mvc application? Ans) To add routes to a webforms application, we use MapPageRoute() process of

Variables and quantifiers for first-order models , Variables and Quantifier...

Variables and Quantifiers for First-order models -artificial intelligence: So what do sentences containing variables mean? In other words, how does first order model select whe

Dynamic screen sequence, Dynamic screen sequence  for a  screen can be set ...

Dynamic screen sequence  for a  screen can be set using which commands? It uses two commands:- A) Set Screen B) Call screen.

Avoiding local minima of multi-layered networks, Avoiding Local Minima of m...

Avoiding Local Minima of multi-layered networks-Artificial intelligence : The error rate of multi-layered networks over a training set could be calculated as the number of mis

DISCRETE STRUCTURES, SET 2I OF ALL INTEGERS WITH ZERO IS AN ABELIAN GROUP

SET 2I OF ALL INTEGERS WITH ZERO IS AN ABELIAN GROUP

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