0% found this document useful (0 votes)
30 views

Flow Chart (Experiment No 4) Reverse Order: Start

This document contains flow charts for 21 experiments involving 8-bit microprocessor operations. The flow charts demonstrate operations like incrementing and decrementing registers, comparisons, logical operations, arithmetic operations, conditional jumps, subroutines, and manipulating bits and flags. Key steps include loading values into registers from memory locations, performing calculations on register values, and storing results back to memory.

Uploaded by

Shubham
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)
30 views

Flow Chart (Experiment No 4) Reverse Order: Start

This document contains flow charts for 21 experiments involving 8-bit microprocessor operations. The flow charts demonstrate operations like incrementing and decrementing registers, comparisons, logical operations, arithmetic operations, conditional jumps, subroutines, and manipulating bits and flags. Key steps include loading values into registers from memory locations, performing calculations on register values, and storing results back to memory.

Uploaded by

Shubham
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/ 21

Flow Chart (Experiment No 4) Reverse Order

START

[HL] C030H
[DE]C090H
[C]0AH

[A] [M]

[ DE ] [ A ]

[ HL ] [ HL ] - 1
[ DE ] [ DE ] + 1
[C][C]-1

YES

IF
C0

No
STOP

Flow Chart:- (EXPERIMENT No 5):- Exchange the contents of blocks

START

[ HL ] C030H
[ DE ] C090H
[ C ] 0AH

[B][M]

[ A ] [ DE ]

[M][A]
[A][B]

[ DE ] [ A ]

[ HL ] [ HL ] + 1
[ DE ] [ DE ] +1
[ C ] [ C ] +1

IF

YES

C0

NO
STOP

Flow Chart:- (Experiment No 6 ) Absolute difference


START

[ HL ] C030H

[ A][M]

[ HL ] [ HL ] + 1
[A][A][M]

YES

IF
S=0
NO
[A][ A ]

[ A ] [ A ] + 01H

[ C090H ] [ A ]

STOP

Flow Chart:- (Experiment No :- 7) Even & Odd

STOP

[ HL ] C030H
[ C ] 0AH
[ B ] 00H
[ D ] 00H
A

[A][M]
[ An ] [An + 1 ]

IF
CY = 1

YES

NO
[B][B]+1

YES
JUMP

IF
REG C =0

NO
[D][D]+1

[ HL ] [ HL ] + 1
[C][C]-1

[M][B]
[ HL ] [ HL ] + 1
[M][D]

STOP

Flow Chart (Experiment No 8) First Occurrence


START

[C][M]
[ HL ] [ HL ] + 1
[ D ] ABH

[A][M]
[A][D]

IF
Z=1
YES
NO
[ HL ] [ HL ] + 1
[C][C]-1

NO

IS
REG C =
0?

YES
[ HL ] FFFFH

STOP

Flow Chart ( Experiment No 9) Total Occurrence:-

START
[C][M]
[ HL ] [ HL ] + 1
[ D ] ABH
[ B ] 00H

[A][M]
[A][D]

NO

IF
Z=0

YES
[B][B]+1

[ HL ] [ HL ] + 1
[C][C]-1

IS REG
C = 0?
YES
[A][B]
[ C090H ] [ A ]

STOP

NO

Flow Chart ( Experiment No. 10 ) Multiply two hex numbers


START

[ HL ] C030H
[B][M]
[ HL ] [ HL ] + 1

[C][M]
[ A ] [ A ] EX OR [ A ]
[ D ] 00H

[A][A]+[B]

YES

IF
CY = 0?

NO
[D][D]+1

[C][C]+1

NO

IF
Z = 0?
YES
[ HL ] C090H
[M][A]

[ HL ] [ HL ] + 1
[M][D]

STOP

Flow Chart (Experiment No:- 11) Division


START
[ HL ] C030H
[A][M]
[ HL ] [ HL ] + 1

[B][M]
[ D ] 00H

[A][A][B]

YES

IF
S = 1?

NO
[D][D]+1

JUMP

[A][A]+[B]
[ HL ] C090H
[M][D]

[ HL ] [ HL ] +1
[M][A]

STOP

YES

Flow Chart:- ( Experiment No:- 12) Smallest & Largest


START

[ B ] [ M ]
[D][M]
[ HL ] [ HL ] + 1

[ C ] 09H
C
[A][M]
[A][B]

YES
IF

CY = 0
NO

IF

YES

Z = 1?

NO
[B][A]

JUMP

[A][D]

YES

IF

YES

CY = 1?
NO

IF

YES
B

Z= 1?

NO
[D][A]
B
[ HL ] [ HL ] + 1
[C][C]-1

Is Reg C
=0?

YES
[M][B]
[ HL ] [ HL ] + 1
[M][D]

STOP

NO
C

Flow Chart Experiment No 13: ( Separate Nibbles and multiply )

START
START
[ HL ] C030H
[M][A]
[B][A]

[ A ] [ A ] ^ 0FH
[ HL ] [ HL ] + 1
[M][A]

[C][A]
[A][B]

[ An ] [ An + 1 ]
[ An ] [ An + 1 ]
[ An ] [ An + 1 ]
[ An ] [ An + 1 ]

