From 417fcfe9aa49e5594d07234bdfb2d3a617758fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20GIBERT?= Date: Thu, 13 Jul 2017 17:22:13 +0200 Subject: [PATCH] Kernel version 0.9 : SHELL, enhancement in Batch mode....(Cont.) --- .Floppies/A2OSX.BOOT.po | Bin 143360 -> 143360 bytes .Floppies/A2OSX.BUILD.po | Bin 819200 -> 819200 bytes .Floppies/A2OSX.SRC.po | Bin 819200 -> 819200 bytes SBIN/SHELL.S.CSH.txt | 410 ++++++++++++++++++++++++--------------- SBIN/SHELL.S.txt | 104 +++++++--- 5 files changed, 321 insertions(+), 193 deletions(-) diff --git a/.Floppies/A2OSX.BOOT.po b/.Floppies/A2OSX.BOOT.po index ea32dabb7405e224b4d935fef811ca549e37a35f..b680ca1c8b76e29f8c9641a02aadbf8f2db8a740 100644 GIT binary patch delta 4394 zcmZu!4RljQ7M^)cUeiC?lv1-zONW=XX+lUJMWs|Mmj2L4+U7K&1%D$bRF8*s6+P~P zCc9FP%X-|V#eEoy1piQW(c%ww74@lX!9UzP?=@+YZaHM` zow@g$@7}pH=RWVK#yhGB6{=D`=VtX5t4cCq)Edx-2+@gFm43m*1mmItgWjlbYe!T5 zvO5q)h@s}xPd4k_snUCi6@1{|N41>p>jXZ7YVYr-tY z;?(_^IgP_J3LBMNxh8WZqqMr>xsqYEW>mJk+1lcqB+A-R3R)P?m9qOzm;Q>0T*ds% z;MeY~Z?m;G$U(9$$iRAaoE_ayYX&|uak#y3rNU<@na@xXpAK}H!&YaVa(?WMa0b^- zMlHv&bGn~pg{!Hdt);;=;modvINnG};M4orbiaABU!}FyrZ}>l5XU|7!&Ks5v`-%| zI+=ibUs6Ikkg2(Kg|lIjI{Ql?ph`@nwxbs_j&LY;KI6&x7*EQ_MpSOMEnU{Q(%L#v zN^BRvzLN;syK_8=&PHSgKUbZ@=9utgA4NGRvoIka+KtNjTr8}i=OYwfiHkky=+2x( zs~xDc$>nm?PZl%#M;Rmd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h54_?OSI4bm)Ax+#~|8g_rFO&e)fGID*PbM3USp6Kguio4=IE`yn}cDl^0wH zd6WM?LAaQOD7QXVS>2v;x`k-!Ke698NhbSt63M%HtD+^6cm&xLt02KU2$DRUu=TTFxrJAWSW1Riz+IEoW7gAWSW? z3WpqmFteOgQw3pWIjN=rq52nOYUw1&TO)&*TF$CkL6}<3s_B9-wVYKm1Yv3^tGqKc zq6<6s#C3vjq;XGNPYBgNuI$_tH^?C7gL~peL6{HjiDwDId~i=ZTM*`hd*V5QFdy6# z&lQCE;GTFMBiUSt3E`%Az6@eMxF=p92=l=`@j^kE5AKN<3Br7EPaF`0`QV=TM2+ae zPCap15V3|*QDL1#gz&7}5?syDk)rA=iuV;gP`uAM^ua8ZT9)X%jK8Er!FXX|;!{N;dvKe4W28 diff --git a/SBIN/SHELL.S.CSH.txt b/SBIN/SHELL.S.CSH.txt index f1ad5330..5ae97d9c 100644 --- a/SBIN/SHELL.S.CSH.txt +++ b/SBIN/SHELL.S.CSH.txt @@ -5,19 +5,46 @@ INC 1 AUTO 6 .LIST OFF *-------------------------------------- -TXT.Reset ldy #CSH.SEPStack - tya +CSH.Reset ldy #CSH.hStack + lda (pData),y + bne .1 + + >LDYAI 256 + >SYSCALL GetMemYA + bcs .9 + txa + ldy #CSH.hStack sta (pData),y - rts + +.1 lda #0 + ldy #CSH.StackPtr + sta (pData),y +* clc +.9 rts *-------------------------------------- -TXT.Exec jsr TXT.GetBuffer +CSH.Exec jsr CSH.GetBuffer + ldy #CSH.hStack + lda (pData),y + >SYSCALL GetMemPtrA + >STYA ZPCSHStack + ldy #0 - jsr TXT.GetCharNB + jsr CSH.GetCharNB bcs .9 - jsr TXT.SavePtr Save Ptr, in case of while,for.... + cmp #'}' End of block ? + bne .10 + + jsr CSH.CheckStack must be on stack.... + bcs .9 + + jsr CSH.Pop was expected, get stacked Cmd... + tax + jmp (J.CSHCMDS.END,x) + +.10 jsr CSH.SavePtr Save Ptr, in case of while,for.... cmp #$0D beq .6 empty line...skip... @@ -26,50 +53,51 @@ TXT.Exec jsr TXT.GetBuffer sta (pData),y cpy #CmdLine.MAX - beq .7 Buffer full, try execute... + beq .8 Buffer full, try execute... - jsr TXT.GetNextChar - bcs .7 EOF, try execute... + jsr CSH.GetNextChar + bcs .8 EOF, try execute... cmp #$0D EOL, skip CR and exec... beq .6 - jsr TXT.CheckCharNB + jsr CSH.CheckCharNB bcc .1 still in keyword....loop tya sta (pData) - jsr TXT.CheckKeyword + jsr CSH.CheckKeyword bcs .5 not an internal SCRipt keyword.... lda #0 sta (pData) Reset Cmdline - jmp (J.TXTCMDS,x) + stx CSH.CmdSave + jmp (J.CSHCMDS,x) .5 lda (ZPBufPtr) restore char.... bra .1 -.6 jsr TXT.GetNextChar Skip last char... +.6 jsr CSH.GetNextChar Skip last char... -.7 tya - beq .8 empty line....nothing to do.. +.8 tya + beq .80 empty line....nothing to do.. sta (pData) ldy #bEcho lda (pData),y - beq .8 + beq .80 >PUSHW pData >LDYA L.MSG.ECHO >SYSCALL PPrintFYA -.8 clc +.80 clc .9 rts *-------------------------------------- -TXT.CheckKeyword +CSH.CheckKeyword phy - >LDYA L.TXTCMDS + >LDYA L.CSHCMDS >STYA ZPPtr2 ldx #0 @@ -114,12 +142,12 @@ TXT.CheckKeyword sec rts *-------------------------------------- -TXT.GetBuffer ldy #hBatchFile +CSH.GetBuffer ldy #CSH.hBuf lda (pData),y >SYSCALL GetMemPtrA >STYA ZPBufBase - ldy #BatchFileLen + ldy #CSH.BufLen lda (pData),y clc adc ZPBufBase @@ -130,7 +158,7 @@ TXT.GetBuffer ldy #hBatchFile adc ZPBufBase+1 sta ZPBufEnd+1 -TXT.SetBufPtr ldy #BatchFilePtr +CSH.SetBufPtr ldy #CSH.BufPtr lda (pData),y clc adc ZPBufBase @@ -142,28 +170,202 @@ TXT.SetBufPtr ldy #BatchFilePtr sta ZPBufPtr+1 rts *-------------------------------------- -TXT.SavePtr ldx ZPBufPtr - stx CSH.SavePtr +CSH.SavePtr ldx ZPBufPtr + stx CSH.BufPtrSave ldx ZPBufPtr+1 - stx CSH.SavePtr+1 + stx CSH.BufPtrSave+1 rts *-------------------------------------- -TXT.PushPtr rts +CSH.WHILE +CSH.IF jsr CSH.GetCharNB + bcs .9 + cmp #'(' + bne .9 + + jsr CSH.GetNextCharNB + bcs .9 + + jsr CSH.ExpEval + bcs .99 + + jsr CSH.GetCharNB + bcs .99 + cmp #')' + bne .9 + + jsr CSH.GetNextCharNB + bcs .99 + cmp #'{' + bne .9 + + lda CSH.ACC + ora CSH.ACC+1 + ora CSH.ACC+2 + ora CSH.ACC+3 + beq .6 eval returned false, skip {{....}} + + jsr CSH.GetNextCharNB Skip '{' + + lda CSH.CmdSave Push "IF" or "WHILE" + beq .1 if "IF", no need to push Saved Ptr + + pha + lda CSH.BufPtrSave+1 WHILE : push loop address... + jsr CSH.Push + lda CSH.BufPtrSave + jsr CSH.Push + pla + +.1 jsr CSH.Push + bcs .99 + + lda #'}' Tell '}' is expected at the end of block + jsr CSH.Push + bcs .99 + + rts + +.6 ldx #1 expecting 1 '}' for now.... + +.7 jsr CSH.GetNextChar + bcs .9 + cmp #'{' + bne .71 + inx + bra .7 + +.71 cmp #'}' + bne .7 + txa + beq .9 + dex + bne .7 + + jsr CSH.GetNextChar + + clc + rts + +.9 lda #CSHERR.SYNTAX + sec +.99 rts *-------------------------------------- -TXT.GetCharNB jsr TXT.GetChar - bcs TXT.GetNextCharNB.RTS - jsr TXT.CheckCharNB - bcc TXT.GetNextCharNB.RTS -*-------------------------------------- -TXT.GetNextCharNB - jsr TXT.GetNextChar - bcs TXT.GetNextCharNB.RTS - jsr TXT.CheckCharNB - bcs TXT.GetNextCharNB -TXT.GetNextCharNB.RTS +CSH.IF.END jsr CSH.GetNextChar just skip ending '}' + clc rts *-------------------------------------- -TXT.CheckCharNB cmp #32 SPACE +CSH.WHILE.END jsr CSH.Pop + ldy #CSH.BufPtr + sta (pData),y + jsr CSH.Pop + ldy #CSH.BufPtr+1 + sta (pData),y + clc + rts +*-------------------------------------- +CSH.BREAK +*-------------------------------------- +CSH.CONTINUE + + lda #CSHERR.SYNTAX + sec + rts +*-------------------------------------- +CSH.Push pha + ldy #CSH.StackPtr + lda (pData),y + tay + + pla + sta (ZPCSHStack),y + iny + beq .9 + tya + ldy #CSH.StackPtr + sta (pData),y + clc + rts + +.9 lda #CSHERR.SOVERFLW + sec + rts +*-------------------------------------- +CSH.Pop ldy #CSH.StackPtr + lda (pData),y + beq .9 + dec + tay + sta (pData),y + lda (ZPCSHStack),y + clc + rts + +.9 lda #CSHERR.SYNTAX + sec + rts +*-------------------------------------- +CSH.CheckStack pha + ldy #CSH.StackPtr + lda (pData),y + beq .9 + dec + tay + pla + cmp (ZPCSHStack),y + bne .9 + + tya + ldy #CSH.StackPtr + sta (pData),y + + clc + rts + +.9 lda #CSHERR.SYNTAX + sec + rts +*-------------------------------------- +CSH.ExpEval stz CSH.ACC + stz CSH.ACC+1 + stz CSH.ACC+2 + stz CSH.ACC+3 + + jsr CSH.GetCharNB + bcs .9 + cmp #')' + beq .8 + + jsr CSH.IsLetter Fnc or Var ? + bne .1 + + +.1 + +.8 clc + rts + +.9 lda #CSHERR.SYNTAX + sec + rts +*--------------------------------------- +CSH.IsLetterOrDigit + jsr CSH.IsDigit + bcc CSH.IsLetterRTS +*-------------------------------------- +CSH.GetCharNB jsr CSH.GetChar + bcs CSH.GetNextCharNB.RTS + jsr CSH.CheckCharNB + bcc CSH.GetNextCharNB.RTS +*-------------------------------------- +CSH.GetNextCharNB + jsr CSH.GetNextChar + bcs CSH.GetNextCharNB.RTS + jsr CSH.CheckCharNB + bcs CSH.GetNextCharNB +CSH.GetNextCharNB.RTS + rts +*-------------------------------------- +CSH.CheckCharNB cmp #32 SPACE beq .9 cmp #13 CR beq .9 @@ -174,8 +376,8 @@ TXT.CheckCharNB cmp #32 SPACE clc .9 rts *-------------------------------------- -TXT.GetNextChar phy - ldy #BatchFilePtr +CSH.GetNextChar phy + ldy #CSH.BufPtr lda (pData),y inc sta (pData),y @@ -189,10 +391,10 @@ TXT.GetNextChar phy .1 ply inc ZPBufPtr - bne TXT.GetChar + bne CSH.GetChar inc ZPBufPtr+1 *-------------------------------------- -TXT.GetChar lda ZPBufPtr +CSH.GetChar lda ZPBufPtr eor ZPBufEnd bne .1 @@ -208,15 +410,11 @@ TXT.GetChar lda ZPBufPtr clc rts *--------------------------------------- -TXT.IsLetterOrDigit - jsr TXT.IsDigit - bcc TXT.IsLetterRTS -*--------------------------------------- -TXT.IsLetter cmp #'A' +CSH.IsLetter cmp #'A' bcc .9 cmp #'Z'+1 - bcc TXT.IsLetterRTS + bcc CSH.IsLetterRTS cmp #'a' bcc .9 @@ -225,9 +423,9 @@ TXT.IsLetter cmp #'A' .9 sec -TXT.IsLetterRTS rts +CSH.IsLetterRTS rts *--------------------------------------- -TXT.IsDigit cmp #'0' +CSH.IsDigit cmp #'0' bcc .9 cmp #'9'+1 rts cc if ok, cs if not @@ -235,117 +433,7 @@ TXT.IsDigit cmp #'0' .9 sec rts *-------------------------------------- -TXT.Exec.IF jsr TXT.GetCharNB - bcs .9 - cmp #'(' - bne .9 - - jsr TXT.ExpEval - bcs .99 - - jsr TXT.GetCharNB - bcs .99 - cmp #')' - bne .9 - - jsr TXT.GetNextCharNB - bcs .99 - cmp #'{' - bne .9 - - lda CSH.ACC - ora CSH.ACC+1 - ora CSH.ACC+2 - ora CSH.ACC+3 - beq .6 eval returned false, skip {{....}} - - jsr TXT.GetNextCharNB Skip '{' - - lda #'}' Tell '}' is expected at the end of block - jsr TXT.PushSEP - bcs .99 - - - rts - -.6 ldx #1 expecting 1 '}' - -.7 jsr TXT.GetNextChar - bcs .9 - cmp #'{' - bne .71 - inx - bra .7 - -.71 cmp #'}' - bne .7 - dex - bne .7 - - clc - rts - -.9 lda #SYSMGR.ERRSYN - sec -.99 rts -*-------------------------------------- -TXT.PushSEP tax - ldy #CSH.SEPStack - lda (pData),y - cmp #CSH.SEPStack+CSH.Stack.MAX - beq .9 - - pha - inc - sta (pData),y - ply - txa - sta (pData),y - clc - rts - -.9 lda #SYSMGR.ERRSYN - sec - rts -*-------------------------------------- -TXT.PopSEP ldy #CSH.SEPStack - lda (pData),y - cmp #CSH.SEPStack - beq .9 - dec - sta (pData),y - clc - rts - -.9 lda #SYSMGR.ERRSYN - sec - rts -*-------------------------------------- -TXT.CheckSEP tax - ldy #CSH.SEPStack - lda (pData),y - cmp #CSH.SEPStack - beq .9 - tay - txa - cmp (pData),y - bne .9 - clc - rts - -.9 lda #SYSMGR.ERRSYN - sec - rts -*-------------------------------------- -TXT.ExpEval jsr TXT.GetNextCharNB - bcs .9 - - lda #1 - sta CSH.ACC - clc -.9 rts -*-------------------------------------- MAN -SAVE /A2OSX.SRC/SBIN/SHELL.S.TXT +SAVE /A2OSX.SRC/SBIN/SHELL.S.CSH LOAD /A2OSX.SRC/SBIN/SHELL.S ASM diff --git a/SBIN/SHELL.S.txt b/SBIN/SHELL.S.txt index c2ceb11f..3f92da76 100644 --- a/SBIN/SHELL.S.txt +++ b/SBIN/SHELL.S.txt @@ -18,10 +18,14 @@ ZPPTR3 .EQ ZPBIN+4 ZPBufBase .EQ ZPBIN+8 ZPBufPtr .EQ ZPBIN+10 ZPBufEnd .EQ ZPBIN+12 +ZPCSHStack .EQ ZPBIN+14 *-------------------------------------- CmdLine.MAX .EQ 127 VarLen.MAX .EQ 15 CSH.Stack.MAX .EQ 15 +CSHERR.SYNTAX .EQ $7F +CSHERR.SOVERFLW .EQ $7E +CSHERR.NOVERFLW .EQ $7D *-------------------------------------- * File Header (16 Bytes) *-------------------------------------- @@ -47,6 +51,7 @@ L.MSG.PROMPT .DA MSG.PROMPT L.MSG.ECHO .DA MSG.ECHO L.MSG.ERROR .DA MSG.ERROR L.MSG.PRINTENV .DA MSG.PRINTENV +L.MSG.CSHERR .DA MSG.CSHERR L.ENV.PATH .DA ENV.PATH L.ENV.PWD .DA ENV.PWD L.ENV.PS1 .DA ENV.PS1 @@ -67,18 +72,27 @@ J.INTCMDS .DA Cmd.Exec.CD .DA Cmd.Exec.SET .DA Cmd.Exec.STARTPROC .DA Cmd.Exec.TIME -L.TXTCMDS .DA TXTCMDS -J.TXTCMDS .DA TXT.Exec.IF +L.CSHCMDS .DA CSHCMDS +J.CSHCMDS .DA CSH.IF + .DA CSH.WHILE + .DA CSH.BREAK + .DA CSH.CONTINUE +J.CSHCMDS.END .DA CSH.IF.END + .DA CSH.WHILE.END L.ERR.Codes .DA ERR.Codes L.ERR.Messages .DA ERR.Messages .DA 0 *-------------------------------------- CS.INIT jsr SetPWD +* lda (pPs) +* ora #S.PS.F.EVENT Now accept events +* sta (pPs) + >SYSCALL GetArgC cmp #1 - beq CS.INIT.INTERACTIVE no arg, continue starting interactive + beq .1 no arg, continue starting interactive >PUSHWI 0 Aux type >PUSHBI 4 S.FILEINFO.TYPE.TXT @@ -91,37 +105,29 @@ CS.INIT jsr SetPWD bcs .9 phy - ldy #BatchFileLen+1 + ldy #CSH.BufLen+1 sta (pData),y dey pla sta (pData),y txa - ldy #hBatchFile + ldy #CSH.hBuf sta (pData),y ldy #bExitOnEOF lda #$FF sta (pData),y - jsr TXT.Reset + jmp CSH.Reset - clc -.9 rts -*-------------------------------------- -CS.INIT.INTERACTIVE - jsr HIS.Init +.1 jsr HIS.Init bcs .9 >LDYA L.MSG.GREETINGS >SYSCALL PPrintFYA - lda (pPs) - ora #S.PS.F.EVENT Now accept events - sta (pPs) - - clc +* clc .9 rts *-------------------------------------- CS.RUN ldy #bPause @@ -139,7 +145,7 @@ CS.RUN ldy #bPause jsr ERR.Print bcs CS.RUN.EXIT.RTS -.11 ldy #hBatchFile batch mode ? +.11 ldy #CSH.hBuf batch mode ? lda (pData),y beq .10 @@ -225,7 +231,7 @@ CS.RUN.READ lda #0 plp rts *-------------------------------------- -CS.RUN.BATCH jsr TXT.Exec +CS.RUN.BATCH jsr CSH.Exec bcs .9 jsr CmdBuffer.Normalize @@ -241,25 +247,50 @@ CS.RUN.BATCH jsr TXT.Exec rts .9 cmp #MLI.ERR.EOF - bne .8 + beq .98 - lda #0 + pha + + ldy #CSH.BufPtr+1 + >PUSHB (pData),y + dey + >PUSHB (pData),y + + >LDYA L.MSG.CSHERR + >SYSCALL PPrintFYA + +.90 jsr CSH.GetChar + bcs .91 + >SYSCALL PutCA + + jsr CSH.GetNextChar + bcs .91 + cmp #13 + beq .91 + >SYSCALL PutCA + bra .90 + +.91 pla + bra .99 + +.98 lda #0 - ldy #S.PS.RC +.99 ldy #S.PS.RC sta (pPs),y + pha ldy #bExitOnEOF lda (pData),y asl CS if bExitOnEOF - lda #0 + pla rts *-------------------------------------- CS.DOEVENT sec rts *-------------------------------------- CS.CHARIN tax - ldy #hBatchFile Batch mode ? + ldy #CSH.hBuf Batch mode ? lda (pData),y beq .10 * Batch Mode @@ -397,12 +428,17 @@ CS.CHARIN.CTRL cpx #13 CR *-------------------------------------- CS.QUIT jsr HIS.Quit - ldy #hBatchFile + ldy #CSH.hBuf lda (pData),y beq .1 >SYSCALL FreeMemA -.1 +.1 ldy #CSH.hStack + + lda (pData),y + beq .8 + >SYSCALL FreeMemA + .8 clc rts *-------------------------------------- @@ -501,9 +537,9 @@ CmdBuffer.DEL lda (pData) .9 rts *-------------------------------------- .INB /A2OSX.SRC/SBIN/SHELL.S.CMD + .INB /A2OSX.SRC/SBIN/SHELL.S.CSH .INB /A2OSX.SRC/SBIN/SHELL.S.ERR .INB /A2OSX.SRC/SBIN/SHELL.S.HIS - .INB /A2OSX.SRC/SBIN/SHELL.S.TXT *-------------------------------------- CS.END *-------------------------------------- @@ -521,7 +557,7 @@ INTCMDS >PSTR "CD" >PSTR "STARTPROC" >PSTR "TIME" .HS 00 -TXTCMDS >PSTR "IF" +CSHCMDS >PSTR "IF" >PSTR "WHILE" >PSTR "BREAK" >PSTR "CONTINUE" @@ -532,6 +568,7 @@ MSG.PROMPT >PSTR "%S$ " MSG.ECHO >PSTR ">%S\r\n" MSG.ERROR >PSTR "Err:%S [%h]\r\n" MSG.PRINTENV >PSTR "%S=%S\r\n" +MSG.CSHERR >PSTR "Pos %D:" FMT.DATE >PSTR "%A, %B %d %Y" FMT.TIME >PSTR "%H:%M:%S (%I:%M:%S%p)" *-------------------------------------- @@ -561,11 +598,14 @@ bExitOnEOF .BS 1 hCmdHistory .BS 1 CmdHistory.IDX .BS 1 CmdHistory.END .BS 1 -hBatchFile .BS 1 -BatchFilePtr .BS 2 -BatchFileLen .BS 2 -CSH.SavePtr .BS 2 -CSH.SEPStack .BS CSH.Stack.MAX+1 +CSH.hBuf .BS 1 +CSH.BufPtr .BS 2 +CSH.BufLen .BS 2 +CSH.CmdSave .BS 1 +CSH.SepSave .BS 1 +CSH.BufPtrSave .BS 2 +CSH.hStack .BS 1 +CSH.StackPtr .BS 1 DS.END .ED *-------------------------------------- MAN