SlideShare a Scribd company logo
2
Most read
3
Most read
18
Most read
Lab Report 02
1 |G r o u p # 1 0
LAB 02
Implementing Data Instructions in Emu8086
Objective:
Learn
 How 8086 executes data instructions
.
Learn how to:
 Write programs in Emu8086 using data instructions
 Write a complete assembly program.
 Use Emu8086 to execute written programs
 Use Emu8086 to execute single instruction at a time.
 Edit an existing source program.
Lab Outcomes:
Practice 8086 Emulator
 Loading, verifying and saving machine code of data instructions.
 Executing data instructions and tracing programs.
1. Data Transfer Instructions: These instructions are used to transfer the data from source
operand to destination operand. All the store, move, load, exchange, input and output
instructions belong to this group.
General purpose byte or word transfer instructions:
(a) MOV : Copy byte or word from specified source to specified destination
(b) PUSH : Push the specified word to top of the stack
(c) POP : Pop the word from top of the stack to the specified location
(d) XCHG : Exchange the contents of the specified source and destination operands one
of which may be a register or memory location.
(e) PUSHA : Push all registers to the stack
(f) POPA : Pop the words from stack to all registers
Lab Report 02
2 |G r o u p # 1 0
Task 1: Write an assembly language program in which you will send three 16-bit
numbers to AX, BX and CX registers respectively. After that PUSH the values of the
registers to the stack. Furthermore, exchange the contents of AL with AH register, BL
with BH register and CL with CH register. Now, POP the values back to AX, BX and
CX registers. Check the final results in the registers and compare it with the previous
values.
Coding in emu8086:
MOV AX,07A2H
MOV BX,1A63H
MOV CX,08C3H
PUSH AX
PUSH BX
PUSH CX
XCHG AL,AH
XCHG BL,BH
XCHG CL,CH
POP AX
POP BX
POP CX
Lab Report 02
3 |G r o u p # 1 0
Running emu step by step:
1st
step: Storing 07A2 in AX register
Analysis:
Value is stored in AX register and address of IP also changed.
Lab Report 02
4 |G r o u p # 1 0
2nd
step: Storing 1A63 in BX register.
Analysis:
Value is stored in BX register and address of IP also changed.
Lab Report 02
5 |G r o u p # 1 0
3rd
step: Storing 08C3 in CX register.
Analysis:
Value is stored in CX register and address of IP also changed.
Lab Report 02
6 |G r o u p # 1 0
4th
step: Now pushing all the three registers to stack.
Analysis:
All the registers are pushed to stack but address of IP and SP is also changed for each
time when a register is pushed into stack.
Lab Report 02
7 |G r o u p # 1 0
5th
step: Exchanging the values of AL with AH.
Analysis:
Value of AL and AH are exchanged.
Lab Report 02
8 |G r o u p # 1 0
6th
step: Exchanging the values of BL with BH.
Analysis:
Values of BL and BH are exchanged.
Lab Report 02
9 |G r o u p # 1 0
7th
step: Exchanging the values of CL with CH.
Analysis:
Values of CL and CH are exchanged.
Lab Report 02
10 |G r o u p # 1 0
8th
step: Pop all values of registers from stack.
Analysis:
All values of registers are poped again from stack to registers. But values of AX and
CX are interchanged because stack works on last in first out (LIFO).
As after every command addresses of registers are changed respectively which are analysed
in table 1.
Lab Report 02
11 |G r o u p # 1 0
Table no 1
Task #2: Write an assembly language program in which you will send random values
to AX,BX,CX,DX,SI,DI,SP and BP. Push all the values to stack. After that clear all the
registers except SP. Now, Pop all the stack values to the above mentioned register again.
Check the final results and compare with the previous values.
Coding in emu8086:
MOV AX,283AH
MOV BX,83C2H
MOV CX,0928H
MOV DX,1234H
MOV SI,0001H
MOV DI,7300H
MOV SP,0100H
MOV BP,0199H
PUSHA
MOV AX,0000H
MOV BX,0000H
MOV CX,0000H
MOV DX,0000H
MOV SI,0000H
MOV DI,0000H
MOV BP,0000H
POPA
HLT
Instructions
AX BX CX DX CS IP SS SP BP SI DI DS ES
AL AH BL BH CL CH DL DH
MOV
AX,07A2H
A2 07 00 00 00 00 00 00 0100 0003 0100 FFFE 0000 0000 0000 0100 0100
MOV
BX,1A63H
A2 07 63 1A 00 00 00 00 0100 0006 0100 FFFE 0000 0000 0000 0100 0100
MOV
CX,08C3H
A2 07 63 1A C3 08 00 00 0100 0009 0100 FFFE 0000 0000 0000 0100 0100
PUSH AX A2 07 63 1A C3 08 00 00 0100 000A 0100 FFFC 0000 0000 0000 0100 0100
PUSH BX A2 07 63 1A C3 08 00 00 0100 000B 0100 FFFA 0000 0000 0000 0100 0100
PUSH CX A2 07 63 1A C3 08 00 00 0100 000C 0100 FFF8 0000 0000 0000 0100 0100
XCHG AL,AH 07 A2 63 1A C3 08 00 00 0100 000E 0100 FFF8 0000 0000 0000 0100 0100
XCHG BL,BH 07 A2 1A 63 C3 08 00 00 0100 0010 0100 FFF8 0000 0000 0000 0100 0100
XCHG CL,CH 07 A2 1A 63 08 C3 00 00 0100 0002 0100 FFF8 0000 0000 0000 0100 0100
POP AX C3 08 1A 63 C3 08 00 00 0100 0013 0100 FFFA 0000 0000 0000 0100 0100
POP BX C3 08 63 1A C3 08 00 00 0100 0014 0100 FFFC 0000 0000 0000 0100 0100
POP CX C3 08 63 1A A2 07 00 00 0100 0015 0100 FFFE 0000 0000 0000 0100 0100
Lab Report 02
12 |G r o u p # 1 0
Running emu step by step:
1st
step: Storing 283A in AX register.
Analysis: 283A is stored in AX.
Lab Report 02
13 |G r o u p # 1 0
2nd
Step : Storing 83C2 in BX.
Analysis: Value 83C2 is stored in BX.
3rd
step: Storing 0928 in CX
Analysis: Value 0928 is stored in CX.
Lab Report 02
14 |G r o u p # 1 0
4th
step: Storing 1234 in DX.
Analysis: 1234 is stored in DX but address of IP also changed.
5th
step: storing 0001 in SI.
Analysis: 0001 is stored in SI but address of IP also changed.
Lab Report 02
15 |G r o u p # 1 0
6th
step: Storing 7300 in DI.
Analysis: 7300 is stored in DI but address of IP also changed.
7th
step: Storing 0100 in SP register.
Analysis: 0100 is stored in SP but address of IP also changed.
Lab Report 02
16 |G r o u p # 1 0
8th
step: Storing 0199 in BP register.
Analysis: 0199 is stored in BP but address of IP also changed.
9th
step: Pushing all registers to stack register.
Analysis: All values of registers are pushed to stack but address of IP and SP also changed.
Lab Report 02
17 |G r o u p # 1 0
10th
step: Clearing all registers except SP by storing 0000 in it.
Analysis: All registers are cleared except SP.
11th
Step: Pop all values of registers from stack.
Analysis: All values of registers are pop to them again.
Lab Report 02
18 |G r o u p # 1 0
Table 2
Conclusion:
In this lab I had learnt to write programs in Emu8086 using data instructions,
complete assembly program, execute written programs and single instruction at a time.
Also I learnt to edit an existing source program.
I had practiced 8086 Emulator loading, verifying and saving machine code of data
instructions, executing data instructions and tracing programs.
Results are shown in table 1 and table 2.
Instructions
AX BX CX DX CS IP SS SP BP SI DI DS ES
AL AH BL BH CL CH DL DH
MOV
AX,283AH
3A 28 00 00 00 00 00 00 0100 0003 0100 FFFE 0000 0000 0000 0100 0100
MOV
BX,83C2H
3A 28 83 C2 00 00 00 00 0100 0006 0100 FFFE 0000 0000 0000 0100 0100
MOV
CX,0928H
3A 28 83 C2 09 28 00 00 0100 0009 0100 FFFE 0000 0000 0000 0100 0100
MOV
DX,1234H
3A 28 83 C2 09 28 12 34 0100 000C 0100 FFFE 0000 0000 0000 0100 0100
MOV
SI,0001H
3A 28 83 C2 09 28 12 34 0100 000F 0100 FFFE 0000 0001 0000 0100 0100
MOV
DI,7300H
3A 28 83 C2 09 28 12 34 0100 0012 0100 FFFE 0000 0001 7300 0100 0100
MOV
SP,0100H
3A 28 83 C2 09 28 12 34 0100 0015 0100 0100 0000 0001 7300 0100 0100
MOV
BP,0199H
3A 28 83 C2 09 28 12 34 0100 0018 0100 0100 0199 0001 7300 0100 0100
PUSHA 3A 28 83 C2 09 28 12 34 0100 0019 0100 00F0 0199 0001 7300 0100 0100
MOV
AX,0000H
00 00 83 C2 09 28 12 34 0100 001C 0100 00F0 0199 0001 7300 0100 0100
MOV
BX,0000H
00 00 00 00 09 28 12 34 0100 001F 0100 00F0 0199 0001 7300 0100 0100
MOV
CX,0000H
00 00 00 00 00 00 12 34 0100 0022 0100 00F0 0199 0001 7300 0100 0100
MOV
DX,0000H
00 00 00 00 00 00 00 00 0100 0025 0100 00F0 0199 0001 7300 0100 0100
MOV
SI,0000H
00 00 00 00 00 00 00 00 0100 0028 0100 00F0 0199 0000 7300 0100 0100
MOV
DI,0000H
00 00 00 00 00 00 00 00 0100 002B 0100 00F0 0199 0000 0000 0100 0100
MOV
BP,0000H
00 00 00 00 00 00 00 00 0100 002E 0100 00F0 0000 0000 0000 0100 0100
POPA 3A 28 83 C2 09 28 12 34 0100 002F 0100 0100 0199 0001 7300 0100 0100

