mirror of
https://github.com/A2osX/A2osX.git
synced 2025-03-13 14:31:28 +00:00
Kernel 0.94
This commit is contained in:
parent
b3792e9d57
commit
65c8588e36
Binary file not shown.
63
BIN/SH.S.txt
63
BIN/SH.S.txt
@ -59,6 +59,7 @@ ZPCLBuf .BS 2
|
||||
ZPInputBuf .BS 2
|
||||
ZPInputBufPtr .BS 2
|
||||
ZPInputCmdPtr .BS 2
|
||||
|
||||
ZPArgVBuf .BS 2
|
||||
ZPArgVBufPrev .BS 2
|
||||
ZPArgVBufPtr .BS 2
|
||||
@ -70,10 +71,10 @@ CORE.Operator .BS 1
|
||||
CORE.LogicOp .BS 1
|
||||
CORE.TestResult .BS 1
|
||||
CORE.PrevTestResult .BS 1
|
||||
ZPTmpW .BS 2
|
||||
|
||||
ZPPtr1 .BS 2
|
||||
ZPPtr2 .BS 2
|
||||
ZPTmpW .BS 2
|
||||
|
||||
M32.ACC .BS 4
|
||||
|
||||
@ -185,27 +186,46 @@ CS.RUN jsr CL.Init
|
||||
|
||||
ldy #S.PS.ARGC
|
||||
lda (pPS),y
|
||||
beq .1 no arg, continue starting interactive
|
||||
beq .2 no arg, continue starting interactive
|
||||
|
||||
lda #$ff
|
||||
>STA.G bExitOnEOF
|
||||
lda #0
|
||||
jsr CMD.SHIFTA Remove $0=/bin/sh
|
||||
inc lda #0
|
||||
jsr CMD.SHIFTA Remove $0 = /bin/sh
|
||||
|
||||
jsr GetArgV
|
||||
>STYA ZPPtr1
|
||||
lda (ZPPtr1)
|
||||
cmp #'-'
|
||||
bne .1
|
||||
|
||||
jsr IO.Load
|
||||
ldy #1
|
||||
lda (ZPPtr1),y
|
||||
cmp #'C'
|
||||
bne .1
|
||||
|
||||
iny
|
||||
lda (ZPPtr1),y
|
||||
bne .1
|
||||
|
||||
* lda #0
|
||||
jsr CMD.SHIFTA Remove $0 = -C
|
||||
|
||||
jsr GetArgV
|
||||
jmp CS.RUN.CMDLINE
|
||||
|
||||
.1 jsr IO.Load
|
||||
bcs CS.INIT.RTS
|
||||
|
||||
jsr GetArgV
|
||||
|
||||
jsr CORE.Load.YAX Exec Batch file
|
||||
bcs CS.INIT.RTS
|
||||
.77 bcs CS.INIT.RTS
|
||||
lda #$C0+C..
|
||||
jsr CORE.StkPush
|
||||
bra CS.RUN.LOOP
|
||||
*--------------------------------------
|
||||
.1 jsr CMD.CD.HOME
|
||||
.2 jsr CMD.CD.HOME
|
||||
jsr HIS.Init
|
||||
bcs CS.INIT.RTS
|
||||
|
||||
@ -214,7 +234,7 @@ CS.RUN jsr CL.Init
|
||||
>PUSHB /K.VER
|
||||
>PUSHBI 2
|
||||
>SYSCALL PrintF
|
||||
bcs CS.INIT.RTS
|
||||
bcs .77
|
||||
|
||||
>LDYA L.HOME.PROFILE
|
||||
jsr IO.Load
|
||||
@ -294,46 +314,49 @@ CS.RUN.INTERACTIVE
|
||||
jsr CL.Reset
|
||||
|
||||
jsr CL.PrintPrompt
|
||||
bcs .9
|
||||
bcs CS.RUN.CMDLINE.9
|
||||
>STZ.G bREAD.S
|
||||
dec
|
||||
>STA.G READ.N
|
||||
|
||||
.1 >SYSCALL GetChar
|
||||
bcs .9 I/O error
|
||||
bcs CS.RUN.CMDLINE.9 I/O error
|
||||
.2 cmp #C.EOF ....or Ctrl-D
|
||||
beq .9 CS
|
||||
beq CS.RUN.CMDLINE.9 CS
|
||||
|
||||
jsr CL.CHARIN
|
||||
|
||||
>LDA.G CL.bReady Something to execute ?
|
||||
>LDA.G CL.bReady Something to execute ?
|
||||
bpl .1
|
||||
|
||||
>PUSHW L.MSG.PROMPTCRLF
|
||||
>PUSHBI 0
|
||||
>SYSCALL PrintF
|
||||
bcs .9
|
||||
bcs CS.RUN.CMDLINE.9
|
||||
lda (ZPCLBuf)
|
||||
beq .8 Empty line
|
||||
beq CS.RUN.CMDLINE.8 Empty line
|
||||
|
||||
jsr HIS.Add
|
||||
|
||||
>LDYA ZPCLBuf
|
||||
>SYSCALL StrDup
|
||||
bcs .8
|
||||
|
||||
CS.RUN.CMDLINE >SYSCALL StrDup
|
||||
bcs CS.RUN.CMDLINE.8
|
||||
|
||||
jsr GetArgV Y,A=ARGV, X=strdup
|
||||
|
||||
jsr CORE.Load.YAX Exec CL
|
||||
bcs .9
|
||||
bcs CS.RUN.CMDLINE.9
|
||||
lda #$C0+C.CLEXEC
|
||||
jsr CORE.StkPush
|
||||
|
||||
jsr CORE.Run
|
||||
|
||||
.8 jmp CS.RUN.LOOP.END
|
||||
CS.RUN.CMDLINE.8
|
||||
jmp CS.RUN.LOOP.END
|
||||
|
||||
.9 rts
|
||||
CS.RUN.CMDLINE.9
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.BATCH >LDA.G bSET.X
|
||||
beq .5
|
||||
@ -684,7 +707,7 @@ IO.hIn .BS 1
|
||||
IO.hOut .BS 1
|
||||
IO.hErr .BS 1
|
||||
|
||||
*TimeBuf .BS S.TIME 8 bytes
|
||||
*TimeBuf .BS S.TIME 8 bytes
|
||||
*M32.BUF .BS 12 -1234567890\0
|
||||
TimeBuf .EQ *
|
||||
M32.BUF .EQ *
|
||||
|
Loading…
x
Reference in New Issue
Block a user