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

Register data type as combinational element, Reg data type as Combinational...

Reg data type as Combinational element module reg_combo_example( a, b, y); input a, b; output y; reg y; wire a, b; always @ ( a or b) begin y = a & b; e

Interfacing of keyboards, Q. Interfacing of keyboards? The keyboard emp...

Q. Interfacing of keyboards? The keyboard employs a special Input/output port which is similar to a serial port however doesn't explicitly follow the RS-232 serial port standar

Develop a regular expression for real number and identifier, Develop a regu...

Develop a regular expression for Real number with optional fraction and Identifier. (i) A regular expression for real number with optional fraction is [+ | -] (d) +. (d)* (i

Computer science, Read in integers until a zero is read in. Keep a total o...

Read in integers until a zero is read in. Keep a total of both the quantity and the sum of the negative integers and the positive integers. Once a zero is read in (signifying the

How to upgrade to the latest version using magento connect, Upgrading Magen...

Upgrading Magento to the latest version is a fairly easy task. Copy and Paste this key magento-core/Mage_All_Latest VIA Magento Connect where it states Paste extension key to insta

Evaluate speed of disk drive, Q. Evaluate Speed of disk drive? Drive S...

Q. Evaluate Speed of disk drive? Drive Speed: Amount of information which can be transferred in or out of memory in a second is called as disk drive speed or data transfer ra

Describe clusters in cellular systems, Question: a) With the help of a...

Question: a) With the help of a diagram, describe clusters in cellular systems. b) Describe the role of the following components in the GSM architecture Radio Sub-Sy

Define the don''t care states - simplifying k maps, Define the Don't Care S...

Define the Don't Care States - Simplifying K Maps? The Truth table specifications for a logic function may not to include all possible combinations of the input binary digits for

Instruction-execution cycle, Problem (a) Using a labelled diagram of ...

Problem (a) Using a labelled diagram of an Instruction-Execution cycle, describe how a CPU executes single machine instructions by referring to the five main operations.

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