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

What is load testing, Load testing is to test that if the application works...

Load testing is to test that if the application works well with the loads that result from large number of concurrent users, transactions and to verify whether it can handle peak u

Parallel edge or self loop of the total number of edges, A graph with n ver...

A graph with n vertices will definitely have a parallel edge or self loop of the total number of edges are More than n(n-1)/2

By which except ions of type error in java are handled, Except ions of type...

Except ions of type error in JAVA are handled by? Except ions of type error in the JAVA are handled through JAVA run time environment.

Visual perception problems, In AI the process of perception is studied ...

In AI the process of perception is studied as a set operations. A visual scene may be encoded by sensors and represented as matrix of intensity values. These are processed b

What is external interrupt, External Interrupt: Interrupt signal came ...

External Interrupt: Interrupt signal came from input-output devices connected external to processor. These interrupts depend on external conditions that are independent of the

Why data bus is bidirectional, Why data bus is bidirectional and address bu...

Why data bus is bidirectional and address bus is unidirectional in most microprocessors? The data bus is bidirectional because the data bus has to transfer data among the CPU a

Explain in brief about compact disks, Explain in brief about Compact disks ...

Explain in brief about Compact disks (CD) These are an optical storage media that have basically taken over from floppy disk. Software is now generally supplied on a CD (in for

What is rational administrator, Use the Rational Administrator to: * M...

Use the Rational Administrator to: * Make and manage projects. * Make a project under configuration management. * Make a project outside of configuration management.

Associative mapping - computer architecture, Associative Mapping: It i...

Associative Mapping: It is a more flexible mapping technique A primary memory block can be placed into any specific cache block position. Space in the cache may be

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

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