dave jones wrote:
> Hello,
>
> Does sdcc 2.8 implement scanf() for mcs51? I want to use scanf() or
> gets() and friends,
> would anyone tell me how to do or where I can get the implementation
> libs? Thanks.

Read from your UART RX buffer if your chip has one, into an array for 
example.  Implementing your own ring buffer is easy.   Then if you want 
to convert a number use atoi()


Usually reading the UART RX buffer is in your  UART interrupt 
handler.    Then outside of the interrupt you can process your local 
buffer.

You may be able to find sample code at somewhere  perhaps start with  
http://sdcc.sourceforge.net/links.php

--
karl


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to