notes_20for_20risc_20os_20users
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
notes_20for_20risc_20os_20users [2018/03/31 13:19] – external edit 127.0.0.1 | notes_20for_20risc_20os_20users [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 24: | Line 24: | ||
==== Serial device ==== | ==== Serial device ==== | ||
On windows the serial device can be opened for input //and// output on the same channel, whereas on RISC OS the serial device has to be opened seperately for input and output.\\ | On windows the serial device can be opened for input //and// output on the same channel, whereas on RISC OS the serial device has to be opened seperately for input and output.\\ | ||
+ | <code bb4w> | ||
REM Open serial device on Windows | REM Open serial device on Windows | ||
ser%=OPENUP" | ser%=OPENUP" | ||
Line 30: | Line 31: | ||
serin%=OPENIN(" | serin%=OPENIN(" | ||
serout%=OPENOUT(" | serout%=OPENOUT(" | ||
+ | </ | ||
\\ If you are converting code and are tempted to use: | \\ If you are converting code and are tempted to use: | ||
+ | <code bb4w> | ||
serin%=OPENUP" | serin%=OPENUP" | ||
+ | </ | ||
you must be careful not to close both **serin%** and **serout%**, | you must be careful not to close both **serin%** and **serout%**, | ||
+ | <code bb4w> | ||
CLOSE# | CLOSE# | ||
+ | </ | ||
Code similar to the following should be used, also using the code to prevent multiple cascading errors on closing (see [[/ | Code similar to the following should be used, also using the code to prevent multiple cascading errors on closing (see [[/ | ||
+ | <code bb4w> | ||
IF serin%=serout% THEN serout%=0 | IF serin%=serout% THEN serout%=0 | ||
IF serin% THEN temp%=serin%: | IF serin% THEN temp%=serin%: | ||
IF serout% THEN temp%=serout%: | IF serout% THEN temp%=serout%: | ||
+ | </ |
notes_20for_20risc_20os_20users.1522502370.txt.gz · Last modified: 2024/01/05 00:17 (external edit)