Instruction Mnemonic |
Operand |
Comments |
MVI |
A,80 |
Load accumulator with 80 to configure 8255. |
OUT |
CWR |
Configure CWR with 80 as output. |
MVI |
A,00 |
Initialize accumulator to 00H to display ongoing sawtooth
from 00. |
OUT |
PA |
Send value 00 throughOUT port A. |
OUT |
PB |
Send value 00 through OUT port B. |
INR |
A |
Increment the value of accumulator to extend the ongoing
waveform. |
CPI |
FF |
To check whether it has reached maximum value or not. |
JNZ |
BACK 1 |
Jump back if the result is not zero. |
OUT |
PA |
Send value FF through OUT port A. |
OUT |
PB |
Send value FF through OUT port B. |
DCR |
A |
decrement the value of accumulator to extend the downgoing
waveform. |
CPI |
0 |
To check whether it has reached maximum or not. |
JNZ |
BACK 2 |
Jump back if the result is not zero. |
JMP |
BACK 1 |
Jump back to display incremented value as output. |