REM >fspoke REM Rick Murray, 2007/09/03 REM REM HAS *NO* ERROR CHECKING, add this yourself. :-) REM REM ASSUMPTION: You are using the 'default' server; REM if not, then poke the desired server in front REM of the login name, like "0.252 Syst" or whatever. REM REM Set SUPERVISOR login name and password below login_name$ = "Syst" login_pass$ = "" REM Initial login OSCLI("I Am " + login_name$ + " " + login_pass$) REM No need for "Net:" prefix to commands as REM "*I Am" automatically selects NetFS. REM Okay, set up the basics [edit as necessary] OSCLI("FSMode M") OSCLI("FSUser SYST") OSCLI("FSMaxUser 8") OSCLI("FSMaxDrive 5") OSCLI("PrPage Y") OSCLI("FSMode U") t% = TIME : REPEAT UNTIL (t% + 300) < TIME OSCLI("I Am " + login_name$ + " " + login_pass$) OSCLI("PrName FSPRNT") REM Now set the RTC from the host's RTC DIM rotime% 5, fstime% 5 !rotime%=1 SYS "OS_Word", 14, rotime% year% = FNrtcbcd(rotime%?0) IF (year% > 90) THEN year% =- 81 + year% ELSE year% = 19 + year% ENDIF month% = FNrtcbcd(rotime%?1) day% = FNrtcbcd(rotime%?2) hour% = FNrtcbcd(rotime%?4) minute% = FNrtcbcd(rotime%?5) second% = FNrtcbcd(rotime%?6) REM Now twist times into FS style. fstime%?0 = day% + ((year% AND &F0) << 1) fstime%?1 = month% + ((year% AND &0F) << 4) fstime%?2 = hour% fstime%?3 = minute% fstime%?4 = second% SYS "NetFS_DoFSOp", 28, fstime%, 5, 5 REM All done! END : DEFFNrtcbcd(val%) LOCAL out%, temp% out% = val% AND &F temp% = val% AND &F0 temp% = temp% >> 4 out% += temp% * 10 =out%