Dr. B.R. Ambedkar National Institute of Technology, Jalandhar
Dr. B.R. Ambedkar National Institute of Technology, Jalandhar
SUBMITTED TO:
DR. SATHIYA S
SUBMITTED BY:
PARTH SHINH
18106052
PIYUSH GUPTA
18106053
PRABHLEEN KAUR
18106054
ICE 3RD Year
Group: G3-C
QUESTION 1:
AIM:
Subtract two numbers, check for negative. If the result is negative store the number in
2000H. If it is positive, increment the result once and store it in 2005H.
PLATFORM REQUIRED:
SIM8085
FLOWCHART:
START
HLT
If result
Store result at
YES is –ve NO Increment
2000H
(JC set) the result
HLT
Store result at
2005H
PROGRAM OUTPUT:
RESULT:
Two hexadecimal numbers are subtracted. If result is negative which is check by carry
flag. Carry flag set means borrow is taken therefore, result will be negative. Negative
result simply stored at 2000H location else if result is positive means carry flag is not
set then result is incremented then store at location 2005H.
QUESTION 2:
AIM:
write program to execute multiplication of two 8-bit numbers.
PLATFORM REQUIRED:
SIM8085
MVI B,00H
LXI H,0044H
MOV C,M
LXI H,0055H
MOV D,M
MVI A,00H
L2: ADD D
JNC L1
INR B
L1: DCR C
JNZ L2
STA 0053H
MOV A,B
STA 0052H
HLT
FLOWCHART:
START
ADD D
If result Increment
has YES register B
carry
Decrement register C
If
NO register Store the result
YES
C=0
HLT
PROGRAM OUTPUT:
RESULT:
Multiplication of two hexadecimal numbers was performed.