+ > BLib.Generic.ProgEnv 1.06 20Apr2020 - v1.06 Reads PDP11, Z80hi, optimisations : (- Universal Program Environment Functions 2- ======================================= <: F? Return command line tail, sets run$ to execution filename Pa Works on BBCIO,BBC09,T6502,T6809,TZ80,ZX80,PDP11,ARMEval,ARMCoPro,RISCOS,DOS,Windows,Brandy Za ------------------------------------------------------------------------------------------- d:ݤOS_GetEnv:A$,A%,X%,Y%:X%=1:os%=((&FFF4)&FF00)256 nN!=&D7C1C7C5:run$=ARGV$(0):A%=0ARGC:A$=A$+ARGV$(A%)+" "::=A$,run$+1) xMos%>31:>&FFFFF:X%256:ș"GetModuleFileName",0,X%,255:run$=$$X%:=@cmd$ CA%=&600-&7B00*(>&8000)-&3F00*(>&C000):!(-&108)=@%:A%=-&208 ;?(P-3)=0:A%=&100:<&FFFF:A%=-&300:!(+512)=@%:A%= cA$=$A%:=&8F00:run$=A$:ș16A$,,A%:ș72,"",A%:A$=A$,1+A$+" "," ",1+A$," "))):A$=0:A$=run$ SY%=-10:A$=" "+A$:A$=A$,2):A$<>32:A$=34:A%=A$,"""",2)+1A%=A$+" "," ") 9Y%:run$=A$,1-(A$=34),A%-1+2*(A$=34)):A$=A$,A%+1) :=A$ : . Run a program, passing it a command line = If program is *Command, called with OSCLI, else CHAINed = ------------------------------------------------------- !os(A$):A$=42:A$A$:A$  : ( Exit program, setting return value ( ---------------------------------- Fexit(A%):"FX1,"+(A%255):quit$=quit$:A$=quit$:quit$="":os(A$) ">&FFFFF:Ș A% , 6: