0% found this document useful (0 votes)
17 views26 pages

Swayam Sir Micro

Uploaded by

vinaysikarwar199
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views26 pages

Swayam Sir Micro

Uploaded by

vinaysikarwar199
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Programming Assignment-EE32005

1 Write a Program Using 8085 & Verify for Addition of Two 8-Bit Numbers.
Flowchart:

Code:
;<Addition of Two-8 Bit Numbers without carry>

LXI H,0000H

MOV A,M

INX H

ADD M

INX H

MOV M,A

HLT
Code screenshot & output:
2. Write a Program Using 8085 & Verify for Addition of Two 16-Bit Numbers.
(With Carry)
Flowchart:

Code:
;<Addition of Two-16 Bit Numbers with carry>

LHLD 0000H

XCHG

LHLD 0002H

MVI C,00

DAD D

JNC out

INR C

out:SHLD 0004H

MOV A,C

STA 0006H

HLT
Code screenshot & output:
3.Write a Program Using 8085 & Verify for Subtraction of Two 8-Bit Numbers.
(Display Of Borrow)
Flowchart:

Code:
;<Subtraction of Two-8 Bit Numbers>

LXI H,0000H

MOV A,M

INX H

SUB M

INX H

MOV M,A

HLT
Code screenshot & output:
4. Write a Program Using 8085 & Verify for Subtraction of Two 16-Bit
Numbers. (Display Of Borrow)
Flowchart:

Code:
;<Subtraction of two 16 Bit Numbers>

LHLD 0000H

XCHG

LHLD 0002H

MOV A,E

SUB L

MOV L,A

MOV A,D

SBB H

MOV H,A

SHLD 0004H

HLT

Code screenshot & output:


5 Write a Program Using 8085 & Test for Typical Data Multiplication
of Two 8-Bit Numbers By Bit Rotation Method
Flowchart:

Code:
;<Multiplication>

LHLD 0000H

XCHG

LDA 0002H

LXI H,0000H

MVI C,08H

up:DAD H

RAL

JNC down

DAD D

down: DCR C

JNZ up

SHLD 0004H

HLT
Code screenshot & output:
6 Write a Program Using 8085 & Test for Typical Data Division of Two 8-Bit
Numbers by Repeated Subtraction Method
Flowchart:

Code:
;<Division>

LDA 0000H

MOV B,A

LDA 0002H

MVI C,00H

CMP B

JC down

up:SUB B

INR C

CMP B

JNC up

down: STA 0003H

MOV A,C

STA 0004H

HLT
Code screenshot & output:
7 Write a Program Using 8085 for Finding Square-Root of a Number &Verify.
Flowchart:

Code:
;<Finding Square root of a number>

MVI C,01h

MVI B,01h

MVI A,24h

up:SUB B

JZ down

INR C

INR B

INR B

JMP up

down: MOV A,C

STA 000H

HLT

Code screenshot & output:


8 Write a Program to Move a Block of Data Using 8085 & Verify.
Flowchart:

Code:
;<Moving a Block Of Data>
MVI D,06H
LXI H, 0000H
LXI B, 0020H
up:MOV A,M
STAX B
INX H
INX B
DCR D
JNZ up
HLT

Code screenshot & output:


9 Write a Program to Arrange Number in Ascending Order Using 8085 &
Verify.
Flowchart:

Code:
;<Arranging number in ascending order>

LDA 0000H

DCR A

MOV C,A

MOV B,C

LXI H,0010H

up:MOV A,M

INX H

CMP M

JC down

MOV D,M

MOV M,A

DCX H

MOV M,D

INX H

down:DCR B

JNZ up

DCR C

JNZ 0015H
HLT

Code screenshot & output:

Q10) Write a Program to Check Number of 1’s and 0’s in Given Number
Using 8085 & verify.
Flowchart:

Code:
;<0 ands 1>

LXI H,000H

MOV A,M

MVI C,00h

MVI D,00h

MVI B,00h

up:RLC

JNC down

INR D

JMP shift

down:INR C

shift:DCR B

JNZ up

MOV A,C

STA 0001H

MOV A,D

STA 0002H

HLT
Code screenshot & output:

11 Write a Program to Find GCD Of Two Numbers Using 8085 & verify.
Flowchart:

Code:
Code screenshot and output:

12 Write a Program to Find LCM Of Two Numbers Using 8085 & verify.
Flowchart:

Code:
Code screenshot and output:
13 Write a Program to Add ‘N’ Two Digit BCD Numbers Using 8085 & verify.
Flowchart:

Code:

Code screenshot and output:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy