Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Q 1) To develop a program using the ADI instruction to add two

hexadecimal numbers 3Ah and 48h and store the result in memory
location 2100h.

MVI B,3AH
MVI C,48H
MOV A,B
ADD C
STA 2100H
HLT
Q2) To develop a program to load the two hexadecimal numbers 54hand
48h in registers A and B respectively, add the numbers.

LDA 54H
MVI B,48H
ADD B
HLT
Q3) To develop a program to load the two largest 4 digit hexadecimal
numbers and display the sum, choose the right registers.

LHLD 3692H
XCHG
LHLD 4738H
MOV A,L
ADD E
DAA
STA 2300H
MOV A,H
ADC D
DAA
STA 2301H
HLT
Q 4) To develop a program to load the two hexadecimal numbers 54h
and 48h in register A and B respectively. Subtract these two numbers

LDA 54H
MVI B,48H
SUB B
HLT
Q 5) To develop an assembly code to prefer the swapping of data of two
memory locations

LDA 2000H
MOV B,A
LDA 4000H
STA 2000H
MOV A,B
STA 4000H
HLT
Q6) To develop an assembly code to perform right rotation and left
rotation of the d register

MOV A,D
RAR
RAR
MOV D,A
STA 4000H
MOV A,D
RAL
RAL
MOV D,A
HLT
Q7) To develop an assembly code to multiply two hexadecimal numbers

MVI C,05H
MVI B,02H
S: ADD B
DCR C
JNZ S
HLT
Q8) Write an assembly code top count the number of 1s in the content
of D registers and store the count in B register

MVI D,05H
MVI L,08H
MOV A,D
LOOP:
RAR
JNC SKIP
INR B
SKIP:
DCR L
JNZ LOOP
HLT
Q9) To develop a program in assembly language to find the square of
numbers

MVI C,05H
MVI B,05H
V: ADD B
DCR C
JNZ V
HLT
Q 10) To assume the register B holds 98h and the accumulator holds 15h,
illustrate the result of the instruction ORA B, XRA B , AND CMA

A) LDA 15H
MVI B,98H
ORA B
HLT

B)
LDA 15H
MVI B,98H
XRA B
HLT

C)
LDA 15H
MVI B,98H
CMA
HLT
Q11) To develop 8085 assembly language program to find the smallest
value between two numbers in memory location 2800h and 2801h. store
the value in an array.

LDA 2800H
MOV B,A
LDA 2801H
CMP B
JNC SMALLER
EXIT
SMALLER:
MOV A,B
EXIT: HLT
AMITY UNIVERSITY
(AMITY INSTITUTE OF INFORMATION TECHNOLOGY)

NAME: ANKIT JADLI

COURSE: BCA 2-A SECTION: A

SESSION: 2016-2019

SUBMITTED TO: Mrs.ARTI RANA

You might also like