diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 6734e8f9..228f53be 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/.Floppies/A2OSX.SRC.po b/.Floppies/A2OSX.SRC.po index a6f91073..f82cc21e 100644 Binary files a/.Floppies/A2OSX.SRC.po and b/.Floppies/A2OSX.SRC.po differ diff --git a/BIN/LS.S.txt b/BIN/LS.S.txt index 04ed2574..fedccdbc 100644 --- a/BIN/LS.S.txt +++ b/BIN/LS.S.txt @@ -60,6 +60,10 @@ CS.INIT ldy #S.PS.ARGC .1 >SYSCALL GetArg.A >STYA ZPPtr1 + >SYSCALL PrintF.YA + lda #'|' + >SYSCALL PutChar.A + lda (ZPPtr1) cmp #'-' bne .4 diff --git a/DRV/CONSOLE.DRV.S.txt b/DRV/CONSOLE.DRV.S.txt index e07d09e5..302057ff 100644 --- a/DRV/CONSOLE.DRV.S.txt +++ b/DRV/CONSOLE.DRV.S.txt @@ -186,6 +186,8 @@ WRITE bit bEscMode .1 pha jsr CUROFF pla + cmp #$7f + beq DEL cmp #32 bcc COUT.Ctrl @@ -202,6 +204,27 @@ FS ldx CH .8 clc rts *-------------------------------------- +DEL ldx CH + beq .1 + dec CH + bra .3 + +.1 ldy CV + beq .8 + + lda #79 + sta CH + dec CV + +.3 lda #$20 + ora INVFLG + ldx CH + ldy CV + jmp SetCharAtXY + +.8 clc + rts +*-------------------------------------- COUT.Ctrl ldx #CtrlChars.Cnt-1 .1 cmp CtrlChars,x @@ -383,13 +406,6 @@ BS ldx CH .3 clc rts - - - lda #$20 - ora INVFLG - ldx CH - ldy CV - jmp SetCharAtXY *-------------------------------------- ClrScr stz CH stz CV diff --git a/DRV/SSC.DRV.S.txt b/DRV/SSC.DRV.S.txt index 5977112c..c7a7d116 100644 --- a/DRV/SSC.DRV.S.txt +++ b/DRV/SSC.DRV.S.txt @@ -79,7 +79,7 @@ Dev.Detect >STYA ARGS sta A2osX.SLOTS,y pla ora #$30 - sta DEV.HEADER.NAME+4 + sta DEV.HEADER.NAME+3 asl asl asl @@ -97,7 +97,7 @@ DEVSIG.Offset .HS 05070B0C DEVSIG.Value .HS 38180131 DEVSIG.Length .EQ DEVSIG.Value-DEVSIG.Offset MSG.DETECT >CSTR "Apple SSC (Super Serial Card,//c Serial Port) Driver.\r\n" -MSG.DETECT.OK >CSTR "SSC Installed As Device : %S\r\n" +MSG.DETECT.OK >CSTR "SSC Installed As Device : %s\r\n" MSG.DETECT.KO >CSTR "No SSC Found.\r\n" ARGS .BS 2 *-------------------------------------- @@ -107,7 +107,7 @@ DEV.HEADER cld jmp (DRV.CS.START,x) .DA #S.DEV.S.WRITE+S.DEV.S.READ .BS 6 -DEV.HEADER.NAME >PSTR "COM1" NAME +DEV.HEADER.NAME >CSTR "COM1" NAME *-------------------------------------- * Driver Code *-------------------------------------- diff --git a/DRV/SSC.I.DRV.S.txt b/DRV/SSC.I.DRV.S.txt index 3a9b1bc0..2a21d49e 100644 --- a/DRV/SSC.I.DRV.S.txt +++ b/DRV/SSC.I.DRV.S.txt @@ -82,7 +82,7 @@ Dev.Detect >STYA ARGS sta A2osX.SLOTS,y pla ora #$30 - sta DEV.HEADER.NAME+4 + sta DEV.HEADER.NAME+3 asl asl asl @@ -100,7 +100,7 @@ DEVSIG.Offset .HS 05070B0C DEVSIG.Value .HS 38180131 DEVSIG.Length .EQ DEVSIG.Value-DEVSIG.Offset MSG.DETECT >CSTR "Apple SSC (Super Serial Card,//c Serial Port) Driver (IRQ Enabled).\r\n" -MSG.DETECT.OK >CSTR "SSC Installed As Device : %S\r\n" +MSG.DETECT.OK >CSTR "SSC Installed As Device : %s\r\n" MSG.DETECT.KO >CSTR "No SSC Found.\r\n" ARGS .BS 2 *-------------------------------------- @@ -110,7 +110,7 @@ DEV.HEADER cld jmp (DRV.CS.START,x) .DA #S.DEV.S.WRITE+S.DEV.S.READ+S.DEV.S.IRQ .BS 6 -DEV.HEADER.NAME >PSTR "COM1" NAME +DEV.HEADER.NAME >CSTR "COM1" NAME *-------------------------------------- * Driver Code *-------------------------------------- diff --git a/README.md b/README.md index ae69da30..68522a33 100644 --- a/README.md +++ b/README.md @@ -164,8 +164,8 @@ note : '$VAR' does NOT expand Variable | Name | Status | Comment | K.Ver | | ---- | ------ | ------- | ----- | | Console.DRV | Working | ANSI support in Progress. | 0.9.1 | -| SSC.DRV | Working | Apple "Super Serial Card" Driver | 0.9 | -| SSC.I.DRV | Working | Apple "Super Serial Card" Driver (IRQ enabled) | 0.9 | +| SSC.DRV | Working | Apple "Super Serial Card" Driver | 0.9.1 | +| SSC.I.DRV | Working | Apple "Super Serial Card" Driver (IRQ enabled) | 0.9.1 | | PIC.DRV | In Progress | Apple "Parallel Interface Card" Driver, renamed from PPIC.DRV | 0.9 | | Mouse.DRV | Working | Apple Mouse Card,//c Mouse Port | 0.9 | | DHGR.DRV | In Progress | except bitblt... | 0.9 | @@ -182,7 +182,7 @@ note : '$VAR' does NOT expand Variable | LSDEV | Working | | 0.9.1 | | PS | Working | | 0.9.1 | | MD | Working | | 0.9.1 | -| LS | Working | -A : Do Not Print . & .. | 0.9 | +| LS | Working | -A : Do Not Print . & .. | 0.9.1 | | | | -L : long listing with size/date... | | | | | -R : Recurse subdirectories | | | RM | Working | -C : Continue On Error | 0.9 | diff --git a/SBIN/SHELL.S.CL.txt b/SBIN/SHELL.S.CL.txt new file mode 100644 index 00000000..7e50ffb5 --- /dev/null +++ b/SBIN/SHELL.S.CL.txt @@ -0,0 +1,131 @@ +PR#3 +PREFIX /A2OSX.BUILD +NEW +INC 1 +AUTO 6 + .LIST OFF +*-------------------------------------- +*-------------------------------------- +CmdLine.CLR ldy #0 + +.1 lda (ZPCMDBuf),y + beq .9 + +.2 lda #$7F + + sta (ZPCMDBuf),y + iny + lda (ZPCMDBuf),y + bne .2 + + jsr CmdLine.PRINT + + jmp CmdLine.RESET + +.9 rts +*-------------------------------------- +CmdLine.BS >LDA.G CmdBufPtr + beq .9 + + dec + sta (pData),y + + lda #8 + >SYSCALL PutChar.A +.9 rts +*-------------------------------------- +CmdLine.NAK >LDA.G CmdBufPtr + >CMP.G CmdBuflen + beq .9 + + inc + >STA.G CmdBufPtr + + lda #21 + >SYSCALL PutChar.A +.9 rts +*-------------------------------------- +CmdLine.DEL >LDA.G CmdBuflen + beq .8 + sec + >SBC.G CmdBufPtr + tax Keep in x char count to \0 + bne .1 + + >DEC.G CmdBuflen + >STA.G CmdBufPtr + + tay + lda #0 + sta (ZPCMDBuf),y + + lda #$7f + >SYSCALL PutChar.A + rts + +.8 clc + rts + +.1 >LDA.G CmdBufPtr + tay + +.2 iny + lda (ZPCMDBuf),y + dey + sta (ZPCMDBuf),y + iny + dex + bne .2 + + >DEC.G CmdBuflen +*-------------------------------------- +CmdLine.PRINTPTR + >LDA.G CmdBufPtr + tay + +.1 lda (ZPCMDBuf),y + beq .2 + + phy + >SYSCALL PutChar.A + ply + iny + bra .1 + +.2 lda #' ' + >SYSCALL PutChar.A + lda #8 + >SYSCALL PutChar.A + + >LDA.G CmdBufPtr + tay + +.3 lda (ZPCMDBuf),y + beq .8 + + phy + lda #8 + >SYSCALL PutChar.A + ply + iny + bra .3 + +.8 clc + rts +*-------------------------------------- +CmdLine.PRINT >LDYA ZPCMDBuf + >SYSCALL PrintF.YA + rts +*-------------------------------------- +CmdLine.RESET lda #0 + sta (ZPCMDBuf) + >STA.G bCmdBufexec + >STA.G CmdBufPtr + >STA.G CmdBuflen + >STA.G bSecureRead Clear password mode + rts +*-------------------------------------- +MAN +SAVE /A2OSX.SRC/SBIN/SHELL.S.CL +LOAD /A2OSX.SRC/SBIN/SHELL.S +ASM diff --git a/SBIN/SHELL.S.CMD.txt b/SBIN/SHELL.S.CMD.txt index 4201c4e8..694a9063 100644 --- a/SBIN/SHELL.S.CMD.txt +++ b/SBIN/SHELL.S.CMD.txt @@ -205,12 +205,21 @@ Cmd.Exec.EXT.TXT >SYSCALL StrCpy jsr Cmd.Exec.EXT.SEP Add a space.... - + >LDA.G CMD.hFullpath >SYSCALL GetMemPtr.A >PUSHYA >PUSHW ZPCMDBuf >SYSCALL StrCat + + >LDYA ZPCMDBuf + >SYSCALL PrintF.YA + lda #'!' + >SYSCALL PutChar.A + lda #13 + >SYSCALL PutChar.A + lda #10 + >SYSCALL PutChar.A *-------------------------------------- * BIN : Launch "/PATH/CMD ARGS" *-------------------------------------- @@ -224,6 +233,15 @@ Cmd.Exec.EXT.BIN >PUSHW ZPCMDBuf >SYSCALL StrCat + >LDYA ZPCMDBuf + >SYSCALL PrintF.YA + lda #'!' + >SYSCALL PutChar.A + lda #13 + >SYSCALL PutChar.A + lda #10 + >SYSCALL PutChar.A + .1 >LDA.G CMD.bStartProc asl >LDYA ZPCMDBuf diff --git a/SBIN/SHELL.S.HIS.txt b/SBIN/SHELL.S.HIS.txt index 7b4eadd3..bafa83a0 100644 --- a/SBIN/SHELL.S.HIS.txt +++ b/SBIN/SHELL.S.HIS.txt @@ -143,6 +143,10 @@ HIS.SetA jsr HIS.GetA sta (ZPCMDBuf),y bne .2 + tya + >STA.G CmdBufPtr + >STA.G CmdBuflen + jmp CmdLine.PRINT *-------------------------------------- HIS.GetA ldy #0 diff --git a/SBIN/SHELL.S.txt b/SBIN/SHELL.S.txt index d79e6ec7..89f145a3 100644 --- a/SBIN/SHELL.S.txt +++ b/SBIN/SHELL.S.txt @@ -66,7 +66,6 @@ L.ENV.PWD .DA ENV.PWD L.ENV.PS1 .DA ENV.PS1 L.FMT.DATE .DA FMT.DATE L.FMT.TIME .DA FMT.TIME -L.MSG.HEXBYTE .DA MSG.HEXBYTE J.ESC .DA CmdLine.BS left arrow .DA HIS.GetNext .DA HIS.GetPrev @@ -353,57 +352,45 @@ CS.CHARIN tax Save Char jmp CmdLine.DEL .2 >LDA.G CmdBuflen - cmp #CmdLine.MAX beq .8 Buffer full, discard... inc sta (pData),y - + + clc Len-1-Ptr !!!!! + >SBC.G CmdBufPtr + beq .30 + phx + tax + >LDA.G CmdBuflen tay - lda #0 + +.3 lda (ZPCMDBuf),y Move from Ptr To end of buffer forward... + iny sta (ZPCMDBuf),y - - >LDA.G CmdBufPtr - tay - -*.3 lda (ZPCMDBuf),y Move from Ptr To end of buffer forward... -* iny -* sta (ZPCMDBuf),y -* ora #0 -* bne .3 ...until ending 0 - - - >LDA.G CmdBufPtr Insert char at Ptr + dey + dey + dex + bne .3 + plx + +.30 >LDA.G CmdBufPtr Insert char at Ptr tay txa sta (ZPCMDBuf),y + >SYSCALL PutChar.A >INC.G CmdBufPtr >CMP.G CmdBuflen - bne .4 + beq .8 + jmp CmdLine.PRINTPTR - - - -.4 >LDA.G bSecureRead - bne .8 - - txa - >SYSCALL PutChar.A - .8 clc rts *-------------------------------------- CS.CHARIN.CTRL -* phx -* txa -* >PUSHA -* >LDYA L.MSG.HEXBYTE -* >SYSCALL PrintF.YA -* plx - cpx #13 CR bne .10 @@ -412,6 +399,13 @@ CS.CHARIN.CTRL lda #10 >SYSCALL PutChar.A + >LDA.G CmdBufPtr + tay + lda #0 + sta (ZPCMDBuf),y + tya + >STA.G CmdBuflen + lda #$ff >STA.G bCmdBufexec clc @@ -475,70 +469,7 @@ PrintPrompt >LDYA L.ENV.PS1 plp rts *-------------------------------------- -CmdLine.CLR ldy #0 - -.1 lda (ZPCMDBuf),y - beq .9 - -.2 lda #8 - - sta (ZPCMDBuf),y - iny - lda (ZPCMDBuf),y - bne .2 - - jsr CmdLine.PRINT - - jmp CmdLine.RESET - -.9 rts -*-------------------------------------- -CmdLine.BS >LDA.G CmdBufPtr - beq .9 - - dec - sta (pData),y - - lda #8 - >SYSCALL PutChar.A -.9 rts -*-------------------------------------- -CmdLine.NAK >LDA.G CmdBufPtr - >CMP.G CmdBuflen - beq .9 - - inc - >STA.G CmdBufPtr - - lda #21 - >SYSCALL PutChar.A -.9 rts -*-------------------------------------- -CmdLine.DEL >LDA.G CmdBuflen - beq .9 - dec - sta (pData),y - - tay - lda #0 - sta (ZPCMDBuf),y - - lda #8 - >SYSCALL PutChar.A -.9 rts -*-------------------------------------- -CmdLine.PRINT >LDYA ZPCMDBuf - >SYSCALL PrintF.YA - rts -*-------------------------------------- -CmdLine.RESET lda #0 - sta (ZPCMDBuf) - >STA.G bCmdBufexec - >STA.G CmdBufPtr - >STA.G CmdBuflen - >STA.G bSecureRead Clear password mode - rts -*-------------------------------------- + .INB /A2OSX.SRC/SBIN/SHELL.S.CL .INB /A2OSX.SRC/SBIN/SHELL.S.CMD .INB /A2OSX.SRC/SBIN/SHELL.S.CSH .INB /A2OSX.SRC/SBIN/SHELL.S.IO @@ -580,7 +511,6 @@ MSG.PRINTENV >CSTR "%s=%s\r\n" MSG.CSHERR >CSTR "Pos %D:" FMT.DATE >CSTR "%A, %B %d %Y" FMT.TIME >CSTR "%H:%M:%S (%I:%M:%S%p)" -MSG.HEXBYTE >CSTR "[%h]" *-------------------------------------- .INB /A2OSX.SRC/X.ERRORS.S *--------------------------------------