diff --git a/SBIN/SHELL.C.CSH.txt b/BIN/SHELL.C.CSH.txt
similarity index 93%
rename from SBIN/SHELL.C.CSH.txt
rename to BIN/SHELL.C.CSH.txt
index 291f68a7..db5032c2 100644
--- a/SBIN/SHELL.C.CSH.txt
+++ b/BIN/SHELL.C.CSH.txt
@@ -98,6 +98,6 @@ CSH.FN			>PSTR "printf"
 				.DA #0
 *--------------------------------------
 MAN
-SAVE USR/SRC/SBIN/SHELL.C.CSH
-LOAD USR/SRC/SBIN/SHELL.S
+SAVE USR/SRC/BIN/SHELL.C.CSH
+LOAD USR/SRC/BIN/SHELL.S
 ASM
diff --git a/SBIN/SHELL.G.CSH.txt b/BIN/SHELL.G.CSH.txt
similarity index 82%
rename from SBIN/SHELL.G.CSH.txt
rename to BIN/SHELL.G.CSH.txt
index 5288cc37..8df167ab 100644
--- a/SBIN/SHELL.G.CSH.txt
+++ b/BIN/SHELL.G.CSH.txt
@@ -29,6 +29,6 @@ CSH.EXPBOP2		.BS 1
 CSH.LookupOpt	.BS 1
 *--------------------------------------
 MAN
-SAVE USR/SRC/SBIN/SHELL.G.CSH
-LOAD USR/SRC/SBIN/SHELL.S
+SAVE USR/SRC/BIN/SHELL.G.CSH
+LOAD USR/SRC/BIN/SHELL.S
 ASM
diff --git a/SBIN/SHELL.R.CSH.txt b/BIN/SHELL.R.CSH.txt
similarity index 90%
rename from SBIN/SHELL.R.CSH.txt
rename to BIN/SHELL.R.CSH.txt
index 1b0d5e2f..83342291 100644
--- a/SBIN/SHELL.R.CSH.txt
+++ b/BIN/SHELL.R.CSH.txt
@@ -49,6 +49,6 @@ J.CSH.KW.END	.DA CSH.IF.END
 				.DA CSH.WHILE.END
 *--------------------------------------
 MAN
-SAVE USR/SRC/SBIN/SHELL.R.CSH
-LOAD USR/SRC/SBIN/SHELL.S
+SAVE USR/SRC/BIN/SHELL.R.CSH
+LOAD USR/SRC/BIN/SHELL.S
 ASM
diff --git a/SBIN/SHELL.S.CL.txt b/BIN/SHELL.S.CL.txt
similarity index 93%
rename from SBIN/SHELL.S.CL.txt
rename to BIN/SHELL.S.CL.txt
index bbd3e2c1..f739fe96 100644
--- a/SBIN/SHELL.S.CL.txt
+++ b/BIN/SHELL.S.CL.txt
@@ -457,7 +457,7 @@ CL.CheckCmd		ldy #$ff
 				ldy #CMD.Stat+S.STAT.P.TYPE
 				lda (pData),y
 				cmp #S.FI.T.TXT
-				beq CL.CheckCmd.TXT
+				beq CL.CheckCmd.BIN
 				cmp #S.FI.T.BIN
 				beq CL.CheckCmd.BIN
 				cmp #S.FI.T.SYS
@@ -478,8 +478,7 @@ CL.CheckCmd.RTS
 *--------------------------------------
 * TXT : add "/PATH/SHELL" "/PATH/CMD"
 *--------------------------------------
-CL.CheckCmd.TXT	lda #0
-				>SYSCALL ArgV
+CL.CheckCmd.TXT	>LDYA L.SHELL
 				jsr CL.AddYAToArgV
 				bcs CL.CheckCmd.90
 *--------------------------------------
@@ -633,6 +632,6 @@ CL.AddYAToArgV	>STYA ZPPtr1
 				rts
 *--------------------------------------
 MAN
