0% found this document useful (0 votes)
80 views5 pages

Lab 2 To Display and Manipulate The Output of Data Transfer Instructions Using Emu8086 Software Tool. Objectives

This document describes a lab experiment on using the emu8086 software tool to display and manipulate data using MOV and XCHG instructions. The objectives are to use MOV to move data between registers and memory locations, and to use XCHG to swap register values. The methodology section describes prelab tasks that move data between registers using MOV and swap register values using XCHG. It also describes lab tasks to move partial register values and swap register and memory values. The results section displays the output of executing the tasks. The conclusion is that the lab teaches how to swap registers and swap memory and registers.

Uploaded by

Afaq Khaliq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views5 pages

Lab 2 To Display and Manipulate The Output of Data Transfer Instructions Using Emu8086 Software Tool. Objectives

This document describes a lab experiment on using the emu8086 software tool to display and manipulate data using MOV and XCHG instructions. The objectives are to use MOV to move data between registers and memory locations, and to use XCHG to swap register values. The methodology section describes prelab tasks that move data between registers using MOV and swap register values using XCHG. It also describes lab tasks to move partial register values and swap register and memory values. The results section displays the output of executing the tasks. The conclusion is that the lab teaches how to swap registers and swap memory and registers.

Uploaded by

Afaq Khaliq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Lab 2

To display and manipulate the output of data transfer instructions using emu8086 software
tool.

Objectives
 To display and manipulate the output of MOV Instruction using emu8086 software tool.
 To display and manipulate the output of XCHG Instruction using emu8086 software tool.

Introduction
In this lab we learn about the instruction of the move ‘MOV’ and exchange command ‘XCHG’.
Assembly language is not case sensitive in which we write the ‘mov & MOV’ command in upper
& lower case. Some of the Instructions &operation are use in emulator for exchange & also for
swapping the values for examples ‘register to memory’etc.

Methodologoy
In Prelab task 1, in which take the values to CX, DX registers. Consider AX register as a temporary
register. For swapping The value of the CX register pass to AX register using ‘mov’ command. After that
the values of the DX register pass to CX register using ‘mov’ command. At last the value of the AX
register pass to DX register using ‘mov’ command.

In Prelab task 2, in which take the values to AX, BX registers. The values of the AX register pass to DS
register using ‘mov’ command. After that the values of the BX register pass to SS register using ‘mov’
command. At last the value of the AX register pass to SS register using ‘mov’ command and also the
value of the BX register pass to DS register using ‘mov’ command.

In Prelab task 3, in which take the values to AX, BX, DX registers. The values of the AX register pass to
DS register using ‘mov’ command. Pass the value of DX to a memory location. Another takes value of
the AX register and pass to DS register. Pass the value of BX to memory location. Takes last value of the
AX register and pass to DS register. Memory takes to DX register. Takes the 2 nd last value of AX and
pass to DS register. Another memory passes to BX register. Consider CX register as a temporary register.
Move the values DX to CX registers. For swapping, the values of the BX register pass to DX register
using ‘mov’ command. After that the values of the CX register pass to DX register using ‘mov’
command. At last the value of the AX register pass to DX register using ‘mov’ command.

In lab task 1, take the value BX register. The higher value of the BX register pass to lower value of AX
register using ‘mov’ command. After that the lower value of the BX register pass to higher value of BX
register using ‘mov’ command. At last the value of the AL register pass to BL register using ‘mov’
command.

In lab task 2 part 1, load the values AX,BX,CX,DX register


nd
“A154”,”7812”,”9067”,”BFD3”respectively.In 2 part, take value CL register and also DH. Value of CL
register passes to memory. Pass value DH to CL. Pass memory to DH register. Values of CL & DH
register pass to memory location. In 3 rd part, take value CL register and also DH. Value of AH register
passes to memory. Pass value BL to AL. Pass memory to BL register. Values of AL & AH register pass
to memory location.

Results
Pretask1
Pretask2

Pretask 3

Inlabtask1
Inlab task2(a)

Inlab task2(b)
Inlab task2(c)

Conclusion

In this lab we learn about how to swap out two register, swap out memory to register & register to
memory.

You might also like