Kernel 0.94

This commit is contained in:
Rémy GIBERT 2020-07-31 16:46:11 +02:00
parent 4ca0e321ad
commit 6ad471abcc
10 changed files with 173 additions and 149 deletions

Binary file not shown.

View File

@ -25,6 +25,6 @@ CSH.StackPtr .BS 1
CSH.VarDef .BS 6 CSH.VarDef .BS 6
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/BIN/CSH.D SAVE usr/src/bin/csh.d
LOAD USR/SRC/BIN/CSH.S LOAD usr/src/bin/csh.s
ASM ASM

View File

@ -18,6 +18,6 @@ CSH.E.OOM .EQ $D2
CSH.E.DUP .EQ $D3 CSH.E.DUP .EQ $D3
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/BIN/CSH.E SAVE usr/src/bin/csh.e
LOAD USR/SRC/BIN/CSH.S LOAD usr/src/bin/csh.s
ASM ASM

View File

@ -77,6 +77,7 @@ CSH.BOPS >PSTR "+"
* Reserved Directives: * Reserved Directives:
*-------------------------------------- *--------------------------------------
CSH.DIRS >PSTR "define" CSH.DIRS >PSTR "define"
>PSTR "include"
.HS 00 .HS 00
*-------------------------------------- *--------------------------------------
* Reserved Keywords: * Reserved Keywords:
@ -192,6 +193,6 @@ CSH.FN
.DA #0 .DA #0
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/BIN/CSH.I SAVE usr/src/bin/csh.i
LOAD USR/SRC/BIN/CSH.S LOAD usr/src/bin/csh.s
ASM ASM

View File

@ -50,6 +50,7 @@ L.CSH.DIRS .DA CSH.DIRS
L.CSH.KW .DA CSH.KW L.CSH.KW .DA CSH.KW
L.CSH.STYPES .DA CSH.STYPES L.CSH.STYPES .DA CSH.STYPES
J.CSH.DIRS .DA CSH.DIR.DEFINE J.CSH.DIRS .DA CSH.DIR.DEFINE
.DA CSH.DIR.INCLUDE
J.CSH.KW .DA CSH.IF J.CSH.KW .DA CSH.IF
.DA CSH.WHILE .DA CSH.WHILE
.DA CSH.ELSE .DA CSH.ELSE
@ -96,6 +97,6 @@ J.CSH.EXEC .DA EXEC.log
.DA EXEC.malloc .DA EXEC.malloc
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/BIN/CSH.R SAVE usr/src/bin/csh.r
LOAD USR/SRC/BIN/CSH.S LOAD usr/src/bin/csh.s
ASM ASM

View File

@ -199,7 +199,7 @@ CSH.DIR jsr CSH.GetNextCharNB
cmp #'!' #!/bin/csh cmp #'!' #!/bin/csh
bne .1 bne .1
bra CSH.SkipLine jmp CSH.SkipLine
.1 >LDYA L.CSH.DIRS .1 >LDYA L.CSH.DIRS
jsr CSH.LookupID jsr CSH.LookupID
@ -254,6 +254,32 @@ CSH.DIR.DEFINE jsr CSH.CheckSpace
>SYSCALL SListAddData >SYSCALL SListAddData
bcs .99 bcs .99
bra CSH.SkipLine
.90 lda #CSH.E.SYNTAX
sec
.99 rts
*--------------------------------------
CSH.DIR.INCLUDE jsr CSH.CheckSpace
bcs .99
cmp #'"'
beq .1
cmp #'<'
bne .80
lda #'>'
.1 sta ArgIndex
bra CSH.SkipLine bra CSH.SkipLine
.90 lda #CSH.E.SYNTAX .90 lda #CSH.E.SYNTAX
@ -609,8 +635,7 @@ CSH.fCall ldx ZPPtr1
.99 rts .99 rts
*-------------------------------------- *--------------------------------------
CSH.fCall.Exec CSH.fCall.Exec jmp (J.CSH.EXEC,x)
jmp (J.CSH.EXEC,x)
*-------------------------------------- *--------------------------------------
* Input: * Input:
* ZPFileBufPtr, A = Expected type * ZPFileBufPtr, A = Expected type
@ -1429,6 +1454,6 @@ DEBUG.VAR >SYSCALL PutChar
rts rts
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/BIN/CSH.S.CORE SAVE usr/src/bin/csh.s.core
LOAD USR/SRC/BIN/CSH.S LOAD usr/src/bin/csh.s
ASM ASM

View File

@ -275,6 +275,6 @@ EXEC.malloc >PULLYA
rts rts
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/BIN/CSH.S.EXEC SAVE usr/src/bin/csh.s.exec
LOAD USR/SRC/BIN/CSH.S LOAD usr/src/bin/csh.s
ASM ASM

View File

