PASILAN Lab Activity 4 Basic Logic Instructions
PASILAN Lab Activity 4 Basic Logic Instructions
Lab Activity 4
Basic Logical Instructions
Objectives:
Materials/Equipment:
Theory/Concepts:
Procedure:
Part 4.1
Write a program in memory location to perform AND operation with the two numbers (1234
and 4321) to be stored in registers BX and AX. Record the status of the flag registers in
Table 4.1.
EVIDENCE 1
EVIDENCE 2
Table 4.1
Overflow Auxiliary
Sign Flag Zero Flag Parity Flag Carry Flag
Flag Flag
0 0 0 0 0 0
Observations:
In this laboratory activity part 1, we can observe that when we perform the logical
operation AND (each bit in a byte or word with the corresponding bit in another byte or word)
with the two number given, the result will show in the register, specifically in the AH & AL
registers. The output flags shown has neither 1output in all flags.
Part 4.2
Write a program in memory location to perform OR operation with the two numbers (5678
and 90AB) to be stored in registers CX and DX. Record the status of the flag registers in
Table 4.2.
EVIDENCE 1
EVIDENCE 2
Part 4.3
Write a program in memory location to perform XOR operation with the two numbers
(CDEF and 0123) to be stored in registers CX and AX. Record the status of the flag
registers in Table 4.3.
EVIDENCE 1
EVIDENCE 2
Overflow Auxiliary
Sign Flag Zero Flag Parity Flag Carry Flag
Flag Flag
0 1 0 0 1 0
Observations:
In this last activity, the logical operations XOR (Exclusive OR each bit in a byte or
word with the corresponding bit in another byte or word) is used to perform the given values
in CX and AX. We can observe the result output in the AH & AL register. Where H is the
higher order byte and L is the lower order byte.
V. Conclusions
At the end of this activity, I learned the theory or concepts of logical
instructions such as NOT (inverts), AND (AND each bit), OR (OR each bit),
XOR (exclusive OR each bit in a byte) and TEST (compares the contents of a
register). Additional to that I gained in depth knowledge about the meaning of
register status flags and practicing an assembly languge using this laboratory
activity with logical instruction as a center of focus.