-SAVE USR/SRC/SBIN/SHELL.S.CL
-LOAD USR/SRC/SBIN/SHELL.S
+SAVE USR/SRC/BIN/SHELL.S.CL
+LOAD USR/SRC/BIN/SHELL.S
 ASM
diff --git a/SBIN/SHELL.S.CMD.txt b/BIN/SHELL.S.CMD.txt
similarity index 92%
rename from SBIN/SHELL.S.CMD.txt
rename to BIN/SHELL.S.CMD.txt
index d54d3ef0..6399d7d2 100644
--- a/SBIN/SHELL.S.CMD.txt
+++ b/BIN/SHELL.S.CMD.txt
@@ -272,11 +272,11 @@ Cmd.INT.SET.1	>STZ.G CMD.Varname
 				jsr Cmd.GetArgX
 				bcs Cmd.INT.SET.UNSET
 				
-				jsr Cmd.INT.GetEXP
+				jsr Cmd.GetEXP
 				
 				bcs .99
 				
-				>PUSHYA
+				>PUSHEA.G M32.Buf
 				>LDA.G CMD.Varname
 				tax
 				jsr Cmd.GetArgX
@@ -848,8 +848,16 @@ Cmd.GetEXP		>LDA.G CMD.ArgIndex
 				bcs .9
 
 				>PULLL.G M32.ARG
+				jsr .80
+				bcs .9
 				
-				
+				>PUSHL.G M32.ACC
+				>PUSHBI 4		
+				>PUSHEA.G M32.BUF
+				>LDYA L.M32.Printf
+				>SYSCALL sprintf
+				bcs .9
+				rts
 				
 .9				lda #E.BADEXP
 				rts
@@ -1006,6 +1014,6 @@ CMD.StkGet		lda (pData)				StackPtr
 				rts
 *--------------------------------------
 MAN
-SAVE USR/SRC/SBIN/SHELL.S.CMD
-LOAD USR/SRC/SBIN/SHELL.S
+SAVE USR/SRC/BIN/SHELL.S.CMD
+LOAD USR/SRC/BIN/SHELL.S
 ASM
diff --git a/SBIN/SHELL.S.CSH.txt b/BIN/SHELL.S.CSH.txt
similarity index 93%
rename from SBIN/SHELL.S.CSH.txt
rename to BIN/SHELL.S.CSH.txt
index 325baf7e..50895e5b 100644
--- a/SBIN/SHELL.S.CSH.txt
+++ b/BIN/SHELL.S.CSH.txt
@@ -1095,6 +1095,6 @@ CSH.IsDigit10	cmp #'0'
 				rts
 *--------------------------------------
 MAN
-SAVE USR/SRC/SBIN/SHELL.S.CSH
-LOAD USR/SRC/SBIN/SHELL.S
+SAVE USR/SRC/BIN/SHELL.S.CSH
+LOAD USR/SRC/BIN/SHELL.S
 ASM
diff --git a/SBIN/SHELL.S.HIS.txt b/BIN/SHELL.S.HIS.txt
similarity index 92%
rename from SBIN/SHELL.S.HIS.txt
rename to BIN/SHELL.S.HIS.txt
index 463a212a..9fcfd678 100644
--- a/SBIN/SHELL.S.HIS.txt
+++ b/BIN/SHELL.S.HIS.txt
@@ -180,6 +180,6 @@ HIS.Quit		>LDA.G HIS.hBuf
 .9				rts
 *--------------------------------------
 MAN
-SAVE USR/SRC/SBIN/SHELL.S.HIS
-LOAD USR/SRC/SBIN/SHELL.S
+SAVE USR/SRC/BIN/SHELL.S.HIS
+LOAD USR/SRC/BIN/SHELL.S
 ASM