More Related Content

PPTX
Instruction sets of 8086
PPTX
Addressing modes of 8086
PPTX
Instruction set of 8086
PPTX
Direct memory access (dma) with 8257 DMA Controller
PPTX
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
PPT
Switch level modeling
PDF
VLSI Fresher Resume
DOCX
UNIT I- CPLD & FPGA ARCHITECTURE & APPLICATIONS
Instruction sets of 8086
Addressing modes of 8086
Instruction set of 8086
Direct memory access (dma) with 8257 DMA Controller
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
Switch level modeling
VLSI Fresher Resume
UNIT I- CPLD & FPGA ARCHITECTURE & APPLICATIONS

What's hot (20)

PPTX
Interfacing memory with 8086 microprocessor
PDF
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
PDF
Encoder & Decoder
PPTX
Microprocessor 8086 instructions
PPTX
Instruction set of 8086
PPTX
8251 USART
PPTX
Register Organisation of 8086 Microprocessor
PPTX
PPT
Microprocessor 80386
PPTX
Pin Diagram and block diagram 8085 .pptx
PDF
8086 Register organization and Architecture details
PPT
Modes Of Transfer in Input/Output Organization
PPTX
Arm cortex-m4 programmer model
PPTX
Architecture of 8086 microprocessor
PPTX
Introduction to arm processor
PPTX
8257 DMA Controller
PPTX
Stack and its usage in assembly language
PPTX
8237 dma controller
PDF
Code conversion using verilog code VHDL
Interfacing memory with 8086 microprocessor
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
Encoder & Decoder
Microprocessor 8086 instructions
Instruction set of 8086
8251 USART
Register Organisation of 8086 Microprocessor
Microprocessor 80386
Pin Diagram and block diagram 8085 .pptx
8086 Register organization and Architecture details
Modes Of Transfer in Input/Output Organization
Arm cortex-m4 programmer model
Architecture of 8086 microprocessor
Introduction to arm processor
8257 DMA Controller
Stack and its usage in assembly language
8237 dma controller
Code conversion using verilog code VHDL
Ad