@ -5,12 +5,12 @@ NEW
.OR $2000 .OR $2000
.TF bin/csh .TF bin/csh
*-------------------------------------- *--------------------------------------
.INB INC/MACROS.I .INB inc/macros.i
.INB INC/A2OSX.I .INB inc/a2osx.i
.INB INC/MLI.I .INB inc/mli.i
.INB INC/MLI.E.I .INB inc/mli.e.i
*-------------------------------------- *--------------------------------------
.INB USR/SRC/BIN/CSH.E .INB usr/src/bin/csh.e
*-------------------------------------- *--------------------------------------
* Zero Page Segment, up to 32 bytes * Zero Page Segment, up to 32 bytes
*-------------------------------------- *--------------------------------------
@ -21,25 +21,22 @@ ZPFileBuf .BS 2
ZPFileBufPtr .BS 2 ZPFileBufPtr .BS 2
ZPFileBufPtrBak .BS 2 ZPFileBufPtrBak .BS 2
ZPCSHConst .BS 2 ZPCSHConst .BS 2
ZPCSHData .BS 2 ZPCSHData .BS 2
ZPCSHStack .BS 2 ZPCSHStack .BS 2
ZPVarID .BS 2
ZPVarID .BS 2
ZPVarDef .EQ * ZPVarDef .EQ *
ZPVarType .BS 2 ZPVarType .BS 2
ZPVarSizeOf .BS 2 ZPVarSizeOf .BS 2
ZPVarDataPtr .BS 2 ZPVarDataPtr .BS 2
ZPhMacro .BS 1 ZPhMacro .BS 1
ArgIndex .BS 1
ZPPtr1 .BS 2 ZPPtr1 .BS 2
ZPPtr2 .BS 2 ZPPtr2 .BS 2
ArgIndex .BS 1
ZPPtr3 .BS 2 ZPPtr3 .BS 2
ZS.END .ED ZS.END .ED
@ -70,7 +67,7 @@ L.MSG.ECHOCRLF .DA MSG.ECHOCRLF
L.MSG.DEBUG .DA MSG.DEBUG L.MSG.DEBUG .DA MSG.DEBUG
L.MSG.ERR .DA MSG.ERR L.MSG.ERR .DA MSG.ERR
L.MSG.DBGVAR .DA MSG.DBGVAR L.MSG.DBGVAR .DA MSG.DBGVAR
.INB USR/SRC/BIN/CSH.R .INB usr/src/bin/csh.r
.DA 0 .DA 0
*-------------------------------------- *--------------------------------------
* Called once at process creation * Called once at process creation
@ -295,8 +292,8 @@ PrintTraceMsg.3 >PUSHBI '>'
rts rts
*-------------------------------------- *--------------------------------------
.INB USR/SRC/BIN/CSH.S.CORE .INB usr/src/bin/csh.s.core
.INB USR/SRC/BIN/CSH.S.EXEC .INB usr/src/bin/csh.s.exec
*-------------------------------------- *--------------------------------------
CS.END CS.END
*-------------------------------------- *--------------------------------------
@ -314,16 +311,16 @@ MSG.DBGVAR .AZ "K=%H, T=%H, S=%H, P=%H, V=%L\r\n"
OptionList .AS "DdTt" OptionList .AS "DdTt"
OptionVars .DA #bDebug,#bDebug,#bTrace,#bTrace OptionVars .DA #bDebug,#bDebug,#bTrace,#bTrace
*-------------------------------------- *--------------------------------------
.INB USR/SRC/BIN/CSH.I .INB usr/src/bin/csh.i
*-------------------------------------- *--------------------------------------
.DUMMY .DUMMY
.OR 0 .OR 0
DS.START .INB USR/SRC/BIN/CSH.D DS.START .INB usr/src/bin/csh.d
bDebug .BS 1 bDebug .BS 1
bTrace .BS 1 bTrace .BS 1
DS.END DS.END
.ED .ED
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/BIN/CSH.S SAVE usr/src/bin/csh.s
ASM ASM

View File

@ -353,7 +353,7 @@ OPEN.I jsr CLOSE
rts rts
*-------------------------------------- *--------------------------------------
OPEN.SnY >AR.Sn.SELECT S0.MR OPEN.SnY >AR.Sn.SELECT S0.MR
lda #W5100.AR.Sn.MR.IPRAW+W5100.AR.Sn.MR.MF lda #W5100.AR.Sn.MR.IPRAW
sta W5100.DR,x sta W5100.DR,x
>AR.Sn.SELECT S0.PROTO >AR.Sn.SELECT S0.PROTO

View File

@ -12,4 +12,4 @@ NEW
short int fopen ( const char *, short int, short int, int ); short int fopen ( const char *, short int, short int, int );
MAN MAN
SAVE include/A2osX.h TEXT include/A2osX.h