Micro processor Lab Manual / Generate Up Going Staircase wave form ALP

Program Name

Write a Assembly Language Program for Generate Up Going Staircase wave form .
Theory
Instruction Mnemonic Operand Comments
MVI A,80 Load accumulator with 80H to configure CWR.
OUT CWR Configure CWR to display output with accumulator value.
MVI A,00 Initialize accumulator with 00 to display up-going staircase from the bottom of the CRO screen.
OUT PA Send the value 00H through output port A.
OUT PB Send the value 00H through output port B.
CALL DELAY Call delay function to continue the wave.
ADI 33 Add 33H to the current accumulator value to print next staircase.
CPI FF Compare the incremented value of accumulator with FF to check whether it has reached maximum value or not.
JNZ XX If the accumulator value has not reached maximum jump back to send value to output port.


Delay Code
Instruction Mnemonic Operand Comments
MVI B,FF Initialize register B with FF
DCR B Decrement the value of B.
JNZ BACK If the value does not become 00H then continue decrementing value to register B.
RET Return back to main routine.
Program Code


Online compiler for 8085 Microprocess Compiler


Home     Back