You are on page 1of 10

MICROPROCESSOR AND

MICROCONTROLLER SYSTEMS
05 8085 Simulator Exercises
Problem Statement
Find the largest number in a block of data. The length of
the block is in memory location 2200H and the block itself
start from memory location 2201H. Store the maximum
number in memory location 2300H. Assume that the
number in the block are all 8-bit unsigned numbers.

The numbers are 04H, 34H, A9H, 78H, 56H


Flowchart
Program
Memory Hex Memory
Mnemonics Description
Address Code Content
0000 LDA 2200 4A 3 Load the number of blocks
to the memory location
0001 00
0002 22
0003 MOV C,A 4F 1 Load to C from A
0004 XRA A AF 1 Exclusive to Accumulator
0005 LXI H,2201 21 3 Load the blocks to memory
location
0006 01
0007 22
Program
Memory Hex Memory
Mnemonics Description
Address Code Content
0008 CMP M BE 1 Compare to M
0009 JNC 000E D2 3 Jump No Carry to 000E
000A 0E
000B 00
000C MOV A, M 7E 1 Load A to M
000D INX H 23 1 Increment to H
000E DCR C 0D 1 Decrement to C
000F JNZ 0008 C2 3 Jump No Zero to 0008
Program
Memory Hex Memory
Mnemonics Description
Address Code Content
0010 08
0011 00
0012 STA 2300 32 3 Load the Data to memory
location
0013 00
0014 23
0015 HLT 76 1 End Program
8085 Simulator Results
8085 Simulator Results
No.
F9 Trainer Kit Input Keys
INPUT KEYS MEMORY ADDRESS 24 INR  
1 RESET   25 00 000B
2 SET/MEM :0000   26 INR  
3 4A 0000 27 7E 000C
4 INR   28 INR  
5 00 0001 29 23 000D
6 INR   30 INR  
7 22 0002 31 OD 000E
8 INR  
32 INR  
9 4F 0003
33 C2 000F
10 INR  
34 INR  
11 AF 0004
35 08 0010
12 INR  
36 INR  
13 21 0005
37 00 0011
14 INR  
38 INR  
15 01 0006
16 INR   39 32 0012

17 22 0007 40 INR  
18 INR   41 00 0013
19 BE 0008 42 INR  
20 INR   43 23 0014
21 D2 0009 44 INR  
22 INR   45 76 0015
23 0E 000A 46 SET/MEM  
Group Members
• Joshua David D. Chua
• Jerico Adrimisin • Percival Alejo
• Jason Claro
• Baron Ducusin • Eric Bello
• Marcs Fajardo
• John Gil Bilolo
• Laurence Laurente

You might also like