diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 8f03682f..98a532b4 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/.Floppies/A2OSX.TEST.po b/.Floppies/A2OSX.TEST.po index 3c165459..430491fc 100644 Binary files a/.Floppies/A2OSX.TEST.po and b/.Floppies/A2OSX.TEST.po differ diff --git a/BIN/ACOS.S.KW.txt b/BIN/ACOS.S.KW.txt index 88f40d28..e7beb81e 100644 --- a/BIN/ACOS.S.KW.txt +++ b/BIN/ACOS.S.KW.txt @@ -194,7 +194,15 @@ KW.NIBBLE KW.NOT KW.ON KW.NOCAR + lda #E.CSYN + sec + rts +*-------------------------------------- KW.OPEN + lda #E.CSYN + sec + rts +*-------------------------------------- KW.POKE KW.POP KW.POSITION @@ -206,9 +214,9 @@ KW.PRINT stz hOut reset to hStdOut stz ZPPtr2 put ending CR -* ldy #S.PS.hStdOut -* lda (pPS),y -* sta hOut Default to screen + ldy #S.PS.hStdOut + lda (pPS),y + sta hOut Default to screen .10 jsr CORE.GetNextCharNB bcs .8 diff --git a/BIN/ACOS.S.RT.txt b/BIN/ACOS.S.RT.txt index a6dca663..5947393f 100644 --- a/BIN/ACOS.S.RT.txt +++ b/BIN/ACOS.S.RT.txt @@ -4,11 +4,20 @@ NEW *-------------------------------------- RT.StrSet *-------------------------------------- -RT.StrGet +RT.StrGet *-------------------------------------- clc rts *-------------------------------------- +RT.StrLeft + + + + clc + rts +*-------------------------------------- +RT.FileOpen +*-------------------------------------- MAN SAVE usr/src/bin/acos.s.rt LOAD usr/src/bin/acos.s diff --git a/BIN/ACOS.S.txt b/BIN/ACOS.S.txt index d41b7162..5ff19d93 100644 --- a/BIN/ACOS.S.txt +++ b/BIN/ACOS.S.txt @@ -444,14 +444,15 @@ CCODE.TESTTRUE lda (pStack) .1 bne .1+5 CCODE.TESTTRUE.LEN .EQ *-CCODE.TESTTRUE *-------------------------------------- -CCODE.FPRINTSTR >PUSHW L.MSG.STR - ldy #3 +CCODE.FPRINTSTR ldy #S.PS.hStdOut + lda (pPS),y + >PUSHA + ldy #2 lda (pStack),y >PUSHA lda (pStack),y >PUSHA - >PUSHBI 2 - >SYSCALL PrintF + >SYSCALL fputs inc pStack inc pStack CCODE.FPRINTSTR.LEN .EQ *-CCODE.FPRINTSTR diff --git a/BIN/CSH.S.txt b/BIN/CSH.S.txt index be7391f1..2c7e06d2 100644 --- a/BIN/CSH.S.txt +++ b/BIN/CSH.S.txt @@ -395,6 +395,7 @@ PrintDebugMsg >LDYA pStack >PUSHBI 2 >SYSCALL PrintF + >DEBUG rts *-------------------------------------- PrintTraceMsg >STYA ZPPtr3 diff --git a/BIN/NSCUTIL.S.txt b/BIN/NSCUTIL.S.txt index 0c72892f..e605084f 100644 --- a/BIN/NSCUTIL.S.txt +++ b/BIN/NSCUTIL.S.txt @@ -164,11 +164,10 @@ CS.QUIT clc NSC.Init php sei - lda RDC3ROM + lda RDCXROM php -* sta CLRC8ROM Make cards release $C8xx space - sta CLRC3ROM + sta SETCXROM ldx #8 @@ -184,9 +183,9 @@ NSC.Init php bne .1 plp - bpl .8 + bmi .8 - sta SETC3ROM + sta CLRCXROM .8 plp rts @@ -194,11 +193,10 @@ NSC.Init php NSC.Read php sei - lda RDC3ROM + lda RDCXROM php -* sta CLRC8ROM Make cards release $C8xx space - sta CLRC3ROM + sta SETCXROM jsr NSC.Select @@ -216,9 +214,9 @@ NSC.Read php bpl .1 plp - bpl .8 + bmi .8 - sta SETC3ROM + sta CLRCXROM .8 plp rts @@ -226,11 +224,10 @@ NSC.Read php NSC.Write php sei - lda RDC3ROM + lda RDCXROM php -* sta CLRC8ROM Make cards release $C8xx space - sta CLRC3ROM + sta SETCXROM jsr NSC.Select @@ -257,9 +254,9 @@ NSC.Write php bpl .3 plp - bpl .8 + bmi .8 - sta SETC3ROM + sta CLRCXROM .8 plp rts diff --git a/BIN/SH.S.CMD.txt b/BIN/SH.S.CMD.txt index 3f317c62..ff3056df 100644 --- a/BIN/SH.S.CMD.txt +++ b/BIN/SH.S.CMD.txt @@ -266,8 +266,6 @@ CMD.SET.EXEC jsr CORE.ArgV.NextChar skip "`" CMD.DATE >PUSHEA.G TimeBuf >SYSCALL Time - >PUSHEA.G TimeBuf - >PUSHW ZPCLBuf lda (ZPArgVBufPtr) diff --git a/INC/IO.D2.I.txt b/INC/IO.D2.I.txt index 5454e5be..7ca0a981 100644 --- a/INC/IO.D2.I.txt +++ b/INC/IO.D2.I.txt @@ -1,9 +1,9 @@ NEW AUTO 3,1 *-------------------------------------- -IO.D2.SeekTimeR .EQ 48 LIBBLKDEV Recalibration -IO.D2.SeekTimeF .EQ 48 LIBBLKDEV Track Formatter -IO.D2.SeekTimeB .EQ 48 LIBBLKDEV Boot Block +IO.D2.SeekTimeR .EQ 58 LIBBLKDEV Recalibration +IO.D2.SeekTimeF .EQ 58 LIBBLKDEV Track Formatter +IO.D2.SeekTimeB .EQ 58 LIBBLKDEV Boot Block IO.D2.SeekTimeP .EQ 38 ProDOS.FX initial IO.D2.SeekTimeI .EQ 10 ProDOS.FX increment -> until > 128 *-------------------------------------- diff --git a/LIB/LIBBLKDEV.S.BB.txt b/LIB/LIBBLKDEV.S.BB.txt index 9f61528d..6f1251b3 100644 --- a/LIB/LIBBLKDEV.S.BB.txt +++ b/LIB/LIBBLKDEV.S.BB.txt @@ -332,7 +332,7 @@ BB.Seek lda BB.HdrTrk get track we're on bit #1 bne .1 - jsr .10 we are on 0/4 or 2/4 track + jsr .20 we are on 0/4 or 2/4 track bra .9 no wait, next operation will be phy/plx/Ph0On,y .1 cmp BB.TargetQTrack we are on 1/4 or 3/4 @@ -349,7 +349,7 @@ BB.Seek lda BB.HdrTrk get track we're on bra .6 Ph ON to go to 0/4 or 2/4, then wait *-------------------------------------- -.10 and #6 +.20 and #6 ora BB.Slotn0 tay lda IO.D2.Ph0On,y @@ -378,7 +378,7 @@ BB.Seek lda BB.HdrTrk get track we're on inc CC: C < T, ON next PH -.6 jsr .10 now X and Y on +.6 jsr .20 now X and Y on .8 lda #IO.D2.SeekTimeB jsr BB.Wait100usecA ...wait... @@ -390,10 +390,14 @@ BB.Seek lda BB.HdrTrk get track we're on lda #0 jsr BB.Wait100usecA - lda IO.D2.Ph0Off,x - nop - nop lda IO.D2.Ph0Off,y + + ldy #0 + +.10 dey + bne .10 + + lda IO.D2.Ph0Off,x *-------------------------------------- BB.Read ldx BB.Slotn0 diff --git a/LIB/LIBBLKDEV.S.D2.txt b/LIB/LIBBLKDEV.S.D2.txt index 85fe773e..c55b85a9 100644 --- a/LIB/LIBBLKDEV.S.D2.txt +++ b/LIB/LIBBLKDEV.S.D2.txt @@ -135,10 +135,15 @@ D2.MoveHead.SEI lda D2.CurrentQTrack jsr D2.Wait25600usec - sta IO.D2.Ph0Off,x -* nop -* nop - sta IO.D2.Ph0Off,y + lda IO.D2.Ph0Off,y + + ldy #0 + +.10 dey + bne .10 + + lda IO.D2.Ph0Off,x + rts D2.SeekPhOnY and #6 diff --git a/LIB/LIBCIFS.S.IO.txt b/LIB/LIBCIFS.S.IO.txt index 0937cef6..d78219be 100644 --- a/LIB/LIBCIFS.S.IO.txt +++ b/LIB/LIBCIFS.S.IO.txt @@ -16,7 +16,7 @@ CIFS2.FStat lda #MLI.E.BADCALL CIFS.Stat >STYA pPath resolved path jsr ClearSocket - jsr MakeTrans2Reg + jsr MakeTrans2Req ldx #0 @@ -79,7 +79,7 @@ CIFS2.Stat jsr ReadSocket rts .9 cmp #E.NODATA - bne .9 + bne .99 dec CIFS.Retries beq .90 @@ -96,7 +96,7 @@ CIFS2.Stat jsr ReadSocket *-------------------------------------- CIFS.MKDir >STYA pPath resolved path - jsr MakeTrans2Reg + jsr MakeTrans2Req ldx #0 @@ -216,7 +216,7 @@ CIFS.ReadDir jsr GetPFD ora (pFD),y bne CIFS.ReadDir.Next - jsr MakeTrans2Reg + jsr MakeTrans2Req ldx #0 @@ -230,7 +230,7 @@ CIFS.ReadDir jsr GetPFD bra CIFS.ReadDir.Send CIFS.ReadDir.Next - jsr MakeTrans2Reg + jsr MakeTrans2Req ldx #0 @@ -534,7 +534,7 @@ CIFS2.ChOwn sec rts *-------------------------------------- -CIFS.FOpen jsr MakeTrans2Reg +CIFS.FOpen jsr MakeTrans2Req ldx #0 @@ -561,6 +561,7 @@ CIFS.FOpen jsr MakeTrans2Reg and #O.RDWR dec + lda #2 ldy #S.NETBIOS+S.SMB.H+SMB.Trans2.H.Len+9 AccessMode sta (ZPReqPtr),y @@ -571,7 +572,7 @@ CIFS.FOpen jsr MakeTrans2Reg and #O.CREATE beq .2 - lda #$10 + lda #$12 sta (ZPReqPtr),y .2 pla @@ -580,7 +581,7 @@ CIFS.FOpen jsr MakeTrans2Reg lda (ZPReqPtr),y ora #1 - sta (ZPReqPtr),y + * sta (ZPReqPtr),y .3 ply diff --git a/LIB/LIBCIFS.S.txt b/LIB/LIBCIFS.S.txt index d8117134..092dccdd 100644 --- a/LIB/LIBCIFS.S.txt +++ b/LIB/LIBCIFS.S.txt @@ -585,7 +585,7 @@ GetPFD tax >STYA pFD rts *-------------------------------------- -MakeTrans2Reg lda MountTable+2 +MakeTrans2Req lda MountTable+2 >SYSCALL2 GetMemPtr >STYA ZPCtxPtr @@ -1042,7 +1042,7 @@ SMB.Open2 .DA 0 TRANS2_OPEN2 .BS 2 FileAttributes .HS 00000000 CreationTime .BS 2 OpenMode - .HS 00000000 AllocationSize + .HS 00020000 AllocationSize .HS 00000000000000000000 Reserved * .AZ "filename" SMB.Open2.Len .EQ *-SMB.Open2 diff --git a/LIB/LIBGUI.S.CLIP.txt b/LIB/LIBGUI.S.CLIP.txt index 9c0814b4..76980b76 100644 --- a/LIB/LIBGUI.S.CLIP.txt +++ b/LIB/LIBGUI.S.CLIP.txt @@ -351,6 +351,7 @@ CLIP.Line.EncodeX.AX tya ora #CLIP.Line.RIGHT + rts .8 tya rts @@ -371,6 +372,7 @@ CLIP.Line.EncodeY.AX tya ora #CLIP.Line.BOTTOM + rts .8 tya rts diff --git a/LIB/LIBGUI.S.MOU.txt b/LIB/LIBGUI.S.MOU.txt index b6c64ed8..5f503299 100644 --- a/LIB/LIBGUI.S.MOU.txt +++ b/LIB/LIBGUI.S.MOU.txt @@ -1,8 +1,8 @@ NEW AUTO 3,1 *-------------------------------------- -MOU.Init >PUSHBI 0 - >LDYA L.DEVNAME.MOUSE +MOU.Init >PUSHW L.DEVNAME.MOUSE + >PUSHBI 0 >SYSCALL2 open bcc .2 diff --git a/LIB/LIBGUI.S.WND.txt b/LIB/LIBGUI.S.WND.txt index 297b4e8e..29e03f9b 100644 --- a/LIB/LIBGUI.S.WND.txt +++ b/LIB/LIBGUI.S.WND.txt @@ -1,8 +1,8 @@ NEW AUTO 3,1 *-------------------------------------- -WND.Init >PUSHBI 0 - >LDYA L.DEVNAME.GFX +WND.Init >PUSHW L.DEVNAME.GFX + >PUSHBI 0 >SYSCALL2 open bcs .9 diff --git a/LIB/LIBTCPIP.S.SKT.txt b/LIB/LIBTCPIP.S.SKT.txt index 320572d0..fed857c7 100644 --- a/LIB/LIBTCPIP.S.SKT.txt +++ b/LIB/LIBTCPIP.S.SKT.txt @@ -894,7 +894,7 @@ SKT.Recv clc lda (ZPFrameInPtr),y sta SA.REMOTE+S.SOCKADDR -.8 lda #S.SOCKADDR-1 +.8 ldy #S.SOCKADDR-1 .80 lda SA.REMOTE,y sta (ZPTmpPtr1),y diff --git a/ProDOS.FX/ProDOS.S.LDR.txt b/ProDOS.FX/ProDOS.S.LDR.txt index b78947a8..7466aa16 100644 --- a/ProDOS.FX/ProDOS.S.LDR.txt +++ b/ProDOS.FX/ProDOS.S.LDR.txt @@ -354,11 +354,10 @@ DS1216E.DATA2 .EQ A1L LDR.ClkDevScan php sei - lda RDC3ROM + lda RDCXROM php -* sta CLRC8ROM Make cards release $C8xx space - sta CLRC3ROM + sta SETCXROM sta $C300 @@ -413,9 +412,9 @@ LDR.ClkDevScan php bne .6 plp - bpl .8 + bmi .8 - sta SETC3ROM + sta CLRCXROM .8 plp @@ -901,7 +900,7 @@ LDR.SetDevID ldy #$FE check attributes byte. sta devid rts *-------------------------------------- -LDR.ScrInit80 sta CLRC3ROM +LDR.ScrInit80 sta CLRC3ROM TODO: support 80COL cards with ROM ??? lda #$8C Reset 80 col screen ($0C:HOME) jsr $C300 diff --git a/ProDOS.FX/ProDOS.S.NCLK.txt b/ProDOS.FX/ProDOS.S.NCLK.txt index 4bda05af..d8cb2405 100644 --- a/ProDOS.FX/ProDOS.S.NCLK.txt +++ b/ProDOS.FX/ProDOS.S.NCLK.txt @@ -10,11 +10,10 @@ DS1216E.DATA .EQ $200 Reverted YY MM DD Day HH mm SS CS NCLK.START php sei NO IRQ !!! - lda RDC3ROM because no IRQ handler at $C3FA... + lda RDCXROM because no IRQ handler at $C3FA... php -* sta CLRC8ROM Make cards release $C8xx space - sta CLRC3ROM ... after this + sta SETCXROM ... after this sta $C300 lda $C304 Reset DS1216E comparison register with READ A2=1 @@ -98,9 +97,9 @@ NCLK.START php sta TIMELO+1 plp - bpl .8 + bmi .8 - sta SETC3ROM + sta CLRCXROM .8 plp rts diff --git a/ProDOS.FX/ProDOS.S.XRW.txt b/ProDOS.FX/ProDOS.S.XRW.txt index 6478de25..f69c0771 100644 --- a/ProDOS.FX/ProDOS.S.XRW.txt +++ b/ProDOS.FX/ProDOS.S.XRW.txt @@ -203,13 +203,7 @@ XRW.E.EXIT ldx A2L XRW.SectorIO bit XRW.bWrite bpl .1 -* jsr XRW.SeekPhOnXY -* phx -* phy jsr XRW.PreNibble -* ply -* plx -* jsr XRW.SeekPhOff .1 stz XRW.RetryCnt @@ -401,7 +395,7 @@ XRW.TestWP ldx A2L .LIST ON XRW.Write bit IO.D2.ReadProt,x (4) PREWRITE MODE .LIST OFF -* bit IO.D2.ReadMode,x (4) + bit IO.D2.ReadMode,x (4) lda #$FF (2) @@ -413,7 +407,7 @@ XRW.Write bit IO.D2.ReadProt,x (4) PREWRITE MODE ldy nbuf2 (4) sty pcl (3) - ldy #6 (2) + ldy #5 (2) .1 pha (3) exact timing. pla (4) exact timing. @@ -839,26 +833,17 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end jsr XRW.Wait25600usec -XRW.SeekPhOff sta IO.D2.Ph0Off,x -* nop -* nop - sta IO.D2.Ph0Off,y + lda IO.D2.Ph0Off,y + + ldy #0 + +.10 dey + bne .10 + + lda IO.D2.Ph0Off,x clc Exit wit CC (recalibrate) rts *-------------------------------------- -*XRW.SeekPhOnXY lda XRW.ReqTrack2 - -* jsr XRW.Trk2Qtrk -* pha -* and #6 -* ora A2L -* tax - -* lda IO.D2.Ph0On,x - -* pla -* inc - XRW.SeekPhOnY and #6 ora A2L tay diff --git a/SYS/KERNEL.S.txt b/SYS/KERNEL.S.txt index 5d31ee32..7a1c364c 100644 --- a/SYS/KERNEL.S.txt +++ b/SYS/KERNEL.S.txt @@ -38,6 +38,7 @@ MAIN.B .PH A2osX.EndTables .INB usr/src/sys/kernel.s.drv .INB usr/src/sys/kernel.s.pft .INB usr/src/sys/kernel.s.fs + .INB usr/src/sys/kernel.s.math16 .INB usr/src/sys/kernel.s.mathf Mem.MLoMem .EQ * .EP @@ -109,7 +110,6 @@ E0.B .PH $E000 .INB usr/src/sys/kernel.s.irq .INB usr/src/sys/kernel.s.shared .INB usr/src/sys/kernel.s.math - .INB usr/src/sys/kernel.s.math16 .INB usr/src/sys/kernel.s.math32 .INB usr/src/sys/kernel.s.term diff --git a/SYS/KM.NSC.S.txt b/SYS/KM.NSC.S.txt index 981cf91c..1b6382f9 100644 --- a/SYS/KM.NSC.S.txt +++ b/SYS/KM.NSC.S.txt @@ -55,11 +55,10 @@ DS1216E.DATA2 .EQ $18 NSC.Detect php sei - lda RDC3ROM + lda RDCXROM php -* sta CLRC8ROM Make cards release $C8xx space - sta CLRC3ROM + sta SETCXROM sta $C300 @@ -115,9 +114,9 @@ NSC.Detect php bne .6 plp - bpl .8 + bmi .8 - sta SETC3ROM + sta CLRCXROM .8 plp @@ -203,11 +202,10 @@ NSCDRV.B.START .EQ * NSCDRV php sei - lda RDC3ROM + lda RDCXROM php -* sta CLRC8ROM Make cards release $C8xx space - sta CLRC3ROM + sta SETCXROM sta $C300 lda $C304 Reset DS1216E comparison register with READ A2=1 @@ -291,9 +289,9 @@ NSCDRV.R5 lda DS1216E.DATA+4 Get HH sta TIMELO+1 plp - bpl .8 + bmi .8 - sta SETC3ROM + sta CLRCXROM .8 plp rts