Statement: Write a assembly program to receive 25 bytes from an CRT terminal to 8085 for the following requirements.
i) Baud rate x 16
ii) Stop bits 2
i) Baud rate x 16
ii) Stop bits 2
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
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
No comments:
Post a Comment