Source program:
- LXI H, 2300 H : Initialize memory pointer
- MVI C, FFH : Initialize counter to accept 25 characters
- MVI A, 00H
- OUT FFH
- OUT FFH : Dummy mode word
- OUT FFH
- MVI A, 40H : Reset command word
- OUT FFH : Reset 8251 A
- MVI A, CAH : Mode word initialization
- OUT FFH
- MVI A, 14 H : Command word initialization
- OUT FFH
- CHECK: IN FFH
- ANI 02 H : Check RxRDY
- JZ CHECK : Is RxRDY ? If not, check again
- IN FEH : Get the character
- MOV M, A : save the character
- INX H : Increment memory pointer
- DCR C : Decrement memory pointer
- OUT FEH : Send character to the transmitter
- JNZ CHECK : If not zero, accept next character
- HLT : Stop program execution
|
|
0 Comments