diff --git a/SBIN/SHELL.S.IO.txt b/BIN/SHELL.S.IO.txt
similarity index 92%
rename from SBIN/SHELL.S.IO.txt
rename to BIN/SHELL.S.IO.txt
index 8db67a2a..3f62c713 100644
--- a/SBIN/SHELL.S.IO.txt
+++ b/BIN/SHELL.S.IO.txt
@@ -198,6 +198,6 @@ IO.PrintErrMsg	pha						Save EC for PrintF
 				rts
 *--------------------------------------
 MAN
-SAVE USR/SRC/SBIN/SHELL.S.IO
-LOAD USR/SRC/SBIN/SHELL.S
+SAVE USR/SRC/BIN/SHELL.S.IO
+LOAD USR/SRC/BIN/SHELL.S
 ASM
diff --git a/SBIN/SHELL.S.txt b/BIN/SHELL.S.txt
similarity index 89%
rename from SBIN/SHELL.S.txt
rename to BIN/SHELL.S.txt
index 6e586686..c7765c34 100644
--- a/SBIN/SHELL.S.txt
+++ b/BIN/SHELL.S.txt
@@ -4,7 +4,7 @@ AUTO 4,1
 				.LIST OFF
 				.OP	65C02
 				.OR	$2000
-				.TF SBIN/SHELL
+				.TF BIN/SHELL
 *--------------------------------------
 CSH				.EQ 0
 *--------------------------------------
@@ -96,10 +96,12 @@ L.MSG.BATCHERR	.DA MSG.BATCHERR
 L.MSG.ERROR		.DA MSG.ERROR
 L.MSG.PRINTENV	.DA MSG.PRINTENV
 L.MSG.PID		.DA MSG.PID
+L.SHELL			.DA SHELL
 L.ENV.ROOT		.DA ENV.ROOT
 L.ENV.PATH		.DA ENV.PATH
 L.ENV.PWD		.DA ENV.PWD
 L.ENV.PS1		.DA ENV.PS1
+L.ENV.SHELL		.DA ENV.SHELL
 L.ENV.HOME		.DA ENV.HOME
 L.FMT.DATE		.DA FMT.DATE
 L.FMT.TIME		.DA FMT.TIME
@@ -153,10 +155,11 @@ J.CMD.IF.TOKEN4	.DA M32.Add
 				.DA M32.Mul
 				.DA M32.Div
 				.DA M32.Mod
+L.M32.Printf	.DA M32.Printf
 L.ERR.Codes		.DA ERR.Codes
 L.ERR.Messages	.DA ERR.Messages
 				.DO CSH=1
-				.INB USR/SRC/SBIN/SHELL.R.CSH
+				.INB USR/SRC/BIN/SHELL.R.CSH
 				.FIN
 				.DA 0
 *--------------------------------------
@@ -166,9 +169,18 @@ CS.INIT.RTS		rts
 CS.RUN			jsr CMD.Init
 				bcs CS.INIT.RTS
 
+				ldy #S.PS.ARGC
+				lda (pPS),y
+				beq .1					no arg, continue starting interactive
+				
+				>PUSHW L.ENV.SHELL
+				lda #0
+				>SYSCALL ArgV
+				>SYSCALL setenv
+				bcs CS.INIT.RTS
+				
 				lda #1
 				>SYSCALL ArgV
-				bcs .1					no arg, continue starting interactive
 				
 				>SYSCALL LoadTxtFile
 				bcs CS.INIT.RTS
@@ -181,7 +193,7 @@ CS.RUN			jsr CMD.Init
 				jsr SetPWD
 				
 				lda #0
-				jsr ShiftA				Remove $0=/bin/shell
+				jsr ShiftA 				Remove $0=/bin/shell
 				
 				.DO CSH=1
 				jsr CSH.Init
@@ -533,12 +545,12 @@ Lookup			>STYA ZPPtr2
 				sec
 				rts
 *--------------------------------------
