10 REM > NetBoot/s
   20 REM Run by Spectrum NetFS after *I AM if relavant option set
   30 REM 06-Mar-1986: Initial version
   40 :
   50 A%=0:X%=1:os%=(USR&FFF4 AND &FF00)DIV256:IF os%=6 AND PAGE>&8000:PRINT"Running Z80...":SYS "OS_GetEnv" TO A$:OSCLI"Z80 "+MID$(A$,INSTR(A$," ",1+INSTR(A$," "))):END
   60 unix%=os%=8:quit%=?&80<>0:?&80=0
   70 REM ON ERROR REPORT:PRINT" at line ";ERL:END
   80 DIM mcode% &1000:start%=&FFFFF380:name$="NetBoot":ver$="0.10"
   90 :
  100 FOR P=0 TO 1
  110   P%=start%:O%=mcode%
  120   [OPT P*3+4
  130   .go%
  140   RET:\ Do nothing
  150   :
  160   \ If relevant Spectrum NetFS option set, then after a valid *I AM, NetFS
  170   \ does *BootNet (similar to the Master doing *FindLib if *OPT5,1 set).
  180   \ Ideally, NetFS should do the *BootNet command in a manner that ignores
  190   \ any Bad Command errors. After doing *BootNet, the user logon option is
  200   \ obeyed.
  210   :
  220 ]NEXT
  230 FOR P=0 TO 1
  240   PRINT"*Save ";name$;" ";~mcode%;" ";~O%;" ";~go%OR&FFFF0000;" "~;start%
  250   REM *SAVE may not yet be available, so call directly:
  260   X%=O%:Y%=X%DIV256:A%=0:$(X%+256)=name$
  270   !X%=X%+256:X%!2=start%:X%!6=go%OR&FFFF0000:X%!&A=mcode%:X%!&E=O%
  280   IF quit%:CALL &FFDD:*Quit
  290   END