[ A ] [ A ] ^ 0FH
[ HL ] [ HL ] + 1
[B][A]
[ A ] [ A ] EX OR [ A ]

[A][A]+[B]
[C][C]-1

Is Reg
C=0?

[ C090H ] [ A ]

STOP

Flow Chart: - Experiment 14:- Addition of BCD


START

[ HL ] C030H
[C][M]
[ HL ] [ HL ] + 1

[ D ] 00H
[ A ] [ A ] EX OR [ A ]

[A][A]+[M]
DAA

NO

IS CY =
0?
YES
[D][D]+1

[ HL ] [ HL ] + 1
[C][C]-1

IS Reg
C= 0?

YES
[ HL ] C030H
[M][A]
[ HL ] [ HL ] + 1
[M][D]

STOP

NO

Flow Chart Experiment No: - 15 ( 4 byte)


START

[ HL ] C030H
[ DE ] C050H
[ BC ] C090H
[ CY ] 1
[ CY ] [ CY ]
{[ DE ]} [ A ]
[ A ] [ CY ] + [ M ] + [ A ]
{[ BC ]} [ A ]

[ HL ] [ HL ] + 1
[ DE ] [ DE ] + 1
[ BC ] [ BE ] + 1

[ A ] {[ DE ]}
[ A ] [ CY ] + [ M ] + [ A ]
{[ BC ]} [ A ]
[ HL ] [ HL ] + 1
[ DE ] [ DE ] + 1
[ BC ] [ BE ] + 1

[ A ] {[ DE ]}
[ A ] [ CY ] + [ M ] + [ A ]
{[ BC ]} [ A ]
[ HL ] [ HL ] + 1
[ DE ] [ DE ] + 1
[ BC ] [ BE ] + 1
[ A ] {[ DE ]}
[ A ] [ CY ] + [ M ] + [ A ]
{[ BC ]} [ A ]

NO

IS
CY =0?

YES
[ A ] 01 H

YES

JUMP

NO
[ A ] 00H

[B][B]+1
{[ BC ]} [ A ]

STOP

Flow Chart Experiment No 16 ( DAD )


START

[ HL ] C030H
[A][M]
[ HL ] [ HL ] + 1
[ DE ] 0000H

[B][D]
[C] [M]
[H][D][L][E]
[ HL ] [ HL ] + [ DE ]
[H][D][L][E]

[ HL ] [ HL ] + 1
[A][A]-1

NO

Is Reg
A = 0?

YES
[M][E]
[ HL ] [ HL ] + 1
[M][D]

STOP

Flow Chart (Ascending Order):- Experiment No 17


START
[ B ] 09 H
A
[ HL ] C030H
[ C ] 09 H
C
[A][M]
[ HL ] [ HL ] + 1
[A][A][M]

IS
CY = 1?

IS
Z = 1?

[D][M]
[M][A]
[ HL ] [ HL ] + 1
[M][D]
[ HL ] [ HL ] + 1
B
[C][C]-1

IS
Register
C = 0?

NO

YES
[B][B]-1

IS
Register
B = 0?

STOP

START
Flowchart: - (Experiment No 18 ) Palindrome
[ H L ] C030H
[ A ] [ C033H ]

[ An ] [ An + 1 ]
[ An ] [ An + 1 ]
[ An ] [ An + 1 ]
[ An ] [ An + 1 ]

[A][M]

If
Z 0?

[ HL ] [ HL ] + 1
[ A ] [ C032 H ]
[ An ] [ An + 1 ]
[ An ] [ An + 1 ]
[ An ] [ An + 1 ]
[ An ] [ An + 1 ]

A
[A][M]
[ A ] FFH

If
Z 0?

[ C090 H ] [ A ]
[ A ] 00H
STOP

JUMP

Flow Chart ( Experiment No 19 ) Keyboard Subroutine

START

[ SP ] C099 H
[ DE ] C030H

CALL 02E7H

[ DE ] [ A ]
[C][A]

CALL 02E7H

[ DE ] [ DE ] + 1
[ DE ] [ A ]

[ An ] [ An + 1 ]
[ An ] [ An + 1 ]
[ An ] [ An + 1 ]
[ An ] [ An + 1 ]

[A][A]+[C]
[ DE ] [ DE ] + 1
[ DE ] [ A ]

STOP

Flow Chart ( Experiment No 20 ) (BCD to HEX)


START

[ A ] [ C030H ]
[B][A]
[ A ] [ A ] AND 0FH
[C][A]
[A][B]

[ An ] [ An + 1 ]
[ An ] [ An + 1 ]
[ An ] [ An + 1 ]
[ An ] [ An + 1 ]

[ A ] [ A ] AND 0FH
[B][A]
[ D ] 0AH
[ A ] [ A ] EXOR [ A ]

[A][A]+[D]
[B][B]-1

NO

IS
REG B =
0?

YES
[A][A]+[C]
[ C090H ] [ A ]

STOP

Flow Chart ( Experiment No 21 ) (Flags):-

START

[ SP ] C099 H
[ C ] 00 H
PUSH B

POP PSW

[ A ] 00H

PUSH PSW

[ A ] [ A ] OR [ A ]

PUSH PSW

START

You might also like