diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index bd81136a..1dfc53fa 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/LIB/LIBTCPIP.S.txt b/LIB/LIBTCPIP.S.txt index bc9d3bec..b507f469 100644 --- a/LIB/LIBTCPIP.S.txt +++ b/LIB/LIBTCPIP.S.txt @@ -5,6 +5,7 @@ NEW .OR $2000 .TF LIB/LIBTCPIP *-------------------------------------- +AUXPIPE .EQ 1 IPDEBUG .EQ 0 *-------------------------------------- .MA ADC16 diff --git a/SYS/KERNEL.S.INIT.txt b/SYS/KERNEL.S.INIT.txt index 8cc5aeca..66244ac2 100644 --- a/SYS/KERNEL.S.INIT.txt +++ b/SYS/KERNEL.S.INIT.txt @@ -124,7 +124,7 @@ Kernel.Init3 sta SETALTZP >PUSHWI FD.NULL.NAME >LDYAI FD.NULL - >SYSCALL MKDev + >SYSCALL2 MKDev jsr SysScrInit bcs * @@ -133,7 +133,7 @@ Kernel.Init3 sta SETALTZP >PUSHBI S.FI.T.TXT >PUSHBI O.RDWR >LDYAI DEV.CONSOLE - >SYSCALL fopen + >SYSCALL2 fopen bcs * ldy #S.PS.hStdIn @@ -144,7 +144,7 @@ Kernel.Init3 sta SETALTZP sta (pPs),y *-------------------------------------- Kernel.Init3C >LDYAI MSG.Init3 - >SYSCALL puts + >SYSCALL2 puts jsr CPU.Init.6502 @@ -170,7 +170,7 @@ Kernel.Init3C >LDYAI MSG.Init3 >PUSHBI 0 >LDYAI MSG.CTRLR - >SYSCALL printf + >SYSCALL2 printf >PUSHBI 0 PS Flags >LDYAI CTRLR.SHELL @@ -179,18 +179,18 @@ Kernel.Init3C >LDYAI MSG.Init3 .7 >PUSHWI ETCINIT.CMDLINE >PUSHBI 2 >LDYAI MSG.EtcInit - >SYSCALL printf + >SYSCALL2 printf >PUSHBI 0 PS Flags >LDYAI ETCINIT.CMDLINE -.8 >SYSCALL ExecL +.8 >SYSCALL2 ExecL bcs Kernel.Init3.Err >PUSHBI 0 >LDYAI MSG.Init3.OK - >SYSCALL printf + >SYSCALL2 printf >DEBUGOA @@ -200,7 +200,7 @@ Kernel.Init3.Err >PUSHA >PUSHBI 1 >LDYAI MSG.StartupErr - >SYSCALL printf + >SYSCALL2 printf bra * No need to discard Expanded CMDLINE *-------------------------------------- * INIT2 Subs @@ -326,7 +326,7 @@ SysScrInit >LDYAI Mem.XHiMem >PUSHWI FD.CONSOLE.NAME >LDYAI FD.TTY - >SYSCALL MKDev + >SYSCALL2 MKDev bcs .9 ldx A2osX.TTYDEVS @@ -339,7 +339,7 @@ SysScrInit >LDYAI Mem.XHiMem >PUSHWI FD.TTY.NAME >LDYAI FD.TTY - >SYSCALL MKDev + >SYSCALL2 MKDev plx bcs .9 @@ -391,7 +391,7 @@ SysScrInit.TTYPtrs *-------------------------------------- CPU.Init.6502 >PUSHBI 0 >LDYAI MSG.CPU - >SYSCALL printf + >SYSCALL2 printf jsr Detect6502 A = CPU type sta A2osX.CPUTYPE @@ -402,7 +402,7 @@ CPU.Init.6502 >PUSHBI 0 ldy MSG.CPUTYPE,x lda MSG.CPUTYPE+1,x - >SYSCALL puts + >SYSCALL2 puts lda MACHID and #MACHID.T @@ -413,7 +413,7 @@ CPU.Init.6502 >PUSHBI 0 .10 >PUSHBI 0 >LDYAI MSG.CPU.SPEED - >SYSCALL printf + >SYSCALL2 printf stz A2osX.RANDOM16 stz A2osX.RANDOM16+1 @@ -474,12 +474,12 @@ CPU.Init.6502 >PUSHBI 0 >PUSHA push CPU speed HI >PUSHBI 2 >LDYAI MSG.CPU.SPEEDOK - >SYSCALL printf + >SYSCALL2 printf rts *-------------------------------------- CPU.Init.Z80 >PUSHBI 0 >LDYAI MSG.Z80 - >SYSCALL printf + >SYSCALL2 printf jsr DetectZ80 bcs .9 @@ -492,11 +492,11 @@ CPU.Init.Z80 >PUSHBI 0 >PUSHBI 1 >LDYAI MSG.Z80.OK - >SYSCALL printf + >SYSCALL2 printf rts .9 >LDYAI MSG.Z80.KO - >SYSCALL puts + >SYSCALL2 puts rts *-------------------------------------- * Out: @@ -571,7 +571,7 @@ DetectZ80 ldx #Z80Code.Size * if irq not handled, jmp (S.IrqMgrOldFFFE) *-------------------------------------- IrqMgrInit >LDYAI MSG.IRQ - >SYSCALL puts + >SYSCALL2 puts php sei @@ -602,7 +602,7 @@ IrqMgrInit >LDYAI MSG.IRQ >STYA GP.IrqH.JSR+1 >LDYAI MSG.IRQ.CLOCK - >SYSCALL puts + >SYSCALL2 puts clc rts @@ -618,7 +618,7 @@ IrqMgrInit >LDYAI MSG.IRQ >STYA GP.IrqH.JSR+1 >LDYAI MSG.IRQ.VBL - >SYSCALL puts + >SYSCALL2 puts clc rts @@ -629,7 +629,7 @@ IrqMgrInit >LDYAI MSG.IRQ sta IRQ.Mode >LDYAI MSG.IRQ.POLL - >SYSCALL puts + >SYSCALL2 puts clc rts @@ -797,7 +797,7 @@ IrqMgrInit.HZ2Tick rts *-------------------------------------- DevMgrInit >LDYAI MSG.DEV - >SYSCALL puts + >SYSCALL2 puts lda DEVCNT sta .1+1 @@ -950,17 +950,17 @@ DevMgrInit.AddBDev >PUSHWI FD.BDEV.NAME >PUSHBI 4 >LDYAI MSG.BLKDEV - >SYSCALL printf + >SYSCALL2 printf >PUSHWI FD.BDEV.NAME >LDYAI FD.BDEV - >SYSCALL MKDev + >SYSCALL2 MKDev DevMgrInit.AddBDev.RTS rts *-------------------------------------- EvtMgrInit >LDYAI MSG.EVT - >SYSCALL puts + >SYSCALL2 puts stz CORE.EvtCount @@ -975,7 +975,7 @@ EvtMgrInit >LDYAI MSG.EVT EvtMgrInit.RTS rts *-------------------------------------- TskMgrInit >LDYAI MSG.TSK - >SYSCALL puts + >SYSCALL2 puts >LDYAI K.ENV.SIZE get a buffer for ENV jsr K.GetMem @@ -996,7 +996,7 @@ TskMgrInit >LDYAI MSG.TSK sta (ZPPtr1) make sure blank!! >LDYAI $2E0 Get ROOT from QC - >SYSCALL strdup + >SYSCALL2 strdup bcs .9 txa @@ -1004,34 +1004,33 @@ TskMgrInit >LDYAI MSG.TSK >PUSHWI $2C0 Get BOOT from QC >LDYAI I.ENV.BOOT - >SYSCALL SetEnv + >SYSCALL2 SetEnv bcs .9 >PUSHWI $2E0 Get ROOT from QC >LDYAI I.ENV.ROOT - >SYSCALL SetEnv + >SYSCALL2 SetEnv bcs .9 >LDYAI I.ENV.PATH - >SYSCALL PutEnv + >SYSCALL2 PutEnv bcs .9 >LDYAI I.ENV.LIB - >SYSCALL PutEnv + >SYSCALL2 PutEnv bcs .9 >LDYAI I.ENV.DRV - >SYSCALL PutEnv + >SYSCALL2 PutEnv .9 rts *-------------------------------------- PwdMgrInit >LDYAI MSG.PWD - >SYSCALL puts - + >SYSCALL2 puts >PUSHWZ Aux type >PUSHBI S.FI.T.TXT >PUSHBI O.RDONLY >LDYAI ETCPASSWD - >SYSCALL LoadStkObj + >SYSCALL2 LoadStkObj bcs .1 stx PWD.hDB >STYA PWD.DBSize diff --git a/SYS/KERNEL.S.IO.txt b/SYS/KERNEL.S.IO.txt index 40d765db..6ff9c7cf 100644 --- a/SYS/KERNEL.S.IO.txt +++ b/SYS/KERNEL.S.IO.txt @@ -242,7 +242,13 @@ IO.CLOSE.DIR ldy #S.FD.REG.REF >MLICALL MLICLOSE .1 ldy #S.FD.REG.IOBUF - bra IO.CLOSE.FD + lda (pFD),y + beq .2 + + jsr K.FreeMem + +.2 lda IO.hFD + jmp K.FreeMem *-------------------------------------- IO.CLOSE.CDEV IO.CLOSE.BDEV @@ -281,12 +287,16 @@ IO.CLOSE.PIPE ldy #S.FD.PIPE.S ldy #S.FD.PIPE.hMem -IO.CLOSE.FD lda (pFD),y - beq .1 + lda (pFD),y + beq .2 - jsr K.Freemem + .DO AUXPIPE=1 + jsr K.FreeStkObj + .ELSE + jsr K.FreeMem + .FIN -.1 lda IO.hFD +.2 lda IO.hFD jmp K.FreeMem *-------------------------------------- IO.CLOSE.NOD ldx #2