Similar to implementation of data instrucions in emu8086 (20)

DOCX
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086
PPTX
UNIT II.pptx
PDF
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
PPT
Chapter 3 instruction set-of-8085
PPT
microp-8085 74 instructions for mct-A :P-2
PPT
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
PPT
microp-8085 74 instructions for mct-A :P
PDF
4CS3-MPI-Unit-2.pdf microprocessor and interface
PPSX
Microprocessor architecture II
PPTX
Instruction set 8085
PPT
Microcontroller 8051- soft.ppt
PDF
Real Time Embedded System
PPT
1. Instructionset.pptfor engineering student
PDF
Instructionsetof8086 180224060745(3)
DOCX
Instruction set of 8086
PPT
Unit 2 8086 Instruction set.ppt notes good
PDF
Chapter 4 instruction set of 8086 microprocessor.pdf
PDF
Chapter 5 and 6 instructions and program control instructions.pdf
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086
UNIT II.pptx
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
Chapter 3 instruction set-of-8085
microp-8085 74 instructions for mct-A :P-2
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
microp-8085 74 instructions for mct-A :P
4CS3-MPI-Unit-2.pdf microprocessor and interface
Microprocessor architecture II
Instruction set 8085
Microcontroller 8051- soft.ppt
Real Time Embedded System
1. Instructionset.pptfor engineering student
Instructionsetof8086 180224060745(3)
Instruction set of 8086
Unit 2 8086 Instruction set.ppt notes good
Chapter 4 instruction set of 8086 microprocessor.pdf
Chapter 5 and 6 instructions and program control instructions.pdf
Ad

