| Instruction Mnemonic |
Operand |
Comments |
|
MVI |
A,80 |
Load accumulator with |
|
|
|
80H to configure CWR of 8255. |
|
OUT |
CWR |
Configure CWR to display output with
accumulator value. i.e 80 |
|
MVI |
D,05 |
Move immediately 05H in reg D as we
have five states to be displayed on segments |
|
LXI |
H,8100 |
Loading the contents of address 8100 into register pair |
|
MVI |
B,04 |
Move immediately 04H in reg B as we
have four segments on kit |
|
MVI |
C,08 |
Move immediately 08H in reg C as we
have 8 bit reg which has to be configured |
|
MOV |
A,M |
Move content of memory to
accumulator ie first input |
|
INX |
H |
Increment the content of HL pair by
1 to fetch next input |
|
RLC |
|
Rotate Accumulator left by one bit
to configure each segment |
|
MOV |
E,A |
Copy the content of accumulator to reg E |
|
OUT |
PB |
Configure reg B with value of
Accumulator |
|
MVI |
A,01 |
Move immediately 01H to accumulator |
|
OUT |
PC |
Configure port c and send the value |
|
DCR |
A |
Decrement value of Acc by 01 |
|
OUT |
PC |
Configure port C |
|
MOV |
A,E |
Move the content of reg E to acc. |
|
DCR |
C |
Decrement the counter by 01 (now
remaining 7 bits has to be configured on segments ) |
|
JNZ |
XX |
Jump back to xx if the result of
previous operation is not zero |
|
DCR |
B |
Decrement the value of reg B by 1 |
|
JNZ |
YY |
Jump back to yy if the result of
previous operation is not zero |
|
CALL |
DLY |
Call delay |
|
CALL |
DLY |
Call delay |
|
DCR |
D |
Decrement the reg D by 1 |
|
JNZ |
ZZ |
Jump back to zz if the result of
previous operation is not zero |
|
JMP |
XY |
Jump back to xy with out any
condition |