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

Explain recursive descent parsing, Explain Recursive Descent Parsing It...

Explain Recursive Descent Parsing It is a top down parsing with no backtracking. This parsing method uses a set of recursive processes to perform parsing. Most important advant

Explain time slot interchange, Discuss the basic structure and principle of...

Discuss the basic structure and principle of operation of Time Slot Interchange (TSI) switch with the help of a neat diagram. Principle of time slot interchange  Time

Static or dynamic - artificial intelligence, Static or Dynamic - artificial...

Static or Dynamic - artificial intelligence An environment is static if it doesn't change while an agent's program is making the decision about how to act. When programming ag

What do you understand by work flow automation, What do you understand by w...

What do you understand by work flow automation? Work Flow Automation: Organizations often standardize processes over the organization and encourage users to adopt them. Ev

Define assembly, Define Assembly Assembly is a one deployable unit that...

Define Assembly Assembly is a one deployable unit that contains information about the execution of classes, structures and interfaces. it also keeps the information about itsel

Define logical data as operand data type, Q. Define Logical data as operand...

Q. Define Logical data as operand data type? Every word or byte is treated like a single unit of data. Whenever an n-bit data unit is considered as comprising n 1-bit items of

Define external variable declaration, Summarize the distinction between an ...

Summarize the distinction between an external variable definition and an external variable declaration. When we have ''declared'' a variable, we have meant that we have told th

Discuss the classifications of switching systems, Discuss the classificatio...

Discuss the classifications of switching systems. The categorizations of switching systems are specified in the block diagram given below:

What are the modes in which any update tasks work, What are the modes in wh...

What are the modes in which any update tasks work? Synchronous and Asynchronous.

What is e-cash, E-Cash:  E-cash is cash shown by two models. One is the...

E-Cash:  E-cash is cash shown by two models. One is the on-line form of e-cash (introduced by DigiCash) which permits for the completion of all types of internet transactions.

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