More from COMSATS Abbottabad (20)

PDF
Kalman filter
PDF
Enterpreneurship
PPTX
Sine wave inverter
PPTX
Light Tracking Solar Panel
PDF
Analysis of Electro-Mechanical System
PDF
coding and burning program in FPGA
PDF
8 bit full adder
PDF
Fabrication process of Integrated Circuit (IC's)
PDF
Addition, subtraction and multiplication in assembly language
PDF
Mathematical Modelling of Electro-Mechanical System in Matlab
PDF
Mathematical Modelling of Electrical/Mechanical modellinng in MATLAB
PDF
Introduction to MATLAB
PDF
Encoder + decoder
PDF
Principles of Communication
PDF
Aurduino coding for transformer interfacing
PDF
Transformer Interfacing with Laptop
PDF
Temperature control Switch and Display By Led
PPTX
stress and strain
PDF
Generating PM wave
PDF
Generating FM wave
Kalman filter
Enterpreneurship
Sine wave inverter
Light Tracking Solar Panel
Analysis of Electro-Mechanical System
coding and burning program in FPGA
8 bit full adder
Fabrication process of Integrated Circuit (IC's)
Addition, subtraction and multiplication in assembly language
Mathematical Modelling of Electro-Mechanical System in Matlab
Mathematical Modelling of Electrical/Mechanical modellinng in MATLAB
Introduction to MATLAB
Encoder + decoder
Principles of Communication
Aurduino coding for transformer interfacing
Transformer Interfacing with Laptop
Temperature control Switch and Display By Led
stress and strain
Generating PM wave
Generating FM wave

Recently uploaded (20)

PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Sports Quiz easy sports quiz sports quiz
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Complications of Minimal Access Surgery at WLH
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
GDM (1) (1).pptx small presentation for students
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
RMMM.pdf make it easy to upload and study
PDF
Classroom Observation Tools for Teachers
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
01-Introduction-to-Information-Management.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Sports Quiz easy sports quiz sports quiz
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Microbial diseases, their pathogenesis and prophylaxis
PPH.pptx obstetrics and gynecology in nursing
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Complications of Minimal Access Surgery at WLH
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
VCE English Exam - Section C Student Revision Booklet
GDM (1) (1).pptx small presentation for students
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Supply Chain Operations Speaking Notes -ICLT Program
RMMM.pdf make it easy to upload and study
Classroom Observation Tools for Teachers
O7-L3 Supply Chain Operations - ICLT Program
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
human mycosis Human fungal infections are called human mycosis..pptx
01-Introduction-to-Information-Management.pdf

implementation of data instrucions in emu8086

  • 1. Lab Report 02 1 |G r o u p # 1 0 LAB 02 Implementing Data Instructions in Emu8086 Objective: Learn  How 8086 executes data instructions . Learn how to:  Write programs in Emu8086 using data instructions  Write a complete assembly program.  Use Emu8086 to execute written programs  Use Emu8086 to execute single instruction at a time.  Edit an existing source program. Lab Outcomes: Practice 8086 Emulator  Loading, verifying and saving machine code of data instructions.  Executing data instructions and tracing programs. 1. Data Transfer Instructions: These instructions are used to transfer the data from source operand to destination operand. All the store, move, load, exchange, input and output instructions belong to this group. General purpose byte or word transfer instructions: (a) MOV : Copy byte or word from specified source to specified destination (b) PUSH : Push the specified word to top of the stack (c) POP : Pop the word from top of the stack to the specified location (d) XCHG : Exchange the contents of the specified source and destination operands one of which may be a register or memory location. (e) PUSHA : Push all registers to the stack (f) POPA : Pop the words from stack to all registers
  • 2. Lab Report 02 2 |G r o u p # 1 0 Task 1: Write an assembly language program in which you will send three 16-bit numbers to AX, BX and CX registers respectively. After that PUSH the values of the registers to the stack. Furthermore, exchange the contents of AL with AH register, BL with BH register and CL with CH register. Now, POP the values back to AX, BX and CX registers. Check the final results in the registers and compare it with the previous values. Coding in emu8086: MOV AX,07A2H MOV BX,1A63H MOV CX,08C3H PUSH AX PUSH BX PUSH CX XCHG AL,AH XCHG BL,BH XCHG CL,CH POP AX POP BX POP CX
  • 3. Lab Report 02 3 |G r o u p # 1 0 Running emu step by step: 1st step: Storing 07A2 in AX register Analysis: Value is stored in AX register and address of IP also changed.
  • 4. Lab Report 02 4 |G r o u p # 1 0 2nd step: Storing 1A63 in BX register. Analysis: Value is stored in BX register and address of IP also changed.
  • 5. Lab Report 02 5 |G r o u p # 1 0 3rd step: Storing 08C3 in CX register. Analysis: Value is stored in CX register and address of IP also changed.
  • 6. Lab Report 02 6 |G r o u p # 1 0 4th step: Now pushing all the three registers to stack. Analysis: All the registers are pushed to stack but address of IP and SP is also changed for each time when a register is pushed into stack.
  • 7. Lab Report 02 7 |G r o u p # 1 0 5th step: Exchanging the values of AL with AH. Analysis: Value of AL and AH are exchanged.
  • 8. Lab Report 02 8 |G r o u p # 1 0 6th step: Exchanging the values of BL with BH. Analysis: Values of BL and BH are exchanged.
  • 9. Lab Report 02 9 |G r o u p # 1 0 7th step: Exchanging the values of CL with CH. Analysis: Values of CL and CH are exchanged.
  • 10. Lab Report 02 10 |G r o u p # 1 0 8th step: Pop all values of registers from stack. Analysis: All values of registers are poped again from stack to registers. But values of AX and CX are interchanged because stack works on last in first out (LIFO). As after every command addresses of registers are changed respectively which are analysed in table 1.
  • 11. Lab Report 02 11 |G r o u p # 1 0 Table no 1 Task #2: Write an assembly language program in which you will send random values to AX,BX,CX,DX,SI,DI,SP and BP. Push all the values to stack. After that clear all the registers except SP. Now, Pop all the stack values to the above mentioned register again. Check the final results and compare with the previous values. Coding in emu8086: MOV AX,283AH MOV BX,83C2H MOV CX,0928H MOV DX,1234H MOV SI,0001H MOV DI,7300H MOV SP,0100H MOV BP,0199H PUSHA MOV AX,0000H MOV BX,0000H MOV CX,0000H MOV DX,0000H MOV SI,0000H MOV DI,0000H MOV BP,0000H POPA HLT Instructions AX BX CX DX CS IP SS SP BP SI DI DS ES AL AH BL BH CL CH DL DH MOV AX,07A2H A2 07 00 00 00 00 00 00 0100 0003 0100 FFFE 0000 0000 0000 0100 0100 MOV BX,1A63H A2 07 63 1A 00 00 00 00 0100 0006 0100 FFFE 0000 0000 0000 0100 0100 MOV CX,08C3H A2 07 63 1A C3 08 00 00 0100 0009 0100 FFFE 0000 0000 0000 0100 0100 PUSH AX A2 07 63 1A C3 08 00 00 0100 000A 0100 FFFC 0000 0000 0000 0100 0100 PUSH BX A2 07 63 1A C3 08 00 00 0100 000B 0100 FFFA 0000 0000 0000 0100 0100 PUSH CX A2 07 63 1A C3 08 00 00 0100 000C 0100 FFF8 0000 0000 0000 0100 0100 XCHG AL,AH 07 A2 63 1A C3 08 00 00 0100 000E 0100 FFF8 0000 0000 0000 0100 0100 XCHG BL,BH 07 A2 1A 63 C3 08 00 00 0100 0010 0100 FFF8 0000 0000 0000 0100 0100 XCHG CL,CH 07 A2 1A 63 08 C3 00 00 0100 0002 0100 FFF8 0000 0000 0000 0100 0100 POP AX C3 08 1A 63 C3 08 00 00 0100 0013 0100 FFFA 0000 0000 0000 0100 0100 POP BX C3 08 63 1A C3 08 00 00 0100 0014 0100 FFFC 0000 0000 0000 0100 0100 POP CX C3 08 63 1A A2 07 00 00 0100 0015 0100 FFFE 0000 0000 0000 0100 0100
  • 12. Lab Report 02 12 |G r o u p # 1 0 Running emu step by step: 1st step: Storing 283A in AX register. Analysis: 283A is stored in AX.
  • 13. Lab Report 02 13 |G r o u p # 1 0 2nd Step : Storing 83C2 in BX. Analysis: Value 83C2 is stored in BX. 3rd step: Storing 0928 in CX Analysis: Value 0928 is stored in CX.
  • 14. Lab Report 02 14 |G r o u p # 1 0 4th step: Storing 1234 in DX. Analysis: 1234 is stored in DX but address of IP also changed. 5th step: storing 0001 in SI. Analysis: 0001 is stored in SI but address of IP also changed.
  • 15. Lab Report 02 15 |G r o u p # 1 0 6th step: Storing 7300 in DI. Analysis: 7300 is stored in DI but address of IP also changed. 7th step: Storing 0100 in SP register. Analysis: 0100 is stored in SP but address of IP also changed.
  • 16. Lab Report 02 16 |G r o u p # 1 0 8th step: Storing 0199 in BP register. Analysis: 0199 is stored in BP but address of IP also changed. 9th step: Pushing all registers to stack register. Analysis: All values of registers are pushed to stack but address of IP and SP also changed.
  • 17. Lab Report 02 17 |G r o u p # 1 0 10th step: Clearing all registers except SP by storing 0000 in it. Analysis: All registers are cleared except SP. 11th Step: Pop all values of registers from stack. Analysis: All values of registers are pop to them again.
  • 18. Lab Report 02 18 |G r o u p # 1 0 Table 2 Conclusion: In this lab I had learnt to write programs in Emu8086 using data instructions, complete assembly program, execute written programs and single instruction at a time. Also I learnt to edit an existing source program. I had practiced 8086 Emulator loading, verifying and saving machine code of data instructions, executing data instructions and tracing programs. Results are shown in table 1 and table 2. Instructions AX BX CX DX CS IP SS SP BP SI DI DS ES AL AH BL BH CL CH DL DH MOV AX,283AH 3A 28 00 00 00 00 00 00 0100 0003 0100 FFFE 0000 0000 0000 0100 0100 MOV BX,83C2H 3A 28 83 C2 00 00 00 00 0100 0006 0100 FFFE 0000 0000 0000 0100 0100 MOV CX,0928H 3A 28 83 C2 09 28 00 00 0100 0009 0100 FFFE 0000 0000 0000 0100 0100 MOV DX,1234H 3A 28 83 C2 09 28 12 34 0100 000C 0100 FFFE 0000 0000 0000 0100 0100 MOV SI,0001H 3A 28 83 C2 09 28 12 34 0100 000F 0100 FFFE 0000 0001 0000 0100 0100 MOV DI,7300H 3A 28 83 C2 09 28 12 34 0100 0012 0100 FFFE 0000 0001 7300 0100 0100 MOV SP,0100H 3A 28 83 C2 09 28 12 34 0100 0015 0100 0100 0000 0001 7300 0100 0100 MOV BP,0199H 3A 28 83 C2 09 28 12 34 0100 0018 0100 0100 0199 0001 7300 0100 0100 PUSHA 3A 28 83 C2 09 28 12 34 0100 0019 0100 00F0 0199 0001 7300 0100 0100 MOV AX,0000H 00 00 83 C2 09 28 12 34 0100 001C 0100 00F0 0199 0001 7300 0100 0100 MOV BX,0000H 00 00 00 00 09 28 12 34 0100 001F 0100 00F0 0199 0001 7300 0100 0100 MOV CX,0000H 00 00 00 00 00 00 12 34 0100 0022 0100 00F0 0199 0001 7300 0100 0100 MOV DX,0000H 00 00 00 00 00 00 00 00 0100 0025 0100 00F0 0199 0001 7300 0100 0100 MOV SI,0000H 00 00 00 00 00 00 00 00 0100 0028 0100 00F0 0199 0000 7300 0100 0100 MOV DI,0000H 00 00 00 00 00 00 00 00 0100 002B 0100 00F0 0199 0000 0000 0100 0100 MOV BP,0000H 00 00 00 00 00 00 00 00 0100 002E 0100 00F0 0000 0000 0000 0100 0100 POPA 3A 28 83 C2 09 28 12 34 0100 002F 0100 0100 0199 0001 7300 0100 0100