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

State the term- interviewing, State the term- Interviewing This involv...

State the term- Interviewing This involves a one to one question & answer session between analyst and customer/employee. A good method if analyst wants to probe deeply into on

What is parsing in grammatical structure, What is Parsing? Parsing: ...

What is Parsing? Parsing: It is the process of analyzing a text, made of an order of tokens, to find out its grammatical structure regarding a given formal grammar. Parsing

Describe key features of the von neumann architecture, Q. Describe key feat...

Q. Describe key features of the von Neumann Architecture? Describe key features of the von Neumann Architecture: The mainly basic function performed by a computer is exe

Iot, what is ardiuno explain its working

what is ardiuno explain its working

Remote-load latency problem, Remote-load Latency Problem:  When one process...

Remote-load Latency Problem:  When one processor requires some remote loading of data by other nodes, then the processor need to wait for these two remote load operations. The long

State disadvantages of object oriented analysis design, State Disadvantages...

State Disadvantages of object oriented analysis design You know that OO methods only create functional models within objects. There is no place in methodology to design a compl

Describe collective communications, Q. Collective Communications? A num...

Q. Collective Communications? A number of message-passing systems allow communication involving more than two processors. Such type of communication can be known as collective

Can the size of an array be declared at runtime, Can the size of an array b...

Can the size of an array be declared at runtime?              No, the size of an array can't be declared at run time, we always require to mention the dimensions of an array at

Eme, state function and path function

state function and path function

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