8086 Lab File
8086 Lab File
8086 Lab File
(UCS617)
Submitted By:
Submitted To:
Ms. Swati Sharma
2|Page
1. Write an assembly language program to add two 16-bit numbers in 8086.
MOV AX,1234H
MOV BX,1236H
SUB AX,BX
HLT
3. Write an assembly language program to multiply two 16-bit numbers in
8086. MOV AX, 1234H
MOV BX, 45F4H
MUL BX
i. AAA
MOV AL,'9'
ADD AL,'2'
AAA
MOV [100H],AX
HLT
ii. AAS
MOV AX,39H ; Load ASCII 9
SUB AL,31H ; Subtract ASCII 1
AAS ; Adjust difference ADD
AX,3030H ; Answer in ASCII
iii. AAM
v. DDA
MOV AL,9H
ADD AL,1H
DAA
MOV [100H],AX
HLT
vi. DAS
MOV AL,45H
SUB AL,27H
DAS
MOV [100H],AX
HLT
LEA SI,[100H]
MOV CL,07H ; Load the count value for CL for looping
MOV AX,00H
MOV BX,01H
L1: ADD
AX,BX MOV
[SI],AX MOV
AX,BX MOV BX,
[SI]
INC SI
LOOP L1
HLT
10. Write an assembly language program to perform the division 15/6
using the ASCII codes. Store the ASCII codes of the result in register DX.
MOV AX,'15'
ADD BX,'6'
SUB AX,3030H
SUB BL,30H
AAD
DIV BL
ADD AX,3030H
MOV
[100H],AX HLT