10 REM USR Commands to communicate11 REM with SIO2PC15 REM (C) 1995 BY Kevin Atkinson BUT16 REM you may use these routines17 REM however you see fit as long as18 REM you somehow menchin me in your19 REM in your docs.30 REM 31 REM All of these commands are very32 REM nice and don't effect your33 REM memory one bit and don't even34 REM use Page 6. The only two35 REM bytes they use are $D4 and $D536 REM (212 and 213) which are the 37 REM locations of the return value38 REM for the USR command.80 REM 81 REM . Kevin Atkinson82 REM . kevina@clark.net83 REM . 7962 Helmart Dr.84 REM . Laurel MD, 2072386 REM 100 DIM ANS$(1)110 DIM CMD$(128):DIM BUFF$(128)111 REM ^ set the length of the comnd112 REM ^ to communcate with the USR113 REM ^ functions.114 REM ^ CMD$ does not need to be115 REM ^ 128 bytes long but it MUST116 REM ^ end in CHR$(155) or SIO2PC117 REM ^ may get very confused118 REM ^ BUFF$ must be 128 bytes119 REM ^ or it might crash machine120 DIM SEND$(28):DIM SATS$(44)122 DIM LNTH$(51)130 SEND$="hW hh S`"140 SATS$="hR hh  hh S@`"150 LNTH$="hhhԠ ":LNTH$(20)=CHR$(155)152 LNTH$(37)="":LNTH$(40)=CHR$(155)153 LNTH$(41)="ȑԄԩ`"180 BUFF$(128)=" "181 REM ^ to get BASIC to recognize182 REM ^ all 128 bytes of BUFF$1100 PRINT "PLEASE ENTER COMMAND STRING"1110 INPUT CMD$1120 PRINT CMD$1130 CMD$(LEN(CMD$)+1)=CHR$(155)1131 REM ^ remember (from above)1132 REM ^ that the command string1133 REM ^ MUST end in CHR$(155)1134 REM ^ otherwise known as EOL1135 REM ^ or RETURN1140 X=USR(ADR(SEND$),ADR(CMD$))1141 REM ^ command to send a string1142 REM ^ (CMD$ in this case) to1143 REM ^ SIO2PC.1145 REM ^ or RETURN1151 LNTH$(21)="늨":LNTH$(36)=CHR$(155)1200 FOR D=1 TO 41210 X=USR(ADR(SATS$),D,ADR(BUFF$))1211 REM ^ command to send get the1212 REM ^ status of SIO2PC slot1213 REM ^ number D. D should be1214 REM ^ between 1 and 4.1215 REM ^ Remember BUFF$ MUST be 128 1216 REM ^ bytes long.1220 L=USR(ADR(LNTH$),ADR(BUFF$))1221 REM ^ a handy command to tell1222 REM ^ when the info ends and the1223 REM ^ garbage starts. It returns1224 REM ^ the position number1230 PRINT BUFF$(1,L)1240 NEXT D1300 PRINT "REBOOT";1310 INPUT ANS$1320 IF ANS$="Y" THEN X=USR(58487)1321 REM . ^1322 REM . Location to jump to in1323 REM . order to do a cold start