-				.INB USR/SRC/SBIN/SHELL.S.CL
-				.INB USR/SRC/SBIN/SHELL.S.CMD
-				.INB USR/SRC/SBIN/SHELL.S.IO
-				.INB USR/SRC/SBIN/SHELL.S.HIS
+				.INB USR/SRC/BIN/SHELL.S.CL
+				.INB USR/SRC/BIN/SHELL.S.CMD
+				.INB USR/SRC/BIN/SHELL.S.IO
+				.INB USR/SRC/BIN/SHELL.S.HIS
 				.DO CSH=1
-				.INB USR/SRC/SBIN/SHELL.S.CSH
+				.INB USR/SRC/BIN/SHELL.S.CSH
 				.FIN
 *--------------------------------------
 CS.END
@@ -554,11 +566,13 @@ MSG.PID			.AZ "PID=%d\r\n"
 FMT.DATE		.AZ "%A (%w), %B %d %Y"
 FMT.TIME		.AZ "%H:%M:%S (%I:%M:%S%p)"
 *--------------------------------------
+SHELL			.AZ "${ROOT}SBIN/SHELL"
 ENV.ROOT		.AZ "ROOT"
 ENV.PATH		.AZ "PATH"
 ENV.PWD			.AZ "PWD"
 ENV.PS1			.AZ "PS1"
 ENV.HOME		.AZ "HOME"
+ENV.SHELL		.AZ "SHELL"
 *--------------------------------------
 * https://www.tldp.org/LDP/abs/html/io-redirection.html
 *--------------------------------------
@@ -631,13 +645,14 @@ CMD.IF.TOKEN3.BITS
 				.DA #%011
 *--------------------------------------
 				.DO CSH=1
-				.INB USR/SRC/SBIN/SHELL.C.CSH
+				.INB USR/SRC/BIN/SHELL.C.CSH
 				.FIN
 				.INB USR/SRC/X.M32.S
 				.INB USR/SRC/X.ERRORS.S
 *--------------------------------------
 EscChars		.AS 'DBAC'
 EscChars.Cnt	.EQ *-EscChars
+M32.Printf		.AZ "%L"
 *--------------------------------------
 				.DUMMY
 				.OR 0
@@ -684,14 +699,14 @@ IO.hIn			.BS 1
 IO.hOut			.BS 1
 IO.hErr			.BS 1
 				.DO CSH=1
-				.INB USR/SRC/SBIN/SHELL.G.CSH
+				.INB USR/SRC/BIN/SHELL.G.CSH
 				.FIN
-				
+M32.BUF			.BS 12					-1234567890\0				
 M32.ACC			.BS 4
 M32.ARG			.BS 4
 M32.TMP			.BS 4				
 DS.END			.ED
 *--------------------------------------
 MAN
-SAVE USR/SRC/SBIN/SHELL.S
+SAVE USR/SRC/BIN/SHELL.S
 ASM
diff --git a/INC/A2osX.I.txt b/INC/A2osX.I.txt
index f64499ef..a7e668bc 100644
--- a/INC/A2osX.I.txt
+++ b/INC/A2osX.I.txt
@@ -78,7 +78,7 @@ A2osX.S.DISABLE		.EQ $FF
 *--------------------------------------
 * ProDOS ERROR CODES : $00->$5F
 * Lib ERROR CODES : $80->$BF
-* Kernel ERROR CODES : $C0->$FF
+* Kernel ERROR CODES : $F0->$FF
 *--------------------------------------
 E.OOM			.EQ $FF					Out Of Memory Error
 E.OOH			.EQ $FE					Out Of Handle Error
@@ -86,13 +86,11 @@ E.INVH			.EQ $FD					Invalid Handle
 E.BUF			.EQ $FC					Buffer Overflow
 E.BADPATH		.EQ $FB
 E.BADARG		.EQ $FA
