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 controls the screen flow, What controls the screen flow? The SET ...

What controls the screen flow? The SET SCREEN and LEAVE SCREEN statements controls screen flow.

Example on hamming error correcting code, Q. Example on hamming error corre...

Q. Example on hamming error correcting code? For illustration a 4-bit matching word can stand for 2 4 =16 values that range from 0 to 15 as: 0000, 0001, 0010, 0011, 0100, 01

Rhythm, Rhythm Rhythm in art refers to the way that your eye moves thr...

Rhythm Rhythm in art refers to the way that your eye moves through a picture and can be thought of in a similar way to rhythm in music. Your eye will move through some picture

What is the role of ir and pc, What is the role of IR and PC?  Instruct...

What is the role of IR and PC?  Instruction Register (IR) having the instruction being implemented. Its output is available to the control circuits, which make the timing signa

Explain step by step switching system with neat diagram, With the help of a...

With the help of a neat diagram explain a step by step switching system. Configuration of a step by step switching system: A step by step switching system may be constr

What do you mean by software poll, Q. What do you mean by Software Poll? ...

Q. What do you mean by Software Poll? In this scheme on occurrence of an interrupt, processor jumps to an interrupt service program or routine whose job is to poll (roll call

What is skew, What is skew? Clock Skew: In circuit design, clock ske...

What is skew? Clock Skew: In circuit design, clock skew is a phenomenon within synchronous circuits wherein the clock signal (sent through the clock circuit) arrives at dive

Draw and illustrate the block diagram of DMA controller, Draw and illustrat...

Draw and illustrate the block diagram of DMA controller. Also discuss the various modes in which DMAC works. Direct memory access (DMA) is a process in that an external device

Rational schema, write the rational schema and draw it’s dependency diagram...

write the rational schema and draw it’s dependency diagram. Identify all dependencies.

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