Simple assembly programs, Computer Engineering

Assignment Help:

Data Transfer

Two most fundamental data transfer instructions in 8086 microprocessor are XCHG and MOV. Let's give illustrations of the use of these instructions.

Program 1: This program displays the difference of XCHG and MOV instructions:

DATA SEGMENT

                                    VAL    DB      5678H                         ; initialize variable VAL

DATA ENDS

CODE SEGMENT

                                    ASSUME        CS:      CODE, DS: DATA

MAINP:                      MOV               AX, 1234H                 ; AH=12 & AL=34

                                    XCHG            AH, AL                       ; AH=34 & AL=12

                                    MOV               AX, 1234H                 ; AH=12 & AL=34

                                    MOV               BX, VAL                    ; BH=56 & BL=78

                                    XCHG            AX, BX                      ; AX=5678 & BX=1234

                                    XCHG            AH, BL                       ;AH=34,AL=78,BH=12,&BL=56

                                    MOV               AX, 4C00H                ; Halt using INT 21h

                                    INT                 21H

CODE ENDS

END MAINP


Related Discussions:- Simple assembly programs

DSP, Assignment of Analog to digital Ssignal Processing

Assignment of Analog to digital Ssignal Processing

user to enter the weight, A red and blue car were involved in a head-on co...

A red and blue car were involved in a head-on collision. The red car was at a standstill and the blue car was possibly  speeding. Eye witness video recorded suddenly following the

Explain about the object identity of object oriented, Explain about the Obj...

Explain about the Object Identity of object oriented analysis Object identity is a feature of an object that differentiates the objects from all other objects in the applicati

Determine the decimal equivalent of octal number, The number 140 in octal i...

The number 140 in octal is equivalent to decimal number ? Ans. (140) 8 = (96) 10 As 1 x 8 2 + 4 x 8 + 0x 1 = 64 + 32 = 96

Illustrate the working of flip-flops, Q. Illustrate the working of FLIP-FLO...

Q. Illustrate the working of FLIP-FLOPS? A flip-flop is a binary cell that stores 1-bit of information. It itself is a sequential circuit. We know that flip-flop can change its

Example on plane, Q. If a plane is in the air also there is a fly flying in...

Q. If a plane is in the air also there is a fly flying inside the plane does the plane get heavier when the fly lands? Answer:- It is true that a fly puts weight on a plan

Rules for calling assembly subroutines from, Q. Rules for calling assembly ...

Q. Rules for calling assembly subroutines from? The rules for calling assembly subroutines from C are: (i)  Memory model: The calling program and called assembly programs sh

Explain scripts and libraries introduction, Scripts A script within Rati...

Scripts A script within Rational Robot is a file that haves a sequence of SQABasic code. The extension of the file is always ".REC". Typically the script have an automated testc

Using aspx view engine, When using aspx view engine, to have a steady look ...

When using aspx view engine, to have a steady look and feel, across all pages of the application, we can build use of asp.net master pages. What is asp.net master pages equal, when

What is the need of a hybrid in telephone networks, What is the need of a h...

What is the need of a hybrid in telephone networks? Digital exchanges need receive and transmit signals upon separate two-wire circuits. It calls for two-wire to four-wire con

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