-*--------------------------------------
-E.NSP			.EQ $DD					No Such Process Error
-*--------------------------------------
-E.SYN			.EQ $CF					Syntax Error
-E.ENVF			.EQ $CE					Env is Full
-E.IBIN			.EQ $CD					Invalid BIN format
-E.FTB			.EQ $CC					File Too Big Error
+E.NSP			.EQ $F9					No Such Process Error
+E.SYN			.EQ $F8					Syntax Error
+E.ENVF			.EQ $F7					Env is Full
+E.IBIN			.EQ $F6					Invalid BIN format
+E.FTB			.EQ $F5					File Too Big Error
 *--------------------------------------
 * A2osX.SYSCALL Constants
 *--------------------------------------
diff --git a/SYS/KERNEL.S.BIN.txt b/SYS/KERNEL.S.BIN.txt
index 9bb17550..4fcd64cf 100644
--- a/SYS/KERNEL.S.BIN.txt
+++ b/SYS/KERNEL.S.BIN.txt
@@ -201,11 +201,14 @@ BIN.Load		>STYA BIN.CmdLine
 				clc
 				rts						X=hMem, Y,A=Ptr
 *--------------------------------------				
-BIN.Load.1		>PUSHWI K.S.STAT
-				>LDYA BIN.CmdLine
-				>SYSCALL STAT			BANK1!!! Look for AUXTYPE
-				bcs .9
-				
+BIN.Load.1		
+*				>PUSHWI K.S.STAT
+*				>LDYA BIN.CmdLine
+*				>SYSCALL STAT			BANK1!!! Look for AUXTYPE
+*				bcs .9
+* Already called by Filesearch in FindDRV, FindLIB
+* Already called by PS.Load (TXT,BIN,SYS)
+			
 				>LDYA K.S.STAT+S.STAT.P.AUXTYPE
 				>STYA BIN.R.CS.Start
 
@@ -535,35 +538,6 @@ BIN.RelDrv		ldy #H.BIN.DRV.REL.TABLE
 				
 .8				rts
 *--------------------------------------
-* 6502/65C02/65816 OPCODES
-* Bit 3 	: 1 = absolute addressing
-* Bit 2-1-0 : opcode + @ length
-*--------------------------------------
-*					0.1.2.3.4.5.6.7.8.9.A.B.C.D.E.F
-BIN.65816		
-*	TO DO : Make 2 different tables
-* http://axis.llx.com/~nparker/a2/opcodes.html
-*--------------------------------------
-* 65R02 OPCODES
-*--------------------------------------
-*					0.1.2.3.4.5.6.7.8.9.A.B.C.D.E.F
-BIN.65R02		.HS 1.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
-				.HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3
-				.HS B.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
-				.HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3
-				.HS 1.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
-				.HS 2.2.2.1.2.2.2.2.1.B.1.1.1.B.B.3
-				.HS 1.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
-				.HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3
-				.HS 2.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
-				.HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3
-				.HS 2.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
-				.HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3
-				.HS 2.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
-				.HS 2.2.2.1.2.2.2.2.1.B.1.1.1.B.B.3
-				.HS 2.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
-				.HS 2.2.2.1.2.2.2.2.1.B.1.1.1.B.B.3
-*--------------------------------------
 MAN
 SAVE USR/SRC/SYS/KERNEL.S.BIN
 LOAD USR/SRC/SYS/KERNEL.S
diff --git a/SYS/KERNEL.S.INIT.txt b/SYS/KERNEL.S.INIT.txt
index 99a785ce..c81a8be4 100644
--- a/SYS/KERNEL.S.INIT.txt
+++ b/SYS/KERNEL.S.INIT.txt
@@ -138,11 +138,11 @@ Kernel.Init3	sta SETALTZP
 				>LDYAI MSG.Prefix
 				>SYSCALL printf
 
