You are on page 1of 15

INDEX

8086
SL NAME OF THE EXERCISE PAGE DATE OF DATE OF SIGNATURE REMARKS
NO. NO. PRACTICE SUBMISSION
1 Assembly language
program to add two
binary number each of 1
bytes long( without and
with carry)

2 Assembly language
program to add two
binary number each of 2
bytes long( without and
with carry)
3 Assembly language
program to find the
maximum number in a
given array.
4 Assembly language
program to add array of 1
bytes numbers.
5 Assembly language
program to add array of 2
bytes numbers.
6 Assembly language
program to short in
ascending order.
EXERCISE- 1

 Title: Assembly language program to add two binary number each of 1 bytes
long( without and with carry)

 Objective: To write a assembly language program to add two binary number


each of 1 bytes long( without and with carry)

 Apparatus used: a computer system with emu 8086 emulator.

 PROGRAM 1:

MOV [3000H],11010000B
MOV [3002H],01100000B
MOV CX, 0000
MOV AX, [3000H]
MOV BX, [3002H]
ADD AX, BX
JNC NEXT
INC CX
NEXT:MOV [3004H], AX
MOV [3006H], CX
HLT

 OUTPUT:
 PROGRAM 2:

MOV [3000H],01010000B
MOV [3002H],01100010B
MOV CX, 0000
MOV AX, [3000H]
MOV BX, [3002H]
ADD AX, BX
JNC NEXT
INC CX
NEXT:MOV [3004H], AX
MOV [3006H], CX
INT 3

 OUTPUT:

 PRECAUTIONS TO BE FOLLOWED:

1. Check rules/syntax of assembly programming


EXERCISE- 2

 Title: Assembly language program to add two binary number each of 2 bytes
long( without and with carry)

 Objective: To write a assembly language program to add two binary number


each of 2 bytes long( without and with carry)

 Apparatus used: a computer system with emu 8086 emulator.

 PROGRAM:

MOV [3000H],1101100011000000B

MOV [3002H],0110011101010100B

MOV CX, 0000

MOV AX, [3000H]

MOV BX, [3002H]

ADD AX, BX

JNC NEXT

INC CX

NEXT:MOV [3004H], AX

MOV [3006H], CX

HLT
 OUTPUT:

 PRECAUTIONS TO BE FOLLOWED:

1. Check rules/syntax of assembly programming


EXERCISE- 3

 Title: Assembly language program to find the maximum number in a given


array.

 Objective: To write a assembly language program to find the maximum number


in a given array.

 Apparatus used: a computer system with emu 8086 emulator.

 PROGRAM:

MOV SI, 0300H

MOV CX,[SI]

MOV AL, 00H

INC SI

BACK: INC SI

CMP AL,[SI]

JAE GO

MOV AL,[SI]

GO: LOOP BACK

MOV [0350H],AL

HLT
 OUTPUT:

 PRECAUTIONS TO BE FOLLOWED:

1. Check rules/syntax of assembly programming


EXERCISE- 4

 Title: Assembly language program to add array of 1 bytes numbers.

 Objective: To write a assembly language program to add array of 1 bytes


numbers.

 Apparatus used: a computer system with emu 8086 emulator.

 PROGRAM:

MOV SI, 0300H


MOV CX, [SI]
MOV AL,00H
MOV BL, 00H
INC SI
GO: INC SI
ADD AL,[SI]
JAE CARRY
INC BL
CARRY: LOOP GO
MOV [0350H], AL
MOV [0351H], BL
HLT

 OUTPUT:

 PRECAUTIONS TO BE FOLLOWED:

1. Check rules/syntax of assembly programming


EXERCISE- 5

 Title: Assembly language program to add array of 2 bytes numbers.

 Objective: To write a assembly language program to add array of 2 bytes


numbers.

 Apparatus used: a computer system with emu 8086 emulator.

 PROGRAM:

MOV SI, 0300H


MOV CX, [SI]
MOV AX, 0000H
MOV BX, 0000H
BACK: INC SI
INC SI
ADD AX, [SI]
JAE GO
INC BX
GO: LOOP BACK
MOV [0350H], AX
MOV [0352H], BX
HL

 OUTPUT:

 PRECAUTIONS TO BE FOLLOWED:

1. Check rules/syntax of assembly programming


EXERCISE- 6

 Title: Assembly language program to short in ascending order.

 Objective: To write a assembly language program to short in ascending order.

 Apparatus used: a computer system with emu 8086 emulator.

 PROGRAM:

MOV DI,0402H
MOV SI,0300H
MOV DX,[SI]
HERE: MOV SI,0300H
MOV AX,0FFFFH
MOV CX, [SI]
BACK: INC SI
INC SI
CMP AX,[SI]
JB GO
MOV AX, [SI]
MOV BX, SI
GO: LOOP BACK
MOV [DI], AX
MOV SI, BX
MOV [SI],0FFFFH
INC DI
INC DI
DEC DX
JNZ HERE
HLT

 INPUT:
 OUTPUT:

 PRECAUTIONS TO BE FOLLOWED:

1. Check rules/syntax of assembly programming


INDEX

8051
SL NAME OF THE EXERCISE PAGE DATE OF DATE OF SIGNATURE REMARKS
NO. NO. PRACTICE SUBMISSION
1 Assembly language
program to add two 8 bit
numbers.

2 Assembly language
program to add two 16 bit
numbers.
EXERCISE- 1

 Title: Assembly language program to add two 8 bit numbers.

 Objective: To write a assembly language program to add two 8 bit numbers.

 Apparatus used: a computer system with 8051 simulator ( Keil).

 PROGRAM :

ORG 100H
MOV A, #95H
ADD A, #87H
MOV 52H, A
CLR A
RLC A
MOV 53H, A
HERE: SJMP HERE
END

 OBSERVATION TABLE:

SL NO. MEMORY LOCATION DATA


1 52H 1CH
2 53H 01H

 PRECAUTIONS TO BE FOLLOWED:
1. Check rules/syntax of assembly programming
EXERCISE- 2

 Title: Assembly language program to add two 16 bit numbers.

 Objective: To write a assembly language program to add two 16 bit numbers.

 Apparatus used: a computer system with 8051 simulator ( Keil).

 PROGRAM :

ORG 100H

CLR C

MOV R2, 50H

MOV R0, #51H

MOV R1, #6H

LOOP: MOV A, @R0

ADDC A, @R1

MOV @R0, A

INC R0

INC R1

DJNZ R2,LOOP

HERE: SJMP HERE

END

 OBSERVATION TABLE:

INPUT OUTPUT

Memory location Data Memory location Data


50H 02H 51H 4AH
51H 94H 52H B0H
52H 3AH
61H B6H
62H 75H
 PRECAUTIONS TO BE FOLLOWED:

1. Check rules/syntax of assembly programming

You might also like