ITSE305-ComputerOrganization-emu8086 LAB Manual PDF
ITSE305-ComputerOrganization-emu8086 LAB Manual PDF
ITSE305-ComputerOrganization-emu8086 LAB Manual PDF
ITSE305
Step 5: Observe the changes in the memory locations during program execution
Step 7: Run till program halts and note the values in registers and memory
locations
ORG 100H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL
5D 3A
AX BX CX DX
Output
Registers AH AL BH BL CH CL DH DL
00 3A
Output
ZF SF AF PF CF
Flags
1 1 1 1
MOV AL, V1
MOV BL, V2
ADD AL, BL
MOV V3, AL
HLT
V1 DB 05DH V2
DB 0A1H
V3 DB 000H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL
5D A1
ORG 100H
AX BX CX DX
Output
Registers AH AL BH BL CH CL DH DL
FE A1
Output
ZF SF AF PF CF
Flags
LEA SI, V1
LEA BX, V2
LEA DI, V3
V1 DB 05DH V2
DB 0A2H
V3 DB 000H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
5D A1
AX BX CX DX ZF SF AF PF CF
Output
Registers AH AL BH BL CH CL DH DL 1
FE A1
Output
Memory None
ORG 100H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL
FD A3
AX BX CX DX
Output
Registers AH AL BH BL CH CL DH DL
5A 3A
Output
ZF SF AF PF CF
Flags
ORG 100H
MOV AL, V1
MOV BL, V2 SUB
AL, BL
MOV V3, AL
HLT
V1 DB 0EDH V2
DB 0A1H
V3 DB 000H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL
ED A1
AX BX CX DX
Output
Registers AH AL BH BL CH CL DH DL
4C A1
ORG 100H
Output
ZF SF AF PF CF
Flags
LEA SI, V1
LEA BX, V2
LEA DI, V3
V1 DB 0E4H
V2 DB 0A2H
V3 DB 000H
ORG 100H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
E4 A2
AX BX CX DX ZF SF AF PF CF
Output
Registers AH AL BH BL CH CL DH DL 1
42 A2
Output
Memory None
ORG 100H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
11 03
AX BX CX DX ZF SF AF PF CF
Output
Registers AH AL BH BL CH CL DH DL
33 03
Output
Memory None
MOV AL, V1
MOV BL, V2 MUL
BL
MOV V3, AL
HLT
V1 DB 022H
ORG 100H
V2 DB 004H
V3 DB 000H
Inputs are given using vectors V1, V2, V3 mentioned in the program.
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
22 04
AX BX CX DX
Output
Registers AH AL BH BL CH CL DH DL ZF SF AF PF CF
88 04
Output
Memory None
LEA SI, V1
LEA BX, V2
LEA DI, V3
ORG 100H
V1 DB 033H
V2 DB 003H
V3 DB 000H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
33 03
AX BX CX DX ZF SF AF PF CF
Output
Registers AH AL BH BL CH CL DH DL
99 03
Output
Memory None
ORG 100H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
0E 03
AX BX CX DX ZF SF AF PF CF
AH AL BH BL CH CL DH DL
Output
Registers AH remainder, AL Quotient
02 04 03
Output
Memory None
MOV AL, V1
MOV BL, V2
DIV BL
MOV V3, AX
ORG 100H
HLT
V1 DB 019H
V2 DB 004H
V3 DW 0000H
Inputs are given using vectors V1, V2 data mentioned in the program.
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
19 04
AX BX CX DX
Output ZF SF AF PF CF
Registers AH AL BH BL CH CL DH DL
01 06 04
AH remainder, AL Quotient
Output
Memory None
LEA SI, V1
LEA BX, V2
ORG 100H
LEA DI, V3
V1 DB 019H
V2 DB 007H
V3 DW 000H
Inputs are given using vectors V1, V2 data mentioned in the program.
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
19 07
AX BX CX DX ZF SF AF PF CF
Output AH AL BH BL CH CL DH DL
Registers AH remainder, AL Quotient
04 03 07
Output
Memory None
ORG 100H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
E1 15 17 A3
AX BX CX DX ZF SF AF PF CF
Output
Registers AH AL BH BL CH CL DH DL 1 1 1
F9 00 17 A3
Output
Memory None
ORG 100H
MOV AX, V1
MOV BX, V2
ADD AX, BX
MOV V3, AX
HLT
V1 DW 04A5DH
V2 DW 0A231H
V3 DW 00000H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
4A 5D A2 31
AX BX CX DX
Output
Registers AH AL BH BL CH CL DH DL ZF SF AF PF CF
EC 8E A2 31 1 1
Output
Memory None
ORG 100H
LEA SI, V1
LEA BX, V2
LEA DI, V3
V1 DW 0EEEEH
V2 DW 01111H
V3 DW 00000H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
EE EE 11 11
AX BX CX DX ZF SF AF PF CF
Output
Registers AH AL BH BL CH CL DH DL 1 1
FF FF 11 11
ORG 100H
Output
Memory None
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
E1 5D 17 A3
AX BX CX DX ZF SF AF PF CF
Output
Registers AH AL BH BL CH CL DH DL 1
C9 BA 17 A3
Output
Memory None
ORG 100H
MOV AX, V1
MOV BX, V2 SUB
AX, BX
MOV V3, AX
HLT
V1 DW 04A5DH
V2 DW 0A231H
V3 DW 00000H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
4A 5D A2 31
AX BX CX DX
Output
Registers AH AL BH BL CH CL DH DL ZF SF AF PF CF
A8 2C A2 31 1
ORG 100H
Output
Memory None
LEA SI, V1
LEA BX, V2
LEA DI, V3
V1 DW 0EEEEH
V2 DW 01111H
V3 DW 00000H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
EE EE 11 11
ORG 100H
AX BX CX DX ZF SF AF PF CF
Output
Registers AH AL BH BL CH CL DH DL 1 1
DD DD 11 11
Output
Memory None
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
FF FF FF FF
AX BX CX DX
Output ZF SF AF PF CF
Registers AH AL BH BL CH CL DH DL
1
00 01 FF FF FF FE
DX, AX carries the result
Output
Memory None
MOV AX, V1
MOV BX, V2
MUL BX
MOV V3, DX
MOV V4, AX
HLT
V1 DW 0EEEEH
V2 DW 0EEEEH
V3 DW 00000H
V4 DW 00000H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
EE EE EE EE
AX BX CX DX
Output ZF SF AF PF CF
Registers AH AL BH BL CH CL DH DL
1
65 44 EE EE DE FF
DX, AX carries the result
Output
Memory None
LEA SI, V1
LEA BX, V2
LEA DI, V3
V1 DW 0EEFFH
V2 DW 0EEFFH
V3 DW DUP(0)
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
EE FF EE FF
AX BX CX DX
Output ZF SF AF PF CF
Registers AH AL BH BL CH CL DH DL
1
22 01 EE FF DF 1F
DX, AX carries the result
Output
Memory None
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
FF FF 00 09
AX BX CX DX
Output ZF SF AF PF CF
Registers AH AL BH BL CH CL DH DL
1C 71 00 09 00 06
DX, AX carries the result
Output
Memory None
MOV AX, V1
MOV BX, V2 DIV
BX
MOV V3, AX
MOV V4, DX
HLT
V1 DW 0EEEEH
V2 DW 00009H
V3 DW 00000H
V4 DW 00000H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
EE EE 00 09
AX BX CX DX
Output ZF SF AF PF CF
Registers AH AL BH BL CH CL DH DL
1A 8C 00 09 00 02
DX, AX carries the result
Output
Memory None
LEA SI, V1
LEA BX, V2
MOV DI, V3
V1 DW 0FEEFH
V2 DW 00008H
V3 DW 05000H
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
FE EF 00 08 5000
AX BX CX DX ZF SF AF PF CF
AH AL BH BL CH CL DH DL
Output
Registers DX, AX carries the result
1F DD 00 08 00 07
CARRY:
INC AH
LOOP NEXT
MOV [DI], AX
HLT
ARRAY DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH
AX BX CX DX
Input
AH AL BH BL CH CL DH DL SI DI
00 00 00 00 00 05 6000
AX BX CX DX ZF SF AF PF CF
Output
Registers AH AL BH BL CH CL DH DL 1
04 FB 00 00 00 00
Input AH AL BH BL CH CL DH DL SI DI
11 84
AX BX CX DX
Output
Registers ZF SF AF PF CF
AH AL BH BL CH CL DH DL
FF 09 1 1 1
Output
None
Memory
Inputs are given using to specified memory locations mentioned in the program.
AX BX CX DX
Input AH AL BH BL CH CL DH DL SI DI
00 00 40 00 00 05 5500
AX BX CX DX
Output
Registers AH AL BH BL CH CL DH DL ZF SF AF PF CF
03 3D 40 05 1 1
ORG 100H
MOV AX, 0000H
MOV CX, 000FH
MOV BX, 1111H
AGAIN:
ADD AX, CX
LOOP AGAIN
MOV [BX], AX
HLT
Inputs are given using to specified register 5 terms locations mentioned in the program.
AX BX CX DX
Input AH AL BH BL CH CL DH DL SI DI
00 00 11 11 00 0F
AX BX CX DX
Output
Registers AH AL BH BL CH CL DH DL ZF SF AF PF CF
00 78 11 11 00 00 1 1
Output Memory
Input /
Input Memory 1110 1111 1112 1113 1114 ….
Output
none
Memory
78
ORG 100H
AGAIN:
MOV [BX], AX
INC AX
INC BX
LOOP AGAIN
HLT
Inputs are given using to specified register 9 terms locations mentioned in the program.
AX BX CX DX
Input AH AL BH BL CH CL DH DL SI DI
00 00 11 11 00 09
AX BX CX DX
Output
Registers AH AL BH BL CH CL DH DL ZF SF AF PF CF
00 09 11 1A 00 00
Output Memory
Input /
Input Memory 1111 1112 1113 1114 1115 1116 1117 1118 1119
Output
none
Memory
00 01 02 03 04 05 06 07 08
ORG 100H
MOV AX, 0000H
AGAIN:
MOV [BX], AX
INC AX
INC AX
INC BX
LOOP AGAIN
HLT
Input AH AL BH BL CH CL DH DL SI DI
00 00 11 11 00 09
AX BX CX DX ZF SF AF PF CF
Output
Registers AH AL BH BL CH CL DH DL
00 09 11 1A 00 00
Output Me
Input /
1111 1112 1113 1114 1115 1116 1117 1118 1119
Output Input Memory none
Memory
00 02 04 06 08 0A 0C 0E 10
Inputs are given using to SI register 10 terms locations mentioned in the program.
AX BX CX DX
Input AH AL BH BL CH CL DH DL SI DI
00 00 09 2000 3000
AX BX CX DX
Output
Registers AH AL BH BL CH CL DH DL ZF SF AF PF CF
09 00 00 1 1
Inputs are given using to SI register 10 terms locations mentioned in the program.
AX BX CX DX
Input AH AL BH BL CH CL DH DL SI DI
00 00 09 2000 3000
AX BX CX DX
Output
Registers AH AL BH BL CH CL DH DL ZF SF AF PF CF
09 00 00 1 1
33. Block Move (Moving a block of data from one location to another)
ORG 100H
MOV CX, 00005H
MOV SI, 02000H
MOV DI, 03000H
HLT
Input AH AL BH BL CH CL DH DL SI DI
00 05 2000 3000
AX BX CX DX
Output
Registers AH AL BH BL CH CL DH DL ZF SF AF PF CF
EE 00 00 1 1