-				lda KBD
-				bpl .1
-				sta KBDSTROBE
-				cmp #$84					CTRL-D for Maintenace mode
-				bne .1
+*				lda KBD
+*				bpl .1
+*				sta KBDSTROBE
+*				cmp #$84					CTRL-D for Maintenace mode
+*				bne .1
 				
 				>PUSHBI 0
 				>LDYAI MSG.CTRLD
@@ -1064,8 +1064,8 @@ I.ENV.ROOT		.AZ "ROOT"
 I.ENV.PATH		.AZ "PATH=${ROOT}SBIN/:${ROOT}BIN/"
 I.ENV.LIB		.AZ "LIB=${ROOT}LIB/"
 I.ENV.DRV		.AZ "DRV=${ROOT}DRV/"
-CTRLD.SHELL		.AZ "${ROOT}SBIN/SHELL"
-ETCINIT.CMDLINE	.AZ "${ROOT}SBIN/SHELL ${ROOT}ETC/INIT"
+CTRLD.SHELL		.AZ "${ROOT}BIN/SHELL"
+ETCINIT.CMDLINE	.AZ "${ROOT}ETC/INIT"
 *--------------------------------------
 MLIOPEN00		.DA #3
 				.DA A2OSXCONF
diff --git a/SYS/KERNEL.S.MEM.txt b/SYS/KERNEL.S.MEM.txt
index 6fe0e3c4..cfc3c709 100644
--- a/SYS/KERNEL.S.MEM.txt
+++ b/SYS/KERNEL.S.MEM.txt
@@ -742,6 +742,35 @@ MEM.PutCharPtr2	sta (ZPPtr2)
 				inc ZPPtr2+1
 .8				rts
 *--------------------------------------
+* 6502/65C02/65816 OPCODES
+* Bit 3 	: 1 = absolute addressing
+* Bit 2-1-0 : opcode + @ length
+*--------------------------------------
+*					0.1.2.3.4.5.6.7.8.9.A.B.C.D.E.F
+BIN.65816		
+*	TO DO : Make 2 different tables
+* http://axis.llx.com/~nparker/a2/opcodes.html
+*--------------------------------------
+* 65R02 OPCODES
+*--------------------------------------
+*					0.1.2.3.4.5.6.7.8.9.A.B.C.D.E.F
+BIN.65R02		.HS 1.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
+				.HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3
+				.HS B.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
+				.HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3
+				.HS 1.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
+				.HS 2.2.2.1.2.2.2.2.1.B.1.1.1.B.B.3
+				.HS 1.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
+				.HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3
+				.HS 2.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
+				.HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3
+				.HS 2.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
+				.HS 2.2.2.1.2.2.2.2.1.B.1.1.B.B.B.3
+				.HS 2.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
+				.HS 2.2.2.1.2.2.2.2.1.B.1.1.1.B.B.3
+				.HS 2.2.2.1.2.2.2.2.1.2.1.1.B.B.B.3
+				.HS 2.2.2.1.2.2.2.2.1.B.1.1.1.B.B.3
+*--------------------------------------
 MAN
 SAVE USR/SRC/SYS/KERNEL.S.MEM
 LOAD USR/SRC/SYS/KERNEL.S
diff --git a/SYS/KERNEL.S.PS.txt b/SYS/KERNEL.S.PS.txt
index 848ba0cb..e68de8b7 100644
--- a/SYS/KERNEL.S.PS.txt
+++ b/SYS/KERNEL.S.PS.txt
@@ -62,23 +62,13 @@ PS.Exec			jsr PS.CreateChild		Child S.PS at ZPPtr3
 
 				sta .8+1
 
-				>LDYA PS.ArgV
-				jsr PS.DupArgs
-				bcs .9
-				ldy #S.PS.hARGV
-				sta (ZPPtr3),y
-				pha
-				dey						S.PS.ARGC
-				txa
-				sta (ZPPtr3),y
-
-				pla
-				jsr K.GetMemPtr
-
 				jsr PS.Load
