diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 1c130b23..1051aea7 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/.Floppies/A2OSX.BUILDlc.po b/.Floppies/A2OSX.BUILDlc.po deleted file mode 100644 index 8614d47b..00000000 Binary files a/.Floppies/A2OSX.BUILDlc.po and /dev/null differ diff --git a/BIN/EDIT.S.BUF.txt b/BIN/EDIT.S.BUF.txt index fe832235..99baf276 100644 --- a/BIN/EDIT.S.BUF.txt +++ b/BIN/EDIT.S.BUF.txt @@ -123,7 +123,7 @@ BUF.InsertClipboard jsr BUF.ComputeCOffset lda FileLen - sec + clc >ADC.G ClipboardLen pha lda FileLen+1 @@ -133,7 +133,7 @@ BUF.InsertClipboard cpy BufLen sbc BufLen+1 - bcc .8 + bcs .8 >LDYA.G ClipboardLen jsr BUF.BufPtrSetup @@ -150,11 +150,12 @@ BUF.InsertClipboard jsr BUF.MoveForwardTail - lda ClipboardLen + >LDA.G ClipboardLen eor #$ff tax - lda ClipboardLen+1 + iny + lda (pData),y ClipboardLen+1 eor #$ff pha @@ -193,12 +194,12 @@ BUF.InsertClipboard BUF.DelSel jsr BUF.GetSelLen bcs .8 - lda SelStart + >LDA.G SelStart clc >ADC.G BufBase sta BufPtrDst - lda SelStart+1 + >LDA.G SelStart+1 >ADC.G BufBase+1 sta BufPtrDst+1 @@ -554,11 +555,14 @@ BUF.GetSelLen ldy #SelEnd sbc (pData),y sta SelLen+1 bcc .9 + bne .8 txa beq .9 + .8 clc rts + .9 sec rts *-------------------------------------- diff --git a/BIN/EDIT.S.CTRL.txt b/BIN/EDIT.S.CTRL.txt index d21b8b3b..39faebcf 100644 --- a/BIN/EDIT.S.CTRL.txt +++ b/BIN/EDIT.S.CTRL.txt @@ -415,9 +415,18 @@ Ctrl.Y jsr BUF.GetNextLine jmp SCRN.UpdateMain *-------------------------------------- -Ctrl.F lda #PromptModeFind - >STA.G PromptMode - jmp SCRN.UpdateStatusBar +Ctrl.F >LDYA L.DLG.FIND + jsr DLG.Open + jsr DLG.Run + + cmp #C.CR + bne .8 + + +.8 jsr DLG.Close + + clc + rts *-------------------------------------- Ctrl.N clc diff --git a/BIN/EDIT.S.txt b/BIN/EDIT.S.txt index 5db0f255..fc92e2fd 100644 --- a/BIN/EDIT.S.txt +++ b/BIN/EDIT.S.txt @@ -134,6 +134,7 @@ J.CTRL .DA Ctrl.Invalid .DA Ctrl.Invalid .DA Ctrl.Invalid L.DLG.SAVE .DA DLG.SAVE +L.DLG.FIND .DA DLG.FIND J.DLG.CTRL.Draw .DA DLG.CTRL.Draw.LBL .DA DLG.CTRL.Draw.TB .DA DLG.CTRL.Draw.OL @@ -164,7 +165,7 @@ CS.RUN >PUSHBI 0 bcs CS.INIT.RTS .1 >SYSCALL GetChar - bcs CS.RUN.RTS + bcs CS.INIT.RTS jsr CharIn >LDA.G ScreenW Wait for Response from terminal for W & H @@ -172,7 +173,7 @@ CS.RUN >PUSHBI 0 >LDYAI 510+5+5+4+1 potentially 255*\\ NORM,INV,CEOL & \0 >SYSCALL Getmem - bcs CS.RUN.RTS + bcs CS.INIT.RTS >STYA.G LineBufBase txa >STA.G hLineBuffer @@ -198,6 +199,18 @@ CS.RUN >PUSHBI 0 jsr SCRN.Init bcs CS.RUN.RTS + + >LDYAI 65 + >SYSCALL getmem0 + bcs CS.RUN.RTS + txa + >STA.G hFind + + >LDYAI 65 + >SYSCALL getmem0 + bcs CS.RUN.RTS + txa + >STA.G hReplace CS.RUN.LOOP >SYSCALL GetChar bcs CS.RUN.RTS I/O error @@ -233,6 +246,13 @@ CS.QUIT ldy #hLineBuffer jsr .8 ldy #hFileName + jsr .8 + + ldy #hFind + jsr .8 + + ldy #hReplace + jsr .8 .8 lda (pData),y beq .9 @@ -510,6 +530,47 @@ DLG.SAVE.8 .DA #S.DLG.Ctrl.BUT,#52,#8 DLG.SAVE.T .AZ "Save As..." Title DLG.SAVE.S .AZ "CR:Save, Ctrl-R/L/A:Change Type, Ctrl-C:Cancel" DLG.SAVE.LEN .EQ *-DLG.SAVE +*-------------------------------------- +DLG.FIND .DA #DLG.FIND.LEN Size + .DA #0 X + .DA #0 Y + .DA #70 W + .DA #11 H + .DA #DLG.FIND.T-DLG.FIND Title + .DA #DLG.FIND.S-DLG.FIND Status + + .DA #9 Focus + .DA #DLG.FIND.1-DLG.FIND + .DA #DLG.FIND.2-DLG.FIND + .DA #DLG.FIND.3-DLG.FIND + .DA #DLG.FIND.4-DLG.FIND + .DA #DLG.FIND.5-DLG.FIND + .DA #DLG.FIND.6-DLG.FIND + .DA #0 + +DLG.FIND.1 .DA #S.DLG.Ctrl.LBL,#2,#2 + .AZ "Find :" + +DLG.FIND.2 .DA #S.DLG.Ctrl.TB,#2,#3 + .DA #0,#64,#hFind + +DLG.FIND.3 .DA #S.DLG.Ctrl.LBL,#2,#5 + .AZ "Replace :" + +DLG.FIND.4 .DA #S.DLG.Ctrl.TB,#2,#6 + .DA #0,#64,#hReplace + +DLG.FIND.5 .DA #S.DLG.Ctrl.BUT,#40,#8 + .DA #C.CR + .AZ " Find " + +DLG.FIND.6 .DA #S.DLG.Ctrl.BUT,#52,#8 + .DA #3 Ctrl-C + .AZ " Cancel " + +DLG.FIND.T .AZ "Find/Replace..." Title +DLG.FIND.S .AZ "CR:Find, Ctrl-C:Cancel" +DLG.FIND.LEN .EQ *-DLG.FIND *-------------------------------------- .DUMMY .OR 0 diff --git a/BIN/NSCUTIL.S.txt b/BIN/NSCUTIL.S.txt index a4006b29..3189659f 100644 --- a/BIN/NSCUTIL.S.txt +++ b/BIN/NSCUTIL.S.txt @@ -37,8 +37,8 @@ L.MSG.READ.OK1 .DA MSG.READ.OK1 L.MSG.READ.OK2.12 .DA MSG.READ.OK2.12 L.MSG.READ.OK2.24 .DA MSG.READ.OK2.24 L.MSG.READ.OK3 .DA MSG.READ.OK3 -L.MSG.READ.OK4 .DA MSG.READ.OK4 L.MSG.USAGE .DA MSG.USAGE +L.MSG.CRLF .DA MSG.CRLF .DA 0 *-------------------------------------- CS.INIT clc @@ -65,6 +65,7 @@ CS.RUN.READ jsr NSC.Init lda #MLI.E.NODEV sec rts + .8 jsr NSC.Dump >PUSHBI 0 @@ -84,7 +85,7 @@ CS.RUN.SET lda #1 stz DS1216E.DATA+7 jsr GetBCD bcs .9 - sta DS1216E.DATA+2 + sta DS1216E.DATA lda (ZPPtr1),y cmp #'/' bne .9 @@ -101,7 +102,7 @@ CS.RUN.SET lda #1 jsr GetBCD bcs .9 - sta DS1216E.DATA + sta DS1216E.DATA+2 lda (ZPPtr1),y cmp #',' @@ -134,6 +135,7 @@ CS.RUN.SET lda #1 lda #0 tell TSKMGR that all done ok, but sec we do not want to stay in memory rts + .9 lda #E.SYN sec rts @@ -253,13 +255,15 @@ NSC.Dump ldx #1 >LDYA L.MSG.READ.OK2.24 bit DS1216E.DATA+4 bpl .3 + >LDYA L.MSG.READ.OK2.12 + .3 >SYSCALL printf >PUSHBI 0 >LDYA L.MSG.READ.OK3 >SYSCALL printf - lda DS1216E.DATA+2 + lda DS1216E.DATA jsr PrintBCD lda #'/' >SYSCALL PutChar @@ -267,14 +271,16 @@ NSC.Dump ldx #1 jsr PrintBCD lda #'/' >SYSCALL PutChar - lda DS1216E.DATA + lda DS1216E.DATA+2 jsr PrintBCD - >PUSHBI 0 - >LDYA L.MSG.READ.OK4 - >SYSCALL printf + + lda #',' + >SYSCALL PutChar + lda DS1216E.DATA+4 bpl .4 and #$1F + .4 and #$3F jsr PrintBCD lda #':' @@ -285,10 +291,14 @@ NSC.Dump ldx #1 >SYSCALL PutChar lda DS1216E.DATA+6 jsr PrintBCD - lda #'.' - >SYSCALL PutChar - lda DS1216E.DATA+7 - jsr PrintBCD +* lda #'.' +* >SYSCALL PutChar +* lda DS1216E.DATA+7 +* jsr PrintBCD + + >PUSHBI 0 + >LDYA L.MSG.CRLF + >SYSCALL printf rts *-------------------------------------- PrintBCD pha @@ -332,12 +342,12 @@ IsDigit cmp #'0' *-------------------------------------- CS.END MSG.READ.KO .AZ "DS1216E Not Detected.\r\n" -MSG.READ.OK1 .AZ "DS1216E Detected:/OSC=%d,/RST=%d,mode=" +MSG.READ.OK1 .AZ "DS1216E Detected : /OSC=%d, /RST=%d, mode=" MSG.READ.OK2.12 .AZ "am/pm" MSG.READ.OK2.24 .AZ "24h" -MSG.READ.OK3 .AZ "\r\nDate:" -MSG.READ.OK4 .AZ "\r\nTime:" -MSG.USAGE .AZ "\r\n\r\nTo Reset the chip and set clock, type:\r\nNSCUTIL DD/MM/YY,hh:mm:ss\r\n" +MSG.READ.OK3 .AZ "\r\n\r\nCurrent Date/Time : " +MSG.USAGE .AS "\r\nTo Reset the chip and set clock, type:\r\nNSCUTIL YY/MM/DD,hh:mm:ss" +MSG.CRLF .AZ "\r\n" DS1216E.PATTERN .HS 5CA33AC55CA33AC5 Reverted 7->0 DS1216E.DETECT .BS 8 DS1216E.DATA .BS 8 Reverted YY MM DD Day HH mm SS CS