diff --git a/.Floppies/A2OSX.BOOTHD.woz b/.Floppies/A2OSX.BOOTHD.woz index 618666af..91a7d42a 100644 Binary files a/.Floppies/A2OSX.BOOTHD.woz and b/.Floppies/A2OSX.BOOTHD.woz differ diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 7c59ead7..c3e54d6d 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 1b8c31e0..a17f5f20 100644 Binary files a/.Floppies/A2OSX.TEST.po and b/.Floppies/A2OSX.TEST.po differ diff --git a/INC/IO.D2.I.txt b/INC/IO.D2.I.txt index d67d3e53..aa78a107 100644 --- a/INC/IO.D2.I.txt +++ b/INC/IO.D2.I.txt @@ -2,8 +2,8 @@ NEW AUTO 3,1 *-------------------------------------- IO.D2.SeekTimeR .EQ 45 LIBBLKDEV Recalibration -IO.D2.SeekTimeF .EQ 65 LIBBLKDEV Track Formatter -IO.D2.SeekTimeB .EQ 65 LIBBLKDEV Boot Block +IO.D2.SeekTimeF .EQ 45 LIBBLKDEV Track Formatter +IO.D2.SeekTimeB .EQ 45 LIBBLKDEV Boot Block IO.D2.SeekTimeP .EQ 15 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 3c55bf2f..9a72da54 100644 --- a/LIB/LIBBLKDEV.S.BB.txt +++ b/LIB/LIBBLKDEV.S.BB.txt @@ -340,8 +340,9 @@ BB.Seek lda BB.HdrTrk get track we're on .1 pha - sta IO.D2.Ph0Off,x - sta IO.D2.Ph0Off,y + bit IO.D2.Ph0Off,x + ldx IO.D2.Ph0Off,y + bcs .2 * Current < Target, must move in @@ -373,8 +374,8 @@ BB.Seek lda BB.HdrTrk get track we're on ora BB.Slotn0 tay - sta IO.D2.Ph0On,x - sta IO.D2.Ph0On,y + lda IO.D2.Ph0On,x + lda IO.D2.Ph0On,y lda #IO.D2.SeekTimeB jsr BB.Wait @@ -385,8 +386,8 @@ BB.Seek lda BB.HdrTrk get track we're on lda #0 jsr BB.Wait - sta IO.D2.Ph0Off,x - sta IO.D2.Ph0Off,y + lda IO.D2.Ph0Off,x + lda IO.D2.Ph0Off,y *-------------------------------------- BB.Read ldx BB.Slotn0 diff --git a/ProDOS.FX/ProDOS.S.XRW.txt b/ProDOS.FX/ProDOS.S.XRW.txt index 5e289f40..dd2e6de5 100644 --- a/ProDOS.FX/ProDOS.S.XRW.txt +++ b/ProDOS.FX/ProDOS.S.XRW.txt @@ -403,16 +403,17 @@ XRW.Seek ldx XRW.UnitIndex XRW.SEEKOFF pha - lda A2L - ora #IO.D2.RData - sta .1+1 - sta .2+1 +* lda A2L +* ora #IO.D2.RData +* sta .1+1 +* sta .2+1 lda IO.D2.Ph0Off,x -.1 lda IO.D2.RData SELF MODIFIED - +*.1 lda IO.D2.RData SELF MODIFIED + nop + nop lda IO.D2.Ph0Off,y -.2 lda IO.D2.RData SELF MODIFIED +*.2 lda IO.D2.RData SELF MODIFIED pla rts @@ -602,9 +603,6 @@ XRW.SectorIO bit XRW.bWrite sec .9 rts - -* .BS $D300-* - *-------------------------------------- * write subroutine (16 sector format) * @@ -614,6 +612,8 @@ XRW.SectorIO bit XRW.bWrite * on entry: x = slotnum times 16 *-------------------------------------- .LIST ON + .BS $D300-* + XRW.Write bit IO.D2.ReadProt,x (4) PREWRITE MODE .LIST OFF bit IO.D2.ReadMode,x (4) @@ -968,16 +968,17 @@ XRW.SEEK2QTXY pha tay XRW.SEEK2QT - lda A2L - ora #IO.D2.RData - sta .1+1 - sta .2+1 +* lda A2L +* ora #IO.D2.RData +* sta .1+1 +* sta .2+1 lda IO.D2.Ph0On,x -.1 lda IO.D2.RData SELF MODIFIED - +*.1 lda IO.D2.RData SELF MODIFIED + nop + nop lda IO.D2.Ph0On,y -.2 lda IO.D2.RData SELF MODIFIED +*.2 lda IO.D2.RData SELF MODIFIED rts *-------------------------------------- XRW.Trk2Qtrk asl x2 diff --git a/SYS/KERNEL.S.TERM.txt b/SYS/KERNEL.S.TERM.txt index fe9e022a..4fae8c1d 100644 --- a/SYS/KERNEL.S.TERM.txt +++ b/SYS/KERNEL.S.TERM.txt @@ -67,11 +67,11 @@ TERM.GetIOCTLBufCntDCB lda (ZPIOCTL),y eor #$ff - sta ZPCount + sta ZPCnt iny lda (ZPIOCTL),y eor #$ff - sta ZPCount+1 + sta ZPCnt+1 *-------------------------------------- TERM.GetDCB ldy #S.FD.DEV.DCBPTR diff --git a/SYS/KERNEL.S.TERMX.txt b/SYS/KERNEL.S.TERMX.txt index 8d090dd2..b3dcb539 100644 --- a/SYS/KERNEL.S.TERMX.txt +++ b/SYS/KERNEL.S.TERMX.txt @@ -9,12 +9,12 @@ ZPIOCTL .BS 2 ZPBufPtr .BS 2 ZPDCBPtr .BS 2 -ZPCount .BS 2 +ZPCnt .BS 2 -ZPBufBaseL1 .BS 2 -ZPBufBaseL2 .BS 2 -ZPScrBaseL1 .BS 2 -ZPScrBaseL2 .BS 2 +ZPBufBL1 .BS 2 +ZPBufBL2 .BS 2 +ZPScrBL1 .BS 2 +ZPScrBL2 .BS 2 *-------------------------------------- bActive .BS 1 ZPDevID .BS 1 @@ -22,9 +22,9 @@ ZPDevID .BS 1 ZPTmpBool .BS 1 ZPTmpChar .BS 1 -CsiHeader .BS 1 -CsiParamCnt .BS 1 -CsiParams .BS 4 +CsiH .BS 1 +CsiPCnt .BS 1 +CsiP .BS 4 .ED *-------------------------------------- TERMX .DA TERMX.STATUS @@ -238,10 +238,10 @@ TERMX.READ bit bActive is screen active? .7 stz .8+1 -.70 inc ZPCount +.70 inc ZPCnt bne .71 - inc ZPCount+1 + inc ZPCnt+1 beq .8 .71 jsr Char.Out.Get @@ -273,10 +273,10 @@ TERMX.READ bit bActive is screen active? *-------------------------------------- TERMX.WRITE jsr TERMX.CUROFF -.1 inc ZPCount +.1 inc ZPCnt bne .2 - inc ZPCount+1 + inc ZPCnt+1 beq .8 .2 ldy #S.DCB.TTY.MODE @@ -291,7 +291,7 @@ TERMX.WRITE jsr TERMX.CUROFF .3 jmp (.4,x) -.4 .DA TERMX.COUT +.4 .DA TERMX.OUT .DA TERMX.ESC .DA TERMX.CSI .DA TERMX.IAC @@ -301,16 +301,16 @@ TERMX.WRITE jsr TERMX.CUROFF .8 clc rts *-------------------------------------- -TERMX.COUT jsr TERM.GetBufByte +TERMX.OUT jsr TERM.GetBufByte cmp #IAC bne .1 lda #S.DCB.TTY.MODE.IAC - jmp TERMX.SETMODE + jmp TERMX.SETM .1 cmp #C.DEL - beq TERMX.COUT.DEL + beq TERMX.OUT.DEL cmp #C.SPACE bcs .8 @@ -332,43 +332,43 @@ TERMX.COUT jsr TERM.GetBufByte jmp (.4,x) .4 .DA ENQ - .DA TERMX.COUT.BS - .DA TERMX.COUT.LF - .DA TERMX.COUT.FF - .DA TERMX.COUT.CR - .DA TERMX.COUT.SO - .DA TERMX.COUT.SI - .DA TERMX.COUT.FS - .DA TERMX.COUT.ESC + .DA TERMX.OUT.BS + .DA TERMX.OUT.LF + .DA TERMX.OUT.FF + .DA TERMX.OUT.CR + .DA TERMX.OUT.SO + .DA TERMX.OUT.SI + .DA TERMX.OUT.FS + .DA TERMX.OUT.ESC *-------------------------------------- .8 jsr SetCharAtCurPos *-------------------------------------- -TERMX.COUT.FS ldy #S.DCB.TTY.CH +TERMX.OUT.FS ldy #S.DCB.TTY.CH lda (ZPDCBPtr),y inc sta (ZPDCBPtr),y cmp #80 - bcc TERMX.COUT.BS.8 + bcc TERMX.OUT.BS.8 ldy #S.DCB.TTY.bLINEWRAP lda (ZPDCBPtr),y - bpl TERMX.COUT.BS.8 + bpl TERMX.OUT.BS.8 - jsr TERMX.COUT.CR + jsr TERMX.OUT.CR - jmp TERMX.COUT.LF.1 + jmp TERMX.OUT.LF.1 *-------------------------------------- -TERMX.COUT.BS ldy #S.DCB.TTY.CH +TERMX.OUT.BS ldy #S.DCB.TTY.CH lda (ZPDCBPtr),y - beq TERMX.COUT.BS.1 + beq TERMX.OUT.BS.1 dec sta (ZPDCBPtr),y -TERMX.COUT.BS.8 clc +TERMX.OUT.BS.8 clc rts -TERMX.COUT.BS.1 ldy #S.DCB.TTY.CV +TERMX.OUT.BS.1 ldy #S.DCB.TTY.CV lda (ZPDCBPtr),y beq .2 @@ -382,7 +382,7 @@ TERMX.COUT.BS.1 ldy #S.DCB.TTY.CV .2 clc rts *-------------------------------------- -TERMX.COUT.DEL ldy #S.DCB.TTY.CH +TERMX.OUT.DEL ldy #S.DCB.TTY.CH lda (ZPDCBPtr),y beq .1 @@ -392,7 +392,7 @@ TERMX.COUT.DEL ldy #S.DCB.TTY.CH .1 ldy #S.DCB.TTY.CV lda (ZPDCBPtr),y - beq TERMX.COUT.BS.8 + beq TERMX.OUT.BS.8 dec sta (ZPDCBPtr),y @@ -402,27 +402,27 @@ TERMX.COUT.DEL ldy #S.DCB.TTY.CH .3 lda #C.SPACE jmp SetCharAtCurPos *-------------------------------------- -TERMX.COUT.FF jsr HOME +TERMX.OUT.FF jsr HOME jmp TERMX.CLRSCR *-------------------------------------- -TERMX.COUT.CR lda #0 +TERMX.OUT.CR lda #0 ldy #S.DCB.TTY.CH sta (ZPDCBPtr),y clc rts *-------------------------------------- -TERMX.COUT.SO sec +TERMX.OUT.SO sec .HS 90 BCC *-------------------------------------- -TERMX.COUT.SI clc +TERMX.OUT.SI clc ldy #S.DCB.TTY.bG0G1 ror sta (ZPDCBPtr),y clc rts *-------------------------------------- -TERMX.COUT.ESC lda #S.DCB.TTY.MODE.ESC - bra TERMX.SETMODE +TERMX.OUT.ESC lda #S.DCB.TTY.MODE.ESC + bra TERMX.SETM *-------------------------------------- TERMX.ESC jsr TERM.GetBufByte y = #S.DCB.TTY.MODE @@ -432,13 +432,13 @@ TERMX.ESC jsr TERM.GetBufByte y = #S.DCB.TTY.MODE dex bpl .2 - bra TERMX.SETMODE0 + bra TERMX.SETM0 .3 phx jsr .4 plx lda EscModes,x - bra TERMX.SETMODE + bra TERMX.SETM .4 txa asl @@ -450,19 +450,19 @@ TERMX.ESC jsr TERM.GetBufByte y = #S.DCB.TTY.MODE .DA Scroll.Dn M .DA Scroll.Up D .DA RESET c - .DA TERMX.SETMODE.RTS [ - .DA TERMX.SETMODE.RTS ( - .DA TERMX.SETMODE.RTS ) + .DA TERMX.SETM.RTS [ + .DA TERMX.SETM.RTS ( + .DA TERMX.SETM.RTS ) *-------------------------------------- -TERMX.SETMODE0 lda #0 -TERMX.SETMODE ldy #S.DCB.TTY.MODE +TERMX.SETM0 lda #0 +TERMX.SETM ldy #S.DCB.TTY.MODE sta (ZPDCBPtr),y ldy #S.DCB.TTY.INBUFFER lda #S.DCB.TTY.INBUFFER sta (ZPDCBPtr),y clc -TERMX.SETMODE.RTS - rts + +TERMX.SETM.RTS rts *-------------------------------------- TERMX.CSI ldy #S.DCB.TTY.INBUFFER lda (ZPDCBPtr),y @@ -483,8 +483,8 @@ TERMX.CSI ldy #S.DCB.TTY.INBUFFER .8 clc rts -TERMX.CSI.Exec stz CsiHeader - stz CsiParamCnt +TERMX.CSI.Exec stz CsiH + stz CsiPCnt lda #S.DCB.TTY.INBUFFER+1 EscSeq Ptr clc @@ -499,7 +499,7 @@ TERMX.CSI.Exec stz CsiHeader cmp #'?' bne .2 - sta CsiHeader + sta CsiH .1 jsr SHARED.NextCharPtr2 @@ -513,9 +513,9 @@ TERMX.CSI.Exec stz CsiHeader lda ACC32 -.3 ldx CsiParamCnt - sta CsiParams,x - inc CsiParamCnt +.3 ldx CsiPCnt + sta CsiP,x + inc CsiPCnt lda (ZPPtr2) cmp #';' @@ -540,29 +540,33 @@ TERMX.CSI.Exec stz CsiHeader tax jmp (.8,x) -.8 .DA Csi.SetMode h - .DA Csi.ResetMode l +.8 .DA Csi.SetM h + .DA Csi.ResetM l .DA Csi.DispAttr m .DA Csi.Query n .DA Csi.Scroll r - .DA Csi.EraseScreen J - .DA Csi.EraseLine K + .DA Csi.CUU A + .DA Csi.CUD B + .DA Csi.CUF C + .DA Csi.CUB D + .DA Csi.CLRSCR J + .DA Csi.CLRL K .DA Csi.Home H *-------------------------------------- -Csi.SetMode sec +Csi.SetM sec .HS 90 BCC *-------------------------------------- -Csi.ResetMode clc +Csi.ResetM clc - ldx CsiParamCnt + ldx CsiPCnt beq .99 dex bne .99 - ldx CsiHeader + ldx CsiH - lda CsiParams + lda CsiP php cmp #20 bCRLF @@ -592,14 +596,14 @@ Csi.ResetMode clc .99 clc rts *-------------------------------------- -Csi.DispAttr ldx CsiParamCnt +Csi.DispAttr ldx CsiPCnt bne .10 jmp RESETATTR .10 ldx #0 -.1 lda CsiParams,x +.1 lda CsiP,x bne .2 jsr RESETATTR @@ -612,18 +616,18 @@ Csi.DispAttr ldx CsiParamCnt sta (ZPDCBPtr),y .7 inx - dec CsiParamCnt + dec CsiPCnt bne .1 .8 clc rts *-------------------------------------- -Csi.Query ldx CsiParamCnt +Csi.Query ldx CsiPCnt beq .8 dex bne .8 - lda CsiParams + lda CsiP cmp #6 bne .8 lda #C.ESC @@ -633,29 +637,29 @@ Csi.Query ldx CsiParamCnt ldy #S.DCB.TTY.CV lda (ZPDCBPtr),y inc - jsr Decimal.Out + jsr DecOut lda #';' jsr Char.Out.Put ldy #S.DCB.TTY.CH lda (ZPDCBPtr),y inc - jsr Decimal.Out + jsr DecOut lda #'R' jsr Char.Out.Put .8 clc rts *-------------------------------------- -Csi.Scroll ldy CsiParamCnt +Csi.Scroll ldy CsiPCnt bne .1 lda #0 ldx #23 bra .8 .1 cpy #2 bne .9 - lda CsiParams + lda CsiP dec - ldx CsiParams+1 + ldx CsiP+1 dex .8 ldy #S.DCB.TTY.SCROLLTOP sta (ZPDCBPtr),y @@ -665,10 +669,42 @@ Csi.Scroll ldy CsiParamCnt .9 clc rts *-------------------------------------- -Csi.EraseScreen ldx CsiParamCnt +Csi.CUU sec + .HS 90 BCC +Csi.CUD clc + ldy #S.DCB.TTY.CV + bra Csi.CU + +Csi.CUF clc + .HS B0 BCS +Csi.CUB sec + ldy #S.DCB.TTY.CH + +Csi.CU lda CsiPCnt + beq .8 + + dec + bne .8 + + lda (ZPDCBPtr),y + bcs .1 + + adc CsiP + sta (ZPDCBPtr),y + + clc + rts + +.1 sbc CsiP + sta (ZPDCBPtr),y + +.8 clc + rts +*-------------------------------------- +Csi.CLRSCR ldx CsiPCnt beq .8 -.1 lda CsiParams +.1 lda CsiP beq .8 cmp #1 @@ -686,11 +722,11 @@ Csi.EraseScreen ldx CsiParamCnt .9 clc rts *-------------------------------------- -Csi.EraseLine ldx CsiParamCnt +Csi.CLRL ldx CsiPCnt bne .1 jmp CLREOL -.1 lda CsiParams +.1 lda CsiP cmp #1 bne .2 jmp CLRSOL @@ -699,11 +735,11 @@ Csi.EraseLine ldx CsiParamCnt bne Csi.Home.8 jmp CLRLINE *-------------------------------------- -Csi.Home lda CsiParamCnt +Csi.Home lda CsiPCnt beq HOME ldx #1 - lda CsiParams + lda CsiP beq .2 ldx #24 @@ -716,11 +752,11 @@ Csi.Home lda CsiParamCnt txa ldy #S.DCB.TTY.CV sta (ZPDCBPtr),y - dec CsiParamCnt + dec CsiPCnt beq Csi.Home.8 ldx #1 - lda CsiParams+1 + lda CsiP+1 beq .3 ldx #80 @@ -765,7 +801,7 @@ TERMX.G1 ldx #$40 ora (ZPDCBPtr),y .8 sta (ZPDCBPtr),y - jmp TERMX.SETMODE0 + jmp TERMX.SETM0 *-------------------------------------- TERMX.IAC ldy #S.DCB.TTY.INBUFFER lda (ZPDCBPtr),y @@ -914,16 +950,18 @@ ENQ ldx #0 .8 clc rts *-------------------------------------- -TERMX.COUT.LF ldy #S.DCB.TTY.bCRLF +TERMX.OUT.LF ldy #S.DCB.TTY.bCRLF lda (ZPDCBPtr),y - bpl TERMX.COUT.LF.1 - jsr TERMX.COUT.CR + bpl TERMX.OUT.LF.1 -TERMX.COUT.LF.1 ldy #S.DCB.TTY.CV + jsr TERMX.OUT.CR + +TERMX.OUT.LF.1 ldy #S.DCB.TTY.CV lda (ZPDCBPtr),y ldy #S.DCB.TTY.SCROLLBOT cmp (ZPDCBPtr),y beq SCROLL.UP + inc ldy #S.DCB.TTY.CV sta (ZPDCBPtr),y @@ -1066,7 +1104,7 @@ TERMX.CURBLNK.OFF TERMX.CURBLNK.RTS rts *-------------------------------------- -Decimal.Out jsr MATH32.A2STR10NP +DecOut jsr MATH32.A2STR10NP ldx #0 .1 lda A2osX.NumStrBuf,x @@ -1122,20 +1160,20 @@ Char.Out.Get ldy #S.DCB.TTY.OUTTAIL TERMX.SETUP.L1X lda ZPDCBPtr clc adc BUF.BASEL,x - sta ZPBufBaseL1 + sta ZPBufBL1 lda ZPDCBPtr+1 adc BUF.BASEH,x - sta ZPBufBaseL1+1 + sta ZPBufBL1+1 bit bActive bpl TERMX.SETUP.L1X.8 TERMX.SETUP.L1X.SCR lda SCR.BASEL,x - sta ZPScrBaseL1 + sta ZPScrBL1 lda SCR.BASEH,x - sta ZPScrBaseL1+1 + sta ZPScrBL1+1 TERMX.SETUP.L1X.8 rts *-------------------------------------- @@ -1172,7 +1210,7 @@ TERMX.CLRSCR.2 sty .1+1 .4 ldy #79 -.5 sta (ZPBufBaseL1),y +.5 sta (ZPBufBL1),y dey bpl .5 @@ -1180,7 +1218,7 @@ TERMX.CLRSCR.2 sty .1+1 bra .1 .7 ldy #39 -.8 sta (ZPScrBaseL1),y +.8 sta (ZPScrBL1),y dey bpl .8 .9 rts @@ -1274,7 +1312,7 @@ TERMX.SCRCPY ldx #23 .80 lda $ffff,x SELF MODIFIED - sta (ZPScrBaseL1),y + sta (ZPScrBL1),y dex dex dey @@ -1286,16 +1324,16 @@ TERMX.COPY.XtoL1 lda ZPDCBPtr clc adc BUF.BASEL,x - sta ZPBufBaseL2 + sta ZPBufBL2 lda ZPDCBPtr+1 adc BUF.BASEH,x - sta ZPBufBaseL2+1 + sta ZPBufBL2+1 ldy #79 -.1 lda (ZPBufBaseL2),y - sta (ZPBufBaseL1),y +.1 lda (ZPBufBL2),y + sta (ZPBufBL1),y dey bpl .1 @@ -1303,17 +1341,17 @@ TERMX.COPY.XtoL1 bpl .8 lda SCR.BASEL,x - sta ZPScrBaseL2 + sta ZPScrBL2 lda SCR.BASEH,x - sta ZPScrBaseL2+1 + sta ZPScrBL2+1 sta SETPAGE2 jsr .6 sta CLRPAGE2 .6 ldy #39 -.7 lda (ZPScrBaseL2),y - sta (ZPScrBaseL1),y +.7 lda (ZPScrBL2),y + sta (ZPScrBL1),y dey bpl .7 @@ -1367,7 +1405,7 @@ SetCharAtYX cmp #$40 .3 jsr TERMX.SETUP.L1X ply lda ZPTmpChar - sta (ZPBufBaseL1),y + sta (ZPBufBL1),y bit bActive bpl SetCharAtYX.8 @@ -1380,11 +1418,11 @@ SetCharAtY.SCR pha bcs .2 sta SETPAGE2 - sta (ZPScrBaseL1),y + sta (ZPScrBL1),y rts .2 sta CLRPAGE2 - sta (ZPScrBaseL1),y + sta (ZPScrBL1),y SetCharAtYX.8 rts *-------------------------------------- @@ -1402,7 +1440,7 @@ GetCharAtCurPos ldy #S.DCB.TTY.CV bcs .9 Out of screen tay - lda (ZPBufBaseL1),y + lda (ZPBufBL1),y cmp #$20 bcs .8 @@ -1418,7 +1456,7 @@ CtrlChars.Cnt .EQ *-CtrlChars EscCodes .AZ "78MDc[()" EscCodes.Cnt .EQ *-EscCodes EscModes .DA #0,#0,#0,#0,#0,#S.DCB.TTY.MODE.CSI,#S.DCB.TTY.MODE.G0,#S.DCB.TTY.MODE.G1 -CsiCodes .AS "hlmnrJKH" +CsiCodes .AS "hlmnrABCDJKH" CsiCodes.Cnt .EQ *-CsiCodes *-------------------------------------- KeyRemapped .HS 080A0B15 Left,Down,Up,Right