+				bcs .99
+
+				jsr PS.AddArgV
 				bcc .8
 				
-				pha						save error code
+.99				pha						save error code
 				lda .8+1
 				jsr CORE.PSFree
 				pla						get back error code
@@ -93,7 +83,7 @@ PS.Exec			jsr PS.CreateChild		Child S.PS at ZPPtr3
 *  out :
 *   A = PSID
 * we cannot use ZPPtrs1 & 2
-* because of calling K.NewStr.YA & PS.Dup
+* because of calling K.NewStr & PS.Dup
 *--------------------------------------
 PS.CreateChild	ldx CORE.PSCount
 				beq .3
@@ -211,7 +201,63 @@ PS.CreateChild	ldx CORE.PSCount
 				clc						Exit with A=PSID
 .9				rts
 *--------------------------------------
-PS.Load			jsr BIN.Load			Y,A=filename full path
+PS.Load			>PUSHWI K.S.STAT
+				>LDYA PS.ArgV
+				>SYSCALL stat			BANK 1
+				bcs .99
+				
+				lda K.S.STAT+S.STAT.P.TYPE
+				cmp #S.FI.T.BIN
+				beq PS.LoadBIN
+				cmp #S.FI.T.TXT
+				beq .10
+				cmp #S.FI.T.SYS
+				bne .98
+				
+				bra *
+
+.10				jsr PS.LoadGetHeader
+				bcs .99
+
+				>LDYAI PS.Load.ROOT
+				jsr K.GetEnv
+				bcs .97
+
+				>STYA .21+1
+				
+				ldx #$ff
+			
+.2				inx
+.21				lda $ffff,x		
+				sta K.Buf256,x
+				bne .2
+				
+				ldy #0
+				
+.3				lda K.IOBuf+128,y
+				cmp PS.Load.HEADER,y
+				bne .98
+				iny
+				cpy #3
+				bne .3
+				
+.4				iny
+				inx
+				lda K.IOBuf+128-1,y
+				sta K.Buf256-1,x
+				bne .4
+				
+				>LDYAI K.Buf256
+				bra PS.LoadBIN.YA
+				
+.97				lda #E.BADPATH
+				.HS 2C
+.98				lda #E.IBIN
+				sec
+.99				rts				
+
+PS.LoadBIN		>LDYA PS.ArgV	
+PS.LoadBIN.YA	jsr BIN.Load
 				bcs .9
 				>STYA ZPPtr4			save PTR to Code Segment
 				
@@ -301,6 +347,45 @@ PS.Load			jsr BIN.Load			Y,A=filename full path
 				clc
 .9				rts
 *--------------------------------------
+PS.LoadGetHeader
+				>PUSHWI 0				Aux type
+				>PUSHBI S.FI.T.TXT
+				>PUSHBI	O.RDONLY
+				>LDYA PS.ArgV
+				>SYSCALL fopen
+				bcs .99
+				sta .1+1
+				
+				>PUSHWI 128
+				>PUSHWI K.IOBuf+128
+.1				lda #$ff				SELF MODIFIED
+				>SYSCALL fgets
+				
+				php
+				pha
+				lda .1+1
+				>SYSCALL fclose
+				pla
+				plp
+.99				rts
+*--------------------------------------
+PS.Load.ROOT	.AZ "ROOT"
+PS.Load.HEADER	.AZ "#!/"
+*--------------------------------------
+PS.AddArgV		>LDYA PS.ArgV
+				jsr PS.DupArgs
+				bcs .9
+				ldy #S.PS.hARGV
+				sta (ZPPtr3),y
+
+				dey						S.PS.ARGC
+				txa
+				dec						don't include $0
+				sta (ZPPtr3),y
+				
+*				clc
+.9				rts				
+*--------------------------------------
 * PS.DupArgs
 *  In:
 *   Y,A = Ptr To Args[]
