Академический Документы
Профессиональный Документы
Культура Документы
List file:
Flow Chart:
Result:
UNSIGNED NUMBERS
Flags:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=0, s=0, z=0, o=0, p=1, a=0, i=1, d=0.
Input:
OPR1 = 4269H
OPR2 = 1000H
Output:
RES = 5269H
SIGNED NUMBERS
Flags:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=1, s=0, z=0, o=1, p=0, a=0, i=1, d=0.
Input:
OPR1 = 9763H
OPR2 = A973H
Output:
RES = 40D6H
Tools:
Program:
List file:
Flow Chart:
Result:
UNSIGNED NUMBERS
Flags:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=0, s=0, z=0, o=0, p=1, a=0, i=1, d=0.
Input:
OPR1 = 4269H
OPR2 = 1000H
Output:
RES = 3269H
SIGNED NUMBERS
Flags:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=0, s=0, z=0, o=0, p=1, a=0, i=1, d=0.
Input:
OPR1 = 9763H
OPR2 = 8973H
Output:
RES = 0DF0H
Tools:
PC installed with TASM.
Program:
Flow Chart:
Result:
Flags:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=1, s=0, z=0, o=1, p=0, a=0, i=1, d=0.
Input:
OPR1 = 2000H
OPR2 = 4000H
Output:
List File:
Flow Chart:
Result:
Case 1: Two positive numbers
Flags:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=1, s=0, z=0, o=1, p=0, a=0, i=1, d=0.
Input:
OPR1 = 7593H
OPR2 = 6845H
Output:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=1, s=0, z=0, o=1, p=0, a=0, i=1, d=0.
Input:
Output:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=1, s=0, z=0, o=1, p=0, a=0, i=1, d=0.
Input:
Output:
Tools:
PC installed with TASM.
Program:
List file:
0008 F6360200 DIV BYTE PTR [0002] THE VALUE IN [0002] IS ADDED
TO AX
Flow Chart:
Result:
Flags:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=0, s=0, z=0, o=0, p=0, a=1, i=1, d=0.
Input:
Output:
Tools:
PC installed with TASM.
Program:
List file:
0008 F63E0200 DIV BYTE PTR [0002] THE VALUE IN [0002] IS ADDED
TO AX
Flow Chart:
Result:
Case 1: two positive numbers
Flags:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=0, s=0, z=0, o=0, p=0, a=1, i=1, d=0.
Input:
Output:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=0, s=0, z=0, o=0, p=0, a=1, i=1, d=0.
Input:
OPR1 = D908H <- 2’s Complement of (-26F8H)
OPR2 = 56H
Output:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=0, s=0, z=0, o=0, p=0, a=1, i=1, d=0.
Input:
OPR1 = 26F8H
OPR2 = AAH <- 2’s Complement of (-56H)
Output:
7. ASCII addition
Aim:
Tools:
PC installed with TASM.
Program:
List file:
Flow Chart:
Result:
Flags:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=1, s=0, z=0, o=0, p=1, a=1, i=1, d=0.
Input:
CHAR = '8'
CHAR1 = '6'
Output:
8. ASCII substraction
Aim:
To write an ALP to perform the subtraction of two ASCII bytes.
Tools:
PC installed with TASM.
Program:
List file:
TO AL
Flow Chat:
Result:
Case 1:
Flags:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
Input:
CHAR = ‘9’
CHAR1 = ‘5’
Output:
Case 2:
Flags:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=1, s=1, z=0, o=0, p=1, a=1, i=1, d=0.
Input:
CHAR = ‘5’
CHAR1 = ‘9’
Output:
9. ASCII multiplication
Aim:
Tools:
PC installed with TASM.
Program:
List file:
Flow Chart:
Result:
Flags:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=0, s=0, z=0, o=0, p=1, a=0, i=1, d=0.
Input:
NUM1 = 09
NUM2 = 05
Output:
RES = 0405 (AX) <- unpacked BCD of 45
Tools:
PC installed with TASM.
Program:
List file:
ADDRESS OPCODE OPERATION COMMENTS
Flow Chart:
Result:
Flags:
Before execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
After execution, c=0, s=0, z=0, o=0, p=0, a=0, i=1, d=0.
Input:
Output:
RESQ = 07 (AL)
RESR = 04 (AH)