Receive message using 8251

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
Status Word:


Note: Reading of status word is necessary for checking the status of RxD line of 8085 that whether receiver is ready to give data or not.
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

Post a Comment

0 Comments

Close Menu