diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 1deeddfd..25403fda 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/BIN/EDIT.S.FILE.txt b/BIN/EDIT.S.FILE.txt index 06bb7212..264f91bf 100644 --- a/BIN/EDIT.S.FILE.txt +++ b/BIN/EDIT.S.FILE.txt @@ -53,7 +53,7 @@ FILE.Load jsr BUF.ResetSel .1 >LDYAI 256 >SYSCALL GetMem - bcs .9 + bcs .99 >STYA ZPPTR1 stx TmpByte @@ -61,26 +61,22 @@ FILE.Load jsr BUF.ResetSel >LDA.G STATBUF+S.STAT.P.TYPE cmp #S.FI.T.TXT bne .2 + jsr FILE.Load.TXT - bra .8 + jmp FILE.Close .2 cmp #$FA S-C/ASM? - beq .3 + bne .9 + jsr FILE.Load.ASM + jmp FILE.Close + +.9 lda TmpByte + >SYSCALL FreeMem + lda #MLI.E.INCFF sec - rts - -.3 jsr FILE.Load.ASM - -.8 php - pha - lda TmpByte - >SYSCALL FreeMem - pla - plp - -.9 rts +.99 rts *-------------------------------------- FILE.Load.TXT stz FileLen stz FileLen+1 @@ -162,7 +158,7 @@ FILE.Load.TXT stz FileLen clc .HS B0 BCS .9 sec - jmp FILE.Close + rts *-------------------------------------- FILE.Load.ASM stz FileLen stz FileLen+1 @@ -211,7 +207,6 @@ FILE.Load.ASM stz FileLen clc .HS B0 BCS .9 sec - jmp FILE.Close .99 rts *-------------------------------------- FILE.Load.ASM.Decode diff --git a/BIN/ETCONFIG.S.txt b/BIN/ETCONFIG.S.txt index 63e6c68b..178596bf 100644 --- a/BIN/ETCONFIG.S.txt +++ b/BIN/ETCONFIG.S.txt @@ -113,9 +113,10 @@ CS.RUN.SETUP jsr CS.RUN.PROBE sec rts *-------------------------------------- -CS.RUN.DUMP >PUSHEA.G DIB - lda ETKCFG+S.NETCFG.DevID +CS.RUN.DUMP >PUSHB ETKCFG+S.NETCFG.DevID + >PUSHEA.G DIB >SYSCALL GetDevStatus + >LEA.G DCB.NIC >STYA IOCTL+S.IOCTL.BUFPTR lda #S.IOCTL.STATCODE.GETDCB diff --git a/BIN/IPCONFIG.S.txt b/BIN/IPCONFIG.S.txt index 5d321e29..6b0dbb7a 100644 --- a/BIN/IPCONFIG.S.txt +++ b/BIN/IPCONFIG.S.txt @@ -192,17 +192,18 @@ CS.RUN.SETUP sec rts *-------------------------------------- -CS.RUN.DUMP >PUSHEA.G DIB - lda IPCFG+S.NETCFG.DevID +CS.RUN.DUMP >PUSHB IPCFG+S.NETCFG.DevID + >PUSHEA.G DIB >SYSCALL GetDevStatus + >LEA.G DCB.NIC >STYA.G IOCTL+S.IOCTL.BUFPTR lda #S.IOCTL.STATCODE.GETDCB >STA.G IOCTL+S.IOCTL.STATCODE - >PUSHEA.G IOCTL + >PUSHB IPCFG+S.NETCFG.DevID >PUSHBI IOCTL.STATUS - lda IPCFG+S.NETCFG.DevID + >PUSHEA.G IOCTL >SYSCALL IOCTL CS.RUN.DUMPNIC >PUSHW L.MSG1.DEV diff --git a/BIN/LS.S.txt b/BIN/LS.S.txt index a5f24df7..4e708d5e 100644 --- a/BIN/LS.S.txt +++ b/BIN/LS.S.txt @@ -223,11 +223,9 @@ CS.RUN.PRINT.REG jmp CS.RUN.UpdateColCnt *-------------------------------------- .1 >PUSHW L.MSG.REGEXT - - jsr Mod2CSTR - >PUSHEA.G MOD File Mod - - jsr CS.RUN.PushGidUid + + jsr Mod2CSTR (2) + jsr CS.RUN.PushGidUid (4) ldy #S.STAT.SIZE+3 ldx #4 @@ -236,23 +234,23 @@ CS.RUN.PRINT.REG >PUSHA dey dex - bne .2 + bne .2 (4) - jsr CS.RUN.PUSHDATES + jsr CS.RUN.PUSHDATES (4) ldy #S.STAT.P.TYPE lda (ZPFileStat),y jsr FileType2PSTR - >PUSHYA + >PUSHYA (2) ldy #S.STAT.P.AUXTYPE+1 lda (ZPFileStat),y >PUSHA dey lda (ZPFileStat),y - >PUSHA + >PUSHA (2) - >PUSHW ZPFileName + >PUSHW ZPFileName (2) >PUSHBI 20 >SYSCALL PrintF @@ -311,9 +309,9 @@ CS.RUN.PRINT.DIR rts *-------------------------------------- .4 >PUSHW L.MSG.DIREXT - + jsr Mod2CSTR - >PUSHEA.G MOD File Mod + jsr CS.RUN.PushGidUid jsr CS.RUN.PUSHDATES >PUSHW ZPFileName @@ -435,6 +433,11 @@ CS.RUN.PRINT.SRCPATH rts *-------------------------------------- CS.RUN.PushGidUid + >PUSHW L.MSG.Root + >PUSHW L.MSG.Root + clc + rts + ldy #S.STAT.GID lda (ZPFileStat),y beq .1 @@ -674,6 +677,7 @@ Mod2CSTR ldy #S.STAT.MODE+1 lda ACCESS,x .4 >STA.G MOD+9 + >PUSHEA.G MOD rts *-------------------------------------- .INB USR/SRC/BIN/X.FILEENUM.S diff --git a/DRV/UTHERNET.DRV.S.txt b/DRV/UTHERNET.DRV.S.txt index eff52b93..1811bdaf 100644 --- a/DRV/UTHERNET.DRV.S.txt +++ b/DRV/UTHERNET.DRV.S.txt @@ -134,10 +134,7 @@ Dev.ParseArgs lda (ZPArgPTR) clc rts -.1 >LDYA ZPArgPtr - >SYSCALL puts - - >PUSHW ZPArgPtr +.1 >PUSHW ZPArgPtr >PUSHW L.SSCANF.MAC ldx #0 diff --git a/SBIN/NETWORKD.S.txt b/SBIN/NETWORKD.S.txt index 3decdca2..2f878e4d 100644 --- a/SBIN/NETWORKD.S.txt +++ b/SBIN/NETWORKD.S.txt @@ -104,8 +104,8 @@ CS.INIT.DEV >PUSHBI 0 sta IOCTL+S.IOCTL.STATCODE >PUSHB DevID - >PUSHW L.IOCTL >PUSHBI IOCTL.STATUS + >PUSHW L.IOCTL >SYSCALL IOCTL rts *-------------------------------------- @@ -226,8 +226,8 @@ CS.INIT.CONF >LDYAI 64 rts *-------------------------------------- CS.RUN >PUSHB DevID - >PUSHW L.IOCTL >PUSHBI IOCTL.READ + >PUSHW L.IOCTL >SYSCALL IOCTL bcs .8 No Frame @@ -292,8 +292,8 @@ CS.QUIT ldx #0 beq .8 >PUSHA - >PUSHWZ >PUSHBI IOCTL.CLOSE + >PUSHWZ >SYSCALL IOCTL .8 clc diff --git a/SYS/KERNEL.S.STDIO2.S.txt b/SYS/KERNEL.S.STDIO2.S.txt index 5ecb3d4e..15cc6025 100644 --- a/SYS/KERNEL.S.STDIO2.S.txt +++ b/SYS/KERNEL.S.STDIO2.S.txt @@ -87,7 +87,7 @@ K.FPrintf ldx #2 *-------------------------------------- K.SPrintf ldx #3 *-------------------------------------- -K.PrintF.1 jsr STDIO.GetParams +K.PrintF.1 jsr PrintF.GetParams sty STDIO.Exit.Cnt+1 Total bytes to POP .1 jsr SHARED.GetCharPtr2 @@ -392,6 +392,57 @@ PrintF.PutC phy .9 lda #E.BUF sec PrintF.PutC.RTS rts +*-------------------------------------- +* Y = Bytecount +* X = 3 : get format & buffer +* X = 2 : get format & hFile +* X = 1 : get format only +*-------------------------------------- +PrintF.GetParams + stz PrintF.Cnt + stz PrintF.Cnt+1 + + lda (pStack) Bytecount + + tay + sty STDIO.GetStackByte.ptr+1 + + iny + lda (pStack),y format LO + sta ZPPtr2 + + iny + lda (pStack),y format HI + sta ZPPtr2+1 + + dex + beq .1 + + dex + beq .2 + +.3 stz PrintF.hFILE + + iny + lda (pStack),y str LO + sta pIOBuf + + iny + lda (pStack),y str HI + sta pIOBuf+1 + + rts + +.2 iny + lda (pStack),y hFILE + sta PrintF.hFILE + +.1 lda #K.IOBuf + sta pIOBuf + lda /K.IOBuf + sta pIOBuf+1 + + rts */-------------------------------------- * # ScanF (BLOCKING) * # FScanF (BLOCKING) @@ -449,9 +500,9 @@ K.FScanF ldx #2 *-------------------------------------- K.SScanF ldx #3 *-------------------------------------- -K.SScanF.1 jsr STDIO.GetParams +K.SScanF.1 jsr ScanF.GetParams Ptr1=format, ptr2=buffer sty STDIO.Exit.Cnt+1 Total bytes to POP - + ldx PrintF.hFILE beq .1 @@ -465,7 +516,7 @@ K.SScanF.1 jsr STDIO.GetParams bne PrintF.PutC.RTS >RET 4 -.1 jsr SHARED.GetCharPtr2 End Of format? +.1 jsr SHARED.GetCharPtr1 End Of format? beq .8 cmp #'%' Escape ? @@ -476,23 +527,26 @@ K.SScanF.1 jsr STDIO.GetParams sta .11+1 - jsr Scanf.GetC - bcs .9 + jsr SHARED.GetCharPtr2 + beq .9 .11 cmp #$ff Same char in string? beq .1 bra .9 -.12 jsr Scanf.GetC - bcs .9 +.12 jsr SHARED.GetCharPtr2 + beq .9 + cmp #C.SPACE + bne .9 +.13 jsr SHARED.GetCharPtr2 cmp #C.SPACE another space ? - beq .12 + beq .13 - bne .1 + bra .1 -.2 jsr SHARED.GetCharPtr2 Get specifier after % +.2 jsr SHARED.GetCharPtr1 Get specifier after % beq .9 unexpected End of format after "%" ? ldx #K.SScanFJMP-K.SScanFTBL-2 @@ -554,7 +608,7 @@ K.SScanF.H lda K.SScanFTBL+1,x Get VAR size jsr MATH32.Hex2ACC32 -K.SScanF.GetVAL jsr SHARED.AddYToPtr1 Y=char count parsed +K.SScanF.GetVAL jsr SHARED.AddYToPtr2 Y=char count parsed .1 ply get back VAL size @@ -568,11 +622,11 @@ K.SScanF.GetVAL jsr SHARED.AddYToPtr1 Y=char count parsed K.SScanF.S ldy #$ff .1 iny - lda (ZPPtr1),y Get char in string to scan + lda (ZPPtr2),y Get char in string to scan sta (ZPPtr3),y store in param ptr beq K.SScanF.Fwd end of string to scan ? - cmp (ZPPtr2) match format next char ? + cmp (ZPPtr1) match format next char ? beq .2 cmp #C.SPACE is it a space ? @@ -581,28 +635,14 @@ K.SScanF.S ldy #$ff .2 lda #0 add \0 to param ptr sta (ZPPtr3),y -K.SScanF.Fwd jmp SHARED.AddYToPtr1 Y=char count parsed -*-------------------------------------- -Scanf.GetC phy - ldy PrintF.Cnt - lda (pIOBuf),y - ply - inc PrintF.Cnt - beq .9 - - clc - rts - -.9 lda #E.BUF - sec - rts +K.SScanF.Fwd jmp SHARED.AddYToPtr2 Y=char count parsed *-------------------------------------- * Y = Bytecount * X = 3 : get format & buffer * X = 2 : get format & hFile * X = 1 : get format only *-------------------------------------- -STDIO.GetParams stz PrintF.Cnt +ScanF.GetParams stz PrintF.Cnt stz PrintF.Cnt+1 lda (pStack) Bytecount @@ -612,11 +652,11 @@ STDIO.GetParams stz PrintF.Cnt iny lda (pStack),y format LO - sta ZPPtr2 + sta ZPPtr1 iny lda (pStack),y format HI - sta ZPPtr2+1 + sta ZPPtr1+1 dex beq .1 @@ -628,11 +668,11 @@ STDIO.GetParams stz PrintF.Cnt iny lda (pStack),y str LO - sta pIOBuf + sta ZPPtr2 iny lda (pStack),y str HI - sta pIOBuf+1 + sta ZPPtr2+1 rts @@ -641,9 +681,9 @@ STDIO.GetParams stz PrintF.Cnt sta PrintF.hFILE .1 lda #K.IOBuf - sta pIOBuf + sta ZPPtr2 lda /K.IOBuf - sta pIOBuf+1 + sta ZPPtr2+1 rts *--------------------------------------