diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 6cef4eae..c8b38eec 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/BIN/SH.S.CORE.txt b/BIN/SH.S.CORE.txt index 7a87444d..7ef7117a 100644 --- a/BIN/SH.S.CORE.txt +++ b/BIN/SH.S.CORE.txt @@ -67,8 +67,6 @@ CORE.Run >LDYA ZPInputBufPtr Save Actual cmd for looping lda #$ff >STA.G CORE.IntCmd assume external - inc - >STA.G CORE.CmdFile no Cmd file mode jsr CORE.GetCharNB bcc .11 @@ -210,14 +208,7 @@ CORE.ExecCmd.1 lda #0 tax jmp (J.CMD,x) -CORE.ExecExtCmd >LDA.G CORE.CmdFile - bpl .1 - - >LDYA ZPArgVBufPtr - jsr CORE.FCALL - bra CORE.ExecExtCmd.Exit - -.1 >PUSHB.G CORE.PSFlags +CORE.ExecExtCmd >PUSHB.G CORE.PSFlags >LDYA ZPArgVBuf >SYSCALL execv @@ -506,19 +497,7 @@ CORE.ArgV.Dup >STYA ZPPtr1 lda (ZPPtr1),y bne .2 - tya - sec - adc ZPPtr1 - sta ZPPtr1 - bcc .3 - inc ZPPtr1+1 - -.3 tya - sec - adc ZPPtr2 - sta ZPPtr2 - bcc .1 - inc ZPPtr2+1 + jsr CORE.ArgV.DupNextY bra .1 .4 pla @@ -541,25 +520,29 @@ CORE.ArgV.Dup >STYA ZPPtr1 lda (ZPPtr1),y sta (ZPPtr2),y bne .6 - - tya - sec - adc ZPPtr1 - sta ZPPtr1 - bcc .7 - inc ZPPtr1+1 -.7 tya - sec - adc ZPPtr2 - sta ZPPtr2 - bcc .5 - inc ZPPtr2+1 + jsr CORE.ArgV.DupNextY bra .5 .8 clc .9 rts *-------------------------------------- +CORE.ArgV.DupNextY + tya + sec + adc ZPPtr1 + sta ZPPtr1 + bcc .1 + inc ZPPtr1+1 + +.1 tya + sec + adc ZPPtr2 + sta ZPPtr2 + bcc .8 + inc ZPPtr2+1 +.8 rts +*-------------------------------------- CORE.ArgV.Add >LDYA ZPArgVBufPtr >STYA ZPArgVBufPrev Save String start of Expand @@ -777,6 +760,12 @@ CORE.SkipCharsA clc *-------------------------------------- * Stack *-------------------------------------- +CORE.StkCheck sec + adc (pData) StackPtr + cmp #CORE.STACK.MAX + lda #E.STKOVERFLOW + rts +*-------------------------------------- CORE.StkPushPtr bcs .1 lda ZPInputCmdPtr ldx ZPInputCmdPtr+1 @@ -799,32 +788,6 @@ CORE.StkPullPtr jsr CORE.StkPull CORE.StkPullPtr.9 rts *-------------------------------------- -CORE.StkGetPtr lda (pData) StackPtr - beq CORE.StkErr - dec - beq CORE.StkErr - - tay - - lda (pData),y - sta ZPInputBufPtr - iny - lda (pData),y - sta ZPInputBufPtr+1 - - clc - rts - -CORE.StkErr lda #E.STACKERROR - sec - rts -*-------------------------------------- -CORE.StkCheck sec - adc (pData) StackPtr - cmp #CORE.STACK.MAX - lda #E.STKOVERFLOW - rts -*-------------------------------------- CORE.StkPushYA phy jsr CORE.StkPush pla @@ -846,6 +809,26 @@ CORE.StkPush pha * sec rts *-------------------------------------- +CORE.StkGetPtr lda (pData) StackPtr + beq CORE.StkErr + dec + beq CORE.StkErr + + tay + + lda (pData),y + sta ZPInputBufPtr + iny + lda (pData),y + sta ZPInputBufPtr+1 + + clc + rts + +CORE.StkErr lda #E.STACKERROR + sec + rts +*-------------------------------------- CORE.StkGetCtx jsr CORE.StkGet tax bcs .1 no context... diff --git a/BIN/SH.S.txt b/BIN/SH.S.txt index 5f13120a..58501e4f 100644 --- a/BIN/SH.S.txt +++ b/BIN/SH.S.txt @@ -248,6 +248,9 @@ CS.RUN.LOOP >SLEEP .1 jsr CheckSleep beq .3 + >LDA.G bSET.C + bne CS.RUN.LOOP + ldy #S.PS.hStdIn lda (pPS),y >SYSCALL feof @@ -386,7 +389,9 @@ CS.RUN.READ jsr CL.RESET .8 jmp CS.RUN.LOOP.END CS.RUN.READ.9 rts *-------------------------------------- -CS.RUN.BATCH +CS.RUN.BATCH >LDA.G bSET.C + bne .2 + ldy #S.PS.hStdIn lda (pPS),y >SYSCALL feof @@ -401,8 +406,7 @@ CS.RUN.BATCH cmp #3 test Ctrl-c bne .1 - sec - rts + bra CS.RUN.LOOP.END CS .1 cmp #19 test Ctrl-s bne .2 @@ -439,7 +443,7 @@ CS.RUN.BATCH pha jsr CORE.RETURN - + lda (pData) bne .6 >LDA.G bExitOnEOF @@ -725,7 +729,6 @@ CL.Len .BS 1 CL.bReady .BS 1 CORE.IntCmd .BS 1 -CORE.CmdFile .BS 1 CORE.hArgVBuf .BS 1 CORE.PSFlags .BS 1