Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple assembler help for newbie

Status
Not open for further replies.

sliver99

Programmer
Feb 9, 2006
1
IT
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.

HTH
 
What? What? What?

Is there anybody there?

Knock once for Yes, Knock Twice for No...

Are we posting to ourselves? :eek:)

Certainly looks like it.
 
Oh well, at least the archive read refreshed my dynamic and increasingly random memory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top