You are on page 1of 7

Name: JEFF ALLAN C.

ANTIGA Date: MAY 25, 2022

Section: BSEE ECE 124 – Microprocessor System

Laboratory Exercise 5

Arithmetic and logic instructions


OBJECTIVES:

At the end of the exercise, the students should be able to:


 Apply arithmetic and logic instructions;
SOFTWARE REQUIREMENT:\
 EMU 8086 4.08
Pre-Laboratory Work:
1. Write and Assemble Program 1.
2. Use the Emu 8086 to trace the program Program 1. Fill in the Table 1. Notice any changes in
The status flags, and explain them.
3. Study Program 2 and explain how these conversion is performed?
4. Write, assemble and run Program 2, and see what value is displayed.
5. Change the value of the variable NUM and see the output value.
6. Now change the value of RADIX and see the value displayed.

PROGRAM LISTING

Program No. 1
Fill in the Table while running the program above.

Statement Destination Content Status Flags


Before After
CF ZF SF OF P AF
F
1. MOV AX, NUM1 AX=0000H AX=0F62H - - - - - -
2. AND AX, 0FFDFH AX=0F62H AX=0F42H 0 0 0 0 1 ?
3. OR AL, 20H AL=42H AL=62H 0 0 0 0 0 ?
4. XOR NUM1, 0FF00H NUM1=0F62H NUM1=F062H 0 0 1 0 0 ?
5. NOT NUM2 NUM2=94H NUM2=FF6BH - - - - - -
6. XOR AX, AX AX=0F62H AX=0000H 0 1 0 0 1 ?
7. MOV AX, NUM1 AX=0000H AX=F062H - - - - - -
8. AND AX, 0008H AX=F062H AX=0000H 0 1 0 0 1 ?
9. XOR AX, 0080H AX=0000H AX=0080H 0 0 0 0 0 ?

Table 1. Effects of executing Program 1

Program No. 2
Observation:

Conclusion:
Screenshots / Attachments:

You might also like