2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2017-03-29 15:48:15 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
2017-12-22 21:24:30 +00:00
|
|
|
|
AUTO 4,1
|
2015-10-19 20:35:00 +00:00
|
|
|
|
.LIST OFF
|
2015-03-14 21:48:35 +00:00
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2017-03-29 15:48:15 +00:00
|
|
|
|
.TF /A2OSX.BUILD/SBIN/SHELL
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2017-03-29 15:48:15 +00:00
|
|
|
|
.INB /A2OSX.BUILD/INC/MACROS.I
|
|
|
|
|
.INB /A2OSX.BUILD/INC/A2OSX.I
|
|
|
|
|
.INB /A2OSX.BUILD/INC/MLI.ERR.I
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2017-10-23 15:39:19 +00:00
|
|
|
|
ZPPtr1 .EQ ZPBIN
|
|
|
|
|
ZPPtr2 .EQ ZPBIN+2
|
2017-09-07 15:32:27 +00:00
|
|
|
|
ZPCMDBuf .EQ ZPBIN+4
|
2017-10-23 15:39:19 +00:00
|
|
|
|
ZPCSHBufPtr .EQ ZPBIN+6
|
|
|
|
|
ZPCSHSymbols .EQ ZPBIN+8
|
|
|
|
|
ZPCSHData .EQ ZPBIN+10
|
|
|
|
|
ZPCSHValue .EQ ZPBIN+12
|
2017-07-13 15:22:13 +00:00
|
|
|
|
ZPCSHStack .EQ ZPBIN+14
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2017-09-15 15:16:04 +00:00
|
|
|
|
CmdLine.MAX .EQ 255
|
2017-01-26 16:28:52 +00:00
|
|
|
|
VarLen.MAX .EQ 15
|
2017-09-25 15:50:33 +00:00
|
|
|
|
History.MAX .EQ 256
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
* File Header (16 Bytes)
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
|
|
|
|
.DA 0
|
2017-09-26 15:55:25 +00:00
|
|
|
|
.DA CS.END-CS.START CS
|
|
|
|
|
.DA DS.END-DS.START DS
|
|
|
|
|
.DA #64 SS
|
2018-04-26 15:38:02 +00:00
|
|
|
|
.DA #16 ZP
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
2015-10-19 20:35:00 +00:00
|
|
|
|
*--------------------------------------
|
2015-03-14 21:48:35 +00:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
L.MSG.GREETINGS .DA MSG.GREETINGS
|
2016-10-29 19:58:21 +00:00
|
|
|
|
L.MSG.PROMPT .DA MSG.PROMPT
|
2016-10-17 06:21:04 +00:00
|
|
|
|
L.MSG.ECHO .DA MSG.ECHO
|
2015-11-22 22:30:06 +00:00
|
|
|
|
L.MSG.ERROR .DA MSG.ERROR
|
2016-10-17 15:47:50 +00:00
|
|
|
|
L.MSG.PRINTENV .DA MSG.PRINTENV
|
2017-07-13 15:22:13 +00:00
|
|
|
|
L.MSG.CSHERR .DA MSG.CSHERR
|
2015-10-19 20:35:00 +00:00
|
|
|
|
L.ENV.PATH .DA ENV.PATH
|
2016-10-29 19:58:21 +00:00
|
|
|
|
L.ENV.PWD .DA ENV.PWD
|
|
|
|
|
L.ENV.PS1 .DA ENV.PS1
|
2017-09-28 15:39:12 +00:00
|
|
|
|
L.ENV.HOME .DA ENV.HOME
|
2016-09-05 16:00:11 +00:00
|
|
|
|
L.FMT.DATE .DA FMT.DATE
|
|
|
|
|
L.FMT.TIME .DA FMT.TIME
|
2017-11-08 16:09:52 +00:00
|
|
|
|
J.ESC .DA CL.BS left arrow
|
2017-09-26 15:55:25 +00:00
|
|
|
|
.DA HIS.GetNext
|
|
|
|
|
.DA HIS.GetPrev
|
2017-11-08 16:09:52 +00:00
|
|
|
|
.DA CL.NAK right arow
|
2017-07-11 15:53:52 +00:00
|
|
|
|
L.INTCMDS .DA INTCMDS
|
2016-08-17 06:25:58 +00:00
|
|
|
|
J.INTCMDS .DA Cmd.Exec.CD
|
|
|
|
|
.DA Cmd.Exec.DATE
|
|
|
|
|
.DA Cmd.Exec.ECHO
|
|
|
|
|
.DA Cmd.Exec.EXIT
|
|
|
|
|
.DA Cmd.Exec.PAUSE
|
2016-10-25 06:58:15 +00:00
|
|
|
|
.DA Cmd.Exec.PWD
|
2016-08-17 06:25:58 +00:00
|
|
|
|
.DA Cmd.Exec.READ
|
|
|
|
|
.DA Cmd.Exec.SET
|
2017-07-17 05:59:30 +00:00
|
|
|
|
.DA Cmd.Exec.SLEEP
|
2016-08-17 06:25:58 +00:00
|
|
|
|
.DA Cmd.Exec.STARTPROC
|
|
|
|
|
.DA Cmd.Exec.TIME
|
2017-10-24 15:44:12 +00:00
|
|
|
|
L.CSH.BOPS .DA CSH.BOPS
|
2017-10-26 06:41:57 +00:00
|
|
|
|
J.CSH.BOPS .DA CSH.BOPS.ADD
|
|
|
|
|
.DA CSH.BOPS.SUB
|
|
|
|
|
.DA CSH.BOPS.MUL
|
|
|
|
|
.DA CSH.BOPS.DIV
|
|
|
|
|
.DA CSH.BOPS.MOD
|
|
|
|
|
.DA CSH.BOPS.SHL
|
|
|
|
|
.DA CSH.BOPS.SHR
|
|
|
|
|
.DA CSH.BOPS.L
|
|
|
|
|
.DA CSH.BOPS.G
|
|
|
|
|
.DA CSH.BOPS.LE
|
|
|
|
|
.DA CSH.BOPS.GE
|
|
|
|
|
.DA CSH.BOPS.EQ
|
|
|
|
|
.DA CSH.BOPS.NE
|
|
|
|
|
.DA CSH.BOPS.AND
|
|
|
|
|
.DA CSH.BOPS.OR
|
|
|
|
|
.DA CSH.BOPS.EOR
|
|
|
|
|
.DA CSH.BOPS.LAND
|
|
|
|
|
.DA CSH.BOPS.LOR
|
2017-11-10 15:55:13 +00:00
|
|
|
|
L.CSH.FN .DA CSH.FN
|
|
|
|
|
L.CSH.KW .DA CSH.KW
|
2017-11-14 16:57:34 +00:00
|
|
|
|
L.CSH.STYPES .DA CSH.STYPES
|
2017-11-10 15:55:13 +00:00
|
|
|
|
J.CSH.KW .DA CSH.IF
|
2017-10-23 15:39:19 +00:00
|
|
|
|
.DA CSH.WHILE
|
|
|
|
|
.DA CSH.ELSE
|
|
|
|
|
.DA CSH.DO
|
|
|
|
|
.DA CSH.FOR
|
|
|
|
|
.DA CSH.SWITCH
|
|
|
|
|
.DA CSH.CASE
|
|
|
|
|
.DA CSH.BREAK
|
|
|
|
|
.DA CSH.CONTINUE
|
2017-11-10 15:55:13 +00:00
|
|
|
|
.DA CSH.FLOAT
|
|
|
|
|
.DA CSH.SIGNED
|
|
|
|
|
.DA CSH.UNSIGNED
|
|
|
|
|
J.CSH.STYPES .DA CSH.CHAR
|
2017-10-25 15:34:23 +00:00
|
|
|
|
.DA CSH.INT
|
|
|
|
|
.DA CSH.LONG
|
2017-11-10 15:55:13 +00:00
|
|
|
|
J.CSH.UTYPES .DA CSH.UCHAR
|
|
|
|
|
.DA CSH.UINT
|
|
|
|
|
.DA CSH.ULONG
|
|
|
|
|
J.CSH.KW.START .DA CSH.IF.START
|
2017-10-25 15:34:23 +00:00
|
|
|
|
.DA CSH.WHILE.START
|
2017-11-10 15:55:13 +00:00
|
|
|
|
J.CSH.KW.END .DA CSH.IF.END
|
2017-07-13 15:22:13 +00:00
|
|
|
|
.DA CSH.WHILE.END
|
2016-10-29 19:58:21 +00:00
|
|
|
|
L.ERR.Codes .DA ERR.Codes
|
|
|
|
|
L.ERR.Messages .DA ERR.Messages
|
2015-03-14 21:48:35 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2016-10-29 19:58:21 +00:00
|
|
|
|
CS.INIT jsr SetPWD
|
|
|
|
|
|
2017-09-07 15:32:27 +00:00
|
|
|
|
jsr CMD.Init
|
|
|
|
|
bcs .9
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-07-17 05:59:30 +00:00
|
|
|
|
lda (pPs)
|
|
|
|
|
ora #S.PS.F.EVENT Now accept events
|
|
|
|
|
sta (pPs)
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-09-01 15:40:26 +00:00
|
|
|
|
ldy #S.PS.ARGC
|
|
|
|
|
lda (pPs),y
|
2015-10-19 20:35:00 +00:00
|
|
|
|
|
2017-07-13 15:22:13 +00:00
|
|
|
|
beq .1 no arg, continue starting interactive
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-07-21 14:46:25 +00:00
|
|
|
|
jmp CSH.Init
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-07-13 15:22:13 +00:00
|
|
|
|
.1 jsr HIS.Init
|
2015-10-19 20:35:00 +00:00
|
|
|
|
bcs .9
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2015-11-22 22:30:06 +00:00
|
|
|
|
>LDYA L.MSG.GREETINGS
|
2017-08-25 15:02:16 +00:00
|
|
|
|
>SYSCALL PrintF.YA
|
2017-09-06 15:00:10 +00:00
|
|
|
|
|
2017-09-13 06:17:46 +00:00
|
|
|
|
.9 rts
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2017-09-12 15:24:36 +00:00
|
|
|
|
CS.RUN >LDA.G bReadMode READ Command ?
|
2017-01-26 16:28:52 +00:00
|
|
|
|
bne CS.RUN.READ
|
2016-11-08 16:56:05 +00:00
|
|
|
|
|
2017-02-23 16:43:42 +00:00
|
|
|
|
ldy #S.PS.RC
|
|
|
|
|
lda (pPs),y
|
|
|
|
|
beq .11
|
2017-11-09 16:39:01 +00:00
|
|
|
|
|
2017-08-22 06:37:03 +00:00
|
|
|
|
jsr IO.PrintErrMsg
|
2017-11-09 16:39:01 +00:00
|
|
|
|
bcs .9
|
2017-02-23 16:43:42 +00:00
|
|
|
|
|
2017-09-08 14:49:23 +00:00
|
|
|
|
.11 >LDA.G bPause
|
2017-07-17 05:59:30 +00:00
|
|
|
|
bpl .13
|
|
|
|
|
|
2017-08-22 15:03:34 +00:00
|
|
|
|
>SYSCALL GetChar
|
2017-07-17 05:59:30 +00:00
|
|
|
|
bcs .8
|
2017-11-09 16:39:01 +00:00
|
|
|
|
|
|
|
|
|
>STZ.G bPause
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-09-08 14:49:23 +00:00
|
|
|
|
.13 jsr CheckSleep
|
2017-07-17 05:59:30 +00:00
|
|
|
|
bne .8
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-09-11 15:29:08 +00:00
|
|
|
|
>LDA.G CSH.hBuf batch mode ?
|
2018-04-16 05:53:19 +00:00
|
|
|
|
beq .10
|
|
|
|
|
jmp CS.RUN.BATCH
|
2017-09-15 15:16:04 +00:00
|
|
|
|
*--------------------------------------
|
2017-11-09 16:39:01 +00:00
|
|
|
|
.10 jsr CL.RESET reset CmdBuf
|
2017-09-15 06:37:15 +00:00
|
|
|
|
|
2017-11-08 16:09:52 +00:00
|
|
|
|
.12 jsr CL.PrintPrompt
|
2017-11-09 16:39:01 +00:00
|
|
|
|
bcs .9
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
.1 >SLEEP
|
2017-08-22 15:03:34 +00:00
|
|
|
|
>SYSCALL GetChar
|
2018-04-16 05:53:19 +00:00
|
|
|
|
bcc .3
|
|
|
|
|
cmp #26 EOF
|
|
|
|
|
beq .9
|
2017-11-09 16:39:01 +00:00
|
|
|
|
|
2018-04-16 05:53:19 +00:00
|
|
|
|
bne .1 no char
|
|
|
|
|
|
|
|
|
|
.3 jsr CL.CHARIN
|
2017-01-12 17:43:45 +00:00
|
|
|
|
|
2017-09-15 15:16:04 +00:00
|
|
|
|
>LDA.G bCmdBufExec Something to execute ?
|
2015-06-24 20:41:38 +00:00
|
|
|
|
bpl .1
|
2017-09-27 06:14:13 +00:00
|
|
|
|
|
2017-09-15 15:16:04 +00:00
|
|
|
|
jsr CMD.Parse
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-09-08 14:49:23 +00:00
|
|
|
|
>LDA.G CmdBuflen
|
2017-09-21 15:29:45 +00:00
|
|
|
|
beq .10 Empty line
|
2015-11-22 22:30:06 +00:00
|
|
|
|
|
2016-08-17 06:25:58 +00:00
|
|
|
|
jsr HIS.Add
|
2015-11-22 22:30:06 +00:00
|
|
|
|
|
2017-09-15 15:16:04 +00:00
|
|
|
|
jsr CMD.Exec
|
|
|
|
|
bcs .2
|
|
|
|
|
|
|
|
|
|
lda #0
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-09-15 15:16:04 +00:00
|
|
|
|
.2 ldy #S.PS.RC
|
2017-01-26 16:28:52 +00:00
|
|
|
|
sta (pPs),y
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-09-08 14:49:23 +00:00
|
|
|
|
>LDA.G bExit
|
2017-11-09 16:39:01 +00:00
|
|
|
|
bne .80
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-07-17 05:59:30 +00:00
|
|
|
|
.8 clc
|
2015-03-14 21:48:35 +00:00
|
|
|
|
rts
|
2015-11-22 22:30:06 +00:00
|
|
|
|
|
2017-11-09 16:39:01 +00:00
|
|
|
|
.80 lda #0
|
|
|
|
|
sec
|
|
|
|
|
.9 rts
|
2017-01-26 16:28:52 +00:00
|
|
|
|
*--------------------------------------
|
2017-09-28 15:39:12 +00:00
|
|
|
|
CS.RUN.READ lda #0 reset Buffer
|
2017-09-07 15:32:27 +00:00
|
|
|
|
sta (ZPCMDBuf)
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
.1 >SLEEP
|
2017-08-22 15:03:34 +00:00
|
|
|
|
>SYSCALL GetChar
|
2017-01-26 16:28:52 +00:00
|
|
|
|
bcs .1 no char
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-11-09 16:39:01 +00:00
|
|
|
|
jsr CL.CHARIN
|
2017-01-26 16:28:52 +00:00
|
|
|
|
|
2017-09-15 15:16:04 +00:00
|
|
|
|
>LDA.G bCmdBufExec
|
2017-01-26 16:28:52 +00:00
|
|
|
|
bpl .1
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-09-07 15:32:27 +00:00
|
|
|
|
>PUSHW ZPCMDBuf
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-09-28 15:39:12 +00:00
|
|
|
|
>PUSHEA.G CMD.VarName
|
2017-01-26 16:28:52 +00:00
|
|
|
|
>SYSCALL SetEnv
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-11-09 16:39:01 +00:00
|
|
|
|
CS.RUN.BATCH >SYSCALL GetChar
|
|
|
|
|
bcs .2
|
|
|
|
|
|
|
|
|
|
cmp #3 test Ctrl-c
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.1 cmp #19 test Ctrl-s
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
lda #$80
|
|
|
|
|
>STA.G bPause
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.2 jsr CSH.Run
|
2017-09-15 15:16:04 +00:00
|
|
|
|
bcc .7
|
|
|
|
|
|
2017-10-26 16:01:54 +00:00
|
|
|
|
cmp #MLI.E.EOF
|
2017-09-15 15:16:04 +00:00
|
|
|
|
beq .9
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-09-15 15:16:04 +00:00
|
|
|
|
pha
|
2017-09-13 06:17:46 +00:00
|
|
|
|
|
2017-10-20 15:42:24 +00:00
|
|
|
|
jsr CSH.ErrorMsg
|
2017-10-19 15:27:38 +00:00
|
|
|
|
|
2017-10-20 15:42:24 +00:00
|
|
|
|
pla
|
2017-07-12 15:25:23 +00:00
|
|
|
|
|
2017-09-15 15:16:04 +00:00
|
|
|
|
ldy #S.PS.RC
|
2017-07-12 15:25:23 +00:00
|
|
|
|
sta (pPs),y
|
2017-11-10 15:55:13 +00:00
|
|
|
|
sec
|
2017-01-26 16:28:52 +00:00
|
|
|
|
rts
|
2017-09-15 15:16:04 +00:00
|
|
|
|
|
|
|
|
|
.7 >LDA.G bCmdBufExec
|
|
|
|
|
bpl .8 Empty line....nothing to do....
|
|
|
|
|
|
|
|
|
|
jsr Cmd.Parse
|
|
|
|
|
|
|
|
|
|
lda (ZPCMDBuf)
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
jsr Cmd.Exec
|
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
|
|
|
|
|
.8 ldy #S.PS.RC
|
|
|
|
|
sta (pPs),y
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 lda #0
|
|
|
|
|
sec
|
|
|
|
|
rts
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2017-07-17 05:59:30 +00:00
|
|
|
|
CS.DOEVENT lda (pEvent)
|
|
|
|
|
bpl .9
|
|
|
|
|
|
|
|
|
|
jsr CheckSleep
|
|
|
|
|
beq .9
|
|
|
|
|
|
|
|
|
|
* ldy #Sleep already set by CheckSleep
|
|
|
|
|
clc
|
|
|
|
|
ldx #4
|
|
|
|
|
|
|
|
|
|
.1 lda (pData),y
|
|
|
|
|
sbc #0
|
|
|
|
|
sta (pData),y
|
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.9 sec
|
2015-12-13 21:29:51 +00:00
|
|
|
|
rts
|
2017-01-12 17:43:45 +00:00
|
|
|
|
*--------------------------------------
|
2016-08-17 06:25:58 +00:00
|
|
|
|
CS.QUIT jsr HIS.Quit
|
2017-07-21 14:46:25 +00:00
|
|
|
|
jsr CSH.Quit
|
2017-09-22 06:38:22 +00:00
|
|
|
|
jsr CMD.Quit
|
2017-07-21 14:46:25 +00:00
|
|
|
|
clc
|
2015-03-14 21:48:35 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-07-17 05:59:30 +00:00
|
|
|
|
CheckSleep ldy #Sleep+3
|
|
|
|
|
lda (pData),y
|
|
|
|
|
dey
|
|
|
|
|
ora (pData),y
|
|
|
|
|
dey
|
|
|
|
|
ora (pData),y
|
|
|
|
|
dey
|
|
|
|
|
ora (pData),y
|
|
|
|
|
rts
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2016-10-29 19:58:21 +00:00
|
|
|
|
SetPWD ldy #S.PS.hPREFIX
|
|
|
|
|
lda (pPs),y
|
2017-08-25 06:37:21 +00:00
|
|
|
|
>SYSCALL GetMemPtr.A
|
2016-10-29 19:58:21 +00:00
|
|
|
|
>PUSHYA
|
|
|
|
|
>PUSHW L.ENV.PWD
|
|
|
|
|
>SYSCALL SetEnv
|
|
|
|
|
rts
|
2015-11-22 22:30:06 +00:00
|
|
|
|
*--------------------------------------
|
2017-09-27 15:40:31 +00:00
|
|
|
|
.INB /A2OSX.SRC/SBIN/SHELL.S.CL
|
2017-03-29 15:48:15 +00:00
|
|
|
|
.INB /A2OSX.SRC/SBIN/SHELL.S.CMD
|
2017-07-13 15:22:13 +00:00
|
|
|
|
.INB /A2OSX.SRC/SBIN/SHELL.S.CSH
|
2017-08-22 06:37:03 +00:00
|
|
|
|
.INB /A2OSX.SRC/SBIN/SHELL.S.IO
|
2017-03-29 15:48:15 +00:00
|
|
|
|
.INB /A2OSX.SRC/SBIN/SHELL.S.HIS
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.END
|
|
|
|
|
*--------------------------------------
|
2018-04-11 15:35:51 +00:00
|
|
|
|
ENV.PATH .AZ "PATH"
|
|
|
|
|
ENV.PWD .AZ "PWD"
|
|
|
|
|
ENV.PS1 .AZ "PS1"
|
|
|
|
|
ENV.HOME .AZ "HOME"
|
2017-09-11 15:29:08 +00:00
|
|
|
|
*--------------------------------------
|
2018-04-11 15:35:51 +00:00
|
|
|
|
INTCMDS .AZ "CD"
|
|
|
|
|
.AZ "DATE"
|
|
|
|
|
.AZ "ECHO"
|
|
|
|
|
.AZ "EXIT"
|
|
|
|
|
.AZ "PAUSE"
|
|
|
|
|
.AZ "PWD"
|
|
|
|
|
.AZ "READ"
|
|
|
|
|
.AZ "SET"
|
|
|
|
|
.AZ "SLEEP"
|
|
|
|
|
.AZ "STARTPROC"
|
|
|
|
|
.AZ "TIME"
|
2015-10-19 20:35:00 +00:00
|
|
|
|
.HS 00
|
2017-10-23 15:39:19 +00:00
|
|
|
|
*--------------------------------------
|
2018-04-11 15:35:51 +00:00
|
|
|
|
MSG.GREETINGS .AZ "\r\nA2osX-Shell 0.9.1\r\n\r\n"
|
|
|
|
|
MSG.PROMPT .AZ "$ "
|
|
|
|
|
MSG.ECHO .AZ ">%s\r\n"
|
|
|
|
|
MSG.ERROR .AZ "[$%h]:%S.\r\n"
|
|
|
|
|
MSG.PRINTENV .AZ "%s=%s\r\n"
|
|
|
|
|
MSG.CSHERR .AZ "^\r\nLine #%D:"
|
|
|
|
|
FMT.DATE .AZ "%A (%w), %B %d %Y"
|
|
|
|
|
FMT.TIME .AZ "%H:%M:%S (%I:%M:%S%p)"
|
2016-10-29 19:58:21 +00:00
|
|
|
|
*--------------------------------------
|
2017-11-10 15:55:13 +00:00
|
|
|
|
.INB /A2OSX.SRC/SBIN/SHELL.C.CSH
|
2017-03-29 15:48:15 +00:00
|
|
|
|
.INB /A2OSX.SRC/X.ERRORS.S
|
2016-10-17 15:47:50 +00:00
|
|
|
|
*--------------------------------------
|
2017-09-26 15:55:25 +00:00
|
|
|
|
EscChars.Count .EQ 4
|
|
|
|
|
EscChars .AS 'DBAC'
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
2015-03-14 21:48:35 +00:00
|
|
|
|
DS.START
|
2017-09-01 15:40:26 +00:00
|
|
|
|
hCmdBuf .BS 1
|
2017-09-26 15:55:25 +00:00
|
|
|
|
CmdBufPtr .BS 1
|
2017-09-05 15:17:10 +00:00
|
|
|
|
CmdBuflen .BS 1
|
|
|
|
|
bCmdBufexec .BS 1
|
2017-09-01 15:40:26 +00:00
|
|
|
|
|
2015-12-13 21:29:51 +00:00
|
|
|
|
bEscMode .BS 1
|
2015-11-22 22:30:06 +00:00
|
|
|
|
bPause .BS 1
|
|
|
|
|
bExit .BS 1
|
2016-01-10 22:19:11 +00:00
|
|
|
|
bEcho .BS 1
|
2017-09-06 15:00:10 +00:00
|
|
|
|
|
|
|
|
|
bReadMode .BS 1
|
|
|
|
|
bSecureRead .BS 1
|
|
|
|
|
|
2017-07-17 05:59:30 +00:00
|
|
|
|
Sleep .BS 4
|
2017-09-06 15:00:10 +00:00
|
|
|
|
|
2017-09-07 15:32:27 +00:00
|
|
|
|
CMD.hCmdLine .BS 1
|
2017-09-13 15:34:26 +00:00
|
|
|
|
CMD.hFullpath .BS 1
|
2017-09-14 15:21:06 +00:00
|
|
|
|
CMD.bStartProc .BS 1
|
2017-09-07 15:32:27 +00:00
|
|
|
|
CMD.VarName .BS VarLen.MAX+1
|
2017-09-13 15:34:26 +00:00
|
|
|
|
CMD.Stat .BS S.STAT
|
2017-09-15 15:16:04 +00:00
|
|
|
|
CMD.Time .BS S.TIME
|
2017-09-05 15:17:10 +00:00
|
|
|
|
|
2017-08-22 06:37:03 +00:00
|
|
|
|
HIS.hBuf .BS 1
|
2017-09-25 15:50:33 +00:00
|
|
|
|
HIS.Count .BS 1
|
|
|
|
|
HIS.Index .BS 1
|
2017-09-05 15:17:10 +00:00
|
|
|
|
|
2017-08-22 06:37:03 +00:00
|
|
|
|
IO.hIn .BS 1
|
|
|
|
|
IO.hOut .BS 1
|
|
|
|
|
IO.hErr .BS 1
|
2017-09-05 15:17:10 +00:00
|
|
|
|
|
2017-11-10 15:55:13 +00:00
|
|
|
|
.INB /A2OSX.SRC/SBIN/SHELL.G.CSH
|
|
|
|
|
|
2017-07-11 15:53:52 +00:00
|
|
|
|
DS.END .ED
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2017-03-29 15:48:15 +00:00
|
|
|
|
SAVE /A2OSX.SRC/SBIN/SHELL.S
|
2015-03-14 21:48:35 +00:00
|
|
|
|
ASM
|