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

Decision tree learning, Decision Tree Learning: Furthermore there is s...

Decision Tree Learning: Furthermore there is specified in the last lecture such as the representation scheme we choose to represent our learned solutions and the way that we l

Serial execution and parallel execution, Serial Execution Execution of ...

Serial Execution Execution of a program consecutively, one statement at a time. In the easiest sense, this is what occurs on a one processor machine. However, even many of the

Backpropagation, Backpropagation: However Backpropagation can be seen ...

Backpropagation: However Backpropagation can be seen as utilising searching a space of network configurations as weights in order to find a configuration with the least error,

Define parameters used in program annotation, Q. Define Parameters used in ...

Q. Define Parameters used in Program Annotation? Parameters: A parameter refines and extends the meaning that assembler attributes to keyword in a statement.  Number of param

Support for high-level language, With the increasing use of more and higher...

With the increasing use of more and higher level languages manufacturers had offered more powerful instructions to support them. It was claimed that a stronger instruction set will

EME, How can i made Carnot engine

How can i made Carnot engine

What is critical section problem, What is critical section problem?  Co...

What is critical section problem?  Consider a system having of 'n' processes. Each process has segment of code known as a critical section, in which the process may be changing

Combinational logic circuits, A circuit can be designed to perform manydiff...

A circuit can be designed to perform manydifferent functions e.g.a circuit has 3 inputs A, B and C and 3 outputs:Output X is logic level 1 (or 'high') if one or moreinputs are at l

Illustrate process of swapping system, What does the swapping system do if ...

What does the swapping system do if it identifies the illegal page for swapping? If the disk block descriptor does not have any record of the faulted page, then this causes the

Inheritance, Create a new project, LastNameFirst 05, for this assignment. ...

Create a new project, LastNameFirst 05, for this assignment. You will need to define the classes depicted in the class diagram below. All of the classes should contain complete ja

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