417 OSBYTE call with A=&87 (135) Read character at text cursor position On exit X will contain the character at the text cursor’s position and Y will contain a value representing the current graphics display MODE . If the character cannot be recognised then X will contain zero. The following function could be used to read the character at position X,Y in a BASIC program. 2000 DEF FNREADCH(X,Y) 2010 LOCAL A%, LASTX, LASTY,C 2020 LASTX=POS 2030 LASTY=VPOS 2040 VDU 31,X,Y 2050 A%=135 2060 C=USR(&FFF4) 2070 C=C AND &FFFF 2080 C=C DIV &100 2090 VDU 31, LASTX, LASTY 2100 = CHR$(C) The call takes typically 120 microseconds.
OSBYTE call with A=&89 (137) Motor control This call is similar to the *MOTOR statement in BASIC. If only one cassette recorder is in use then setting X=0 will turn the motor off X=1 will turn the motor on The cassette filing system (CFS) controls the motor using this OSBYTE call and sets Y as follows: Y=0 for write operations Y=1 for read operations As a result the user can easily implement a dual cassette system by trapping any OSBYTE call with A=&89 and activating (via his or her own hardware) the second recorder for, say, all write operations. The normal internal motor control could then be activated for all read operations.