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 file allocation table, Q. What is File allocation table? FAT ma...

Q. What is File allocation table? FAT maps the usage of data space of disk. It comprises information about space used by every individual file and unused disk space as well as

Basic tradeoff of concerns for instruction set design, Q. Basic Tradeoff of...

Q. Basic Tradeoff of concerns for instruction set design? Basic Tradeoff: Smaller instruction (less space) vs. desire for more powerful instruction repertoire. Generally p

Meaning of all variable, A project having of a set of jobs and a set of pre...

A project having of a set of jobs and a set of precedences, where precedence (i; j) show that job j cannot begin before job i is completed. Let c i be the duration of job i. We wi

Why network layer is used, Network Layer is used for (A)  Breaking up ...

Network Layer is used for (A)  Breaking up the data in frames for transmission (B)  Deal with Error correction (C)  Automatic Recovery of Procedure (D)  Physica

Which data structures used in language processing, Which structure can be u...

Which structure can be used as a criterion for classification of data structures used in language processing. And. Nature of a data structure, purpose of a data structure and l

Main memory location, Poor Richard's cache as explained in Conference Topic...

Poor Richard's cache as explained in Conference Topic 2. Suppose that a 7th word (gggg gggg) from main memory location 011110 is read and stored in cache. a) Determine the cach

Development of a successful system, The success of a system relies on the a...

The success of a system relies on the approach of building it. If development approach is right then system will work successfully. Figure below portrays a System Development Life

What is demand paging, What is major difference between the Historic Unix a...

What is major difference between the Historic Unix and the new BSD release of Unix System V in terms of Memory Management? Historic Unix uses Swapping - Whole process is tran

How deep does fifo require to be stop underflow or overflow, Given the subs...

Given the subsequent FIFO and rules, how deep does the FIFO require to be to stop underflow or overflow? RULES: a. frequency(clk_A) = frequency(clk_B) / 4 b. per

Discuss about the electronic computer, Discuss about the Electronic compute...

Discuss about the Electronic computer The first general function programmable electronic computer was the Electronic Numerical Integrator and Computer (ENIAC), built by John V

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