| Instruction Mnemonic |
Operand |
Comments |
|
LDA |
8200 |
Load the first input at
8200 |
|
LXI |
H,8101 |
Load immediately the
contents of 8101 in HL |
|
MVI |
C,05H |
Move immediately the value
05 to register C |
| MVI |
B,11H |
Move immediately the value
11 to register B |
| CMP |
M |
Compare the value in accumulator with memory |
|
JZ |
XX |
Jump to 8015 if zero flag is set |
|
INX |
H |
Increment the value of contents in HL pair to fetch next
input |
|
DCR |
C |
Decrement the value of C by 1 |
|
JNZ |
YY |
Jump to 800A if zero flag is not set |
|
MVI |
B,00H |
Move immediately the
value 00 to register B |
|
MOV |
A,B |
Move the contents of register B to accumulator |
|
STA |
8300 |
Store the output in the address 8300 |
|
HLT |
|
Stop |