hello...
i need to write a getchar subroutine that reads a character from USART.i know that 28h is the address of of the peripherical data port and 29h the address of the status port.
any help?
thanks
If this is an 8251 or something like it, there is an RXRDY bit in the status port that becomes 1 when there is a character ready to read in the data port. You can read the status port and AND it with a mask that just leaves the interesting (RXRDY) bit intact. The z flag will then tell you if there is data ready in the data port. When you read the data port, the RXRDY flag will be reset by the USART.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.