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

Explain overlay structured program, Explain overlay structured program ? ...

Explain overlay structured program ? A program having overlays is termed as overlay structured program, here an overlay is a part of program that has similar load origin as som

What is central processing unit, What is Central Processing Unit Centra...

What is Central Processing Unit Central Processing Unit (CPU) performs all the arithmetic and logical calculations in a computer. The CPU is said to be the brain of the compute

Describe how the it infrastructure is designed, IT Management 1. Descri...

IT Management 1. Describe how the IT infrastructure is designed. 2. Explain briefly the audit planning phase in IT Audit 3. Explain localized and distributed load balanci

State the relative addressing, State the Relative addressing The locati...

State the Relative addressing The location of data is specified relative to current value of the program counter. This is helpful for specifying location of data which is given

What are the reasons behind using intranet, Reason behind using Intranet ...

Reason behind using Intranet The major reasons for doing this include: -  Safer as there is less chance of external viruses or hacking -  It's possible to prevent employe

Counter, mod12 counter connection diagram

mod12 counter connection diagram

Explain about annotational notations, Explain about Annotational Notations ...

Explain about Annotational Notations These notations may be applied to describe remark and illuminate about any element in the model. They are considered as explanatory of U

Role of internet, Role of Internet, Intranet and extranet in e-business ...

Role of Internet, Intranet and extranet in e-business The following information activities are carried out in many business: 1.  Selling of raw materials 2.  Advertising o

Boolean expression derived from this k-map, Let us see the pairs that can b...

Let us see the pairs that can be considered as adjacent in Karnaugh's here. The pairs are:  1)  The four corners  2)  The four 1's as in top and bottom in column 00 & 01

What are language processor development tools, What are Language Processor ...

What are Language Processor Development Tools (LPDTs)? LPDT that is Language processor development tools focuses upon generation of the analysis phase of language processors. T

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