Editing
SmartBox OS
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== OS_READBYTE and OS_SENDBYTE: Serial Port === The serial port on the controller is currently based on the 6850 UART, this need not bother you as the OS deals with the thing entirely by itself. The chip is setup by the OS to always have a word format of 8n1 and a baud rate of 9600, this translates to 960cps. The 6850 has two divide rates for the baud rate, the OS only uses one, using the other one is beyond the scope of this document and shouldn't be neccessary to use. Only receive interupts are used, transmission of characters is done on a polled basis. As said, there are two calls OS_READBYTE and OS_SENDBYTE. ==== OS_READBYTE ==== OS_READBYTE tests the serial input buffer and returns the character (if any in the A register), the c flag states whether there was a character returned. {|class="calltable" |Entry|| A, X, Y, c, z = undefined |- |Exit|| * X, Y preserved * z = undefined * if c = 1 (no character received) *: A is preserved * if c = 0 (character received) *: A = character received |} ==== OS_SENDBYTE ==== OS_SENDBYTE sends the character in the A register out of the serial port, taking into consideration flow control etc. {|class="calltable" |Entry|| * A = character to send * X, Y, c, z = undefined |- |Exit|| * A, X, Y, c is preserved * z = undefined |}
Summary:
Please note that all contributions to Smart Box may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Smart Box:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
British English
Views
Read
Edit
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information