diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index f6355705..7b96141d 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/BIN/EDIT.S.DLG.txt b/BIN/EDIT.S.DLG.txt index 0ffa780f..ff1f86ea 100644 --- a/BIN/EDIT.S.DLG.txt +++ b/BIN/EDIT.S.DLG.txt @@ -100,7 +100,11 @@ DLG.Open >STYA ZPPTR2 iny bra .5 -.8 clc +.8 ldy #S.DLG.Focus + lda (ZPPTR1),y + jsr DLG.CTRL.Focus + + clc .9 rts *-------------------------------------- DLG.Run >SYSCALL getchar @@ -151,11 +155,10 @@ DLG.NextFocus ldy #S.DLG.Focus pla get old focused phx save new focused - jsr DLG.CTRL.Draw - pla - bcs DLG.Run.RTS + jsr DLG.CTRL.Focus - jmp DLG.CTRL.Draw + pla + jmp DLG.CTRL.Focus *-------------------------------------- DLG.Close ldy #S.DLG.H lda (ZPPTR1),y @@ -206,7 +209,7 @@ DLG.CTRL.Draw sta TmpByte A=CtrlID DLG.CTRL.Draw.LBL jsr SCRN.LineBufInitNorm - jsr DLG.CTRL.GotoXY + jsr DLG.CTRL.GotoOrg bcs .9 ldy TmpByte CtrlID @@ -230,7 +233,7 @@ DLG.CTRL.Draw.LBL DLG.CTRL.Draw.TB jsr SCRN.LineBufInitNorm - jsr DLG.CTRL.GotoXY + jsr DLG.CTRL.GotoOrg bcs .9 ldy TmpByte @@ -252,17 +255,8 @@ DLG.CTRL.Draw.TB >SYSCALL getmemptr >STYA ZPPTR2 - ldy #S.DLG.Focus - lda (ZPPTR1),y - eor TmpByte - bne .10 - sec - -.10 lda #C.SPACE - bcc .11 - lda #'[' - -.11 jsr SCRN.ToLineBuf + lda #C.SPACE + jsr SCRN.ToLineBuf ldy #0 @@ -296,9 +290,7 @@ DLG.CTRL.Draw.TB bra .3 .8 lda #C.SPACE - bcc .81 - lda #']' -.81 jsr SCRN.ToLineBuf + jsr SCRN.ToLineBuf jmp SCRN.LineBufOut .9 rts @@ -306,7 +298,7 @@ DLG.CTRL.Draw.TB DLG.CTRL.Draw.OL jsr SCRN.LineBufInitNorm - jsr DLG.CTRL.GotoXY + jsr DLG.CTRL.GotoOrg bcs .9 ldy TmpByte @@ -323,9 +315,7 @@ DLG.CTRL.Draw.OL sta TmpCount iny - - ldx #0 - + .1 lda #"(" jsr SCRN.ToLineBuf lda #"o" @@ -348,27 +338,16 @@ DLG.CTRL.Draw.OL .4 lda #C.SPACE jsr SCRN.ToLineBuf - inx - iny - lda (ZPPTR1),y - bne .1 - .8 jmp SCRN.LineBufOut .9 rts *-------------------------------------- DLG.CTRL.Draw.BUT jsr SCRN.LineBufInitInv - jsr DLG.CTRL.GotoXY + jsr DLG.CTRL.GotoOrg bcs .9 - ldy #S.DLG.Focus - lda (ZPPTR1),y - eor TmpByte - bne .10 - sec - -.10 ldy TmpByte CtrlID + ldy TmpByte CtrlID lda (ZPPTR1),y tay @@ -379,10 +358,7 @@ DLG.CTRL.Draw.BUT iny lda #C.SPACE - bcc .11 - lda #'[' - -.11 jsr SCRN.ToLineBuf + jsr SCRN.ToLineBuf .1 lda (ZPPTR1),y beq .8 @@ -392,10 +368,7 @@ DLG.CTRL.Draw.BUT bra .1 .8 lda #C.SPACE - bcc .81 - lda #']' - -.81 jsr SCRN.ToLineBuf + jsr SCRN.ToLineBuf jmp SCRN.LineBufOut .9 rts @@ -409,13 +382,35 @@ DLG.CTRL.Focus sta TmpByte A=CtrlID jmp (J.DLG.CTRL.Focus,x) *-------------------------------------- DLG.CTRL.Focus.LBL -DLG.CTRL.Focus.TB -DLG.CTRL.Focus.OL -DLG.CTRL.Focus.BUT clc rts -*-------------------------------------- -DLG.CTRL.GotoXY +DLG.CTRL.Focus.TB + jsr DLG.CTRL.GotoOrg + + ldy #S.DLG.Focus + lda (ZPPTR1),y + eor TmpByte + bne .1 + sec + +.1 lda #C.SPACE + bcc .2 + lda #'[' +.2 >SYSCALL putchar + + jsr DLG.CTRL.GotoEnd + + ldy #S.DLG.Focus + lda (ZPPTR1),y + eor TmpByte + bne .3 + sec + +.3 lda #C.SPACE + bcc .4 + lda #']' +.4 >SYSCALL putchar + ldy TmpByte CtrlID lda (ZPPTR1),y tay @@ -423,14 +418,134 @@ DLG.CTRL.GotoXY iny skip Ctrl Type lda (ZPPTR1),y clc - phy + ldy #S.DLG.X adc (ZPPTR1),y + pha + ldy TmpByte CtrlID + lda (ZPPTR1),y + tay + + iny + iny + iny + pla + + sec +1 + adc (ZPPTR1),y tax - ply - iny + ldy TmpByte CtrlID + lda (ZPPTR1),y + tay + + iny skip Ctrl Type + iny skip X + + lda (ZPPTR1),y + clc + ldy #S.DLG.Y + adc (ZPPTR1),y + + tay + + jmp SCRN.GotoXY + +DLG.CTRL.Focus.OL + jsr DLG.CTRL.GotoOrg + + ldy #S.DLG.Focus + lda (ZPPTR1),y + eor TmpByte + bne .1 + sec + +.1 lda #'(' + bcc .2 + lda #'[' +.2 >SYSCALL putchar + + jsr DLG.CTRL.GotoEnd + + ldy #S.DLG.Focus + lda (ZPPTR1),y + eor TmpByte + bne .3 + sec + +.3 lda #')' + bcc .4 + lda #']' +.4 >SYSCALL putchar + clc + rts + +DLG.CTRL.Focus.BUT + jsr DLG.CTRL.GotoOrg + + ldy #S.DLG.Focus + lda (ZPPTR1),y + eor TmpByte + bne .1 + sec + +.1 lda #C.SPACE + bcc .2 + lda #'[' +.2 >SYSCALL putchar + + jsr DLG.CTRL.GotoEnd + + ldy #S.DLG.Focus + lda (ZPPTR1),y + eor TmpByte + bne .3 + sec + +.3 lda #C.SPACE + bcc .4 + lda #']' +.4 >SYSCALL putchar + + clc + rts +*-------------------------------------- +DLG.CTRL.GotoOrg + clc + .HS B0 BCS +DLG.CTRL.GotoEnd + sec + php + + ldy TmpByte CtrlID + lda (ZPPTR1),y + tay + + iny skip Ctrl Type + lda (ZPPTR1),y + clc + + ldy #S.DLG.X + adc (ZPPTR1),y + plp + bcc .1 + + >PUSHA + jsr DLG.CTRL.GetWitdh + sec + inc pData + adc (pData) + +.1 tax + + ldy TmpByte CtrlID + lda (ZPPTR1),y + tay + + iny skip Ctrl Type + iny skip X + lda (ZPPTR1),y clc ldy #S.DLG.Y @@ -473,6 +588,65 @@ DLG.SetOrigin ldy #S.DLG.X rts *-------------------------------------- +DLG.CTRL.GetWitdh + ldy TmpByte CtrlID + lda (ZPPTR1),y + tay + + lda (ZPPTR1),y + tax + + jmp (J.DLG.CTRL.GetWitdh,x) +*-------------------------------------- +DLG.CTRL.GetWitdh.LBL + clc + rts +DLG.CTRL.GetWitdh.TB + iny + iny + iny + iny + lda (ZPPTR1),y + rts + +DLG.CTRL.GetWitdh.OL + lda #2 + rts + + iny + iny + iny + iny + + ldx #0 + +.1 inx + iny + lda (ZPPTR1),y + bne .1 + + iny + lda (ZPPTR1),y + bne .1 + + txa + rts + +DLG.CTRL.GetWitdh.BUT + iny + iny + iny + + ldx #0 + +.1 inx + iny + lda (ZPPTR1),y + bne .1 + + txa + rts +*-------------------------------------- DLG.DrawInvBar phy jsr SCRN.LineBufInitInv diff --git a/BIN/EDIT.S.FILE.txt b/BIN/EDIT.S.FILE.txt index a56fd781..f79f1e44 100644 --- a/BIN/EDIT.S.FILE.txt +++ b/BIN/EDIT.S.FILE.txt @@ -18,6 +18,13 @@ FILE.New >LDYAI 4096 stz FileLen stz FileLen+1 + + >LDYA L.MSG.NEWFILE + >SYSCALL RealPath + bcs .9 + + txa + >STA.G hFileName .9 rts *-------------------------------------- diff --git a/BIN/EDIT.S.SCRN.txt b/BIN/EDIT.S.SCRN.txt index 40b9fd7e..025069cd 100644 --- a/BIN/EDIT.S.SCRN.txt +++ b/BIN/EDIT.S.SCRN.txt @@ -54,14 +54,8 @@ SCRN.UpdateTopBar >PUSHW L.MSG.FILETYPES,x >LDA.G hFileName - beq .1 - >SYSCALL GetMemPtr - bra .2 - -.1 >LDYA L.MSG.NEWFILE - -.2 >PUSHYA + >PUSHYA >PUSHBI 4 >PUSHW L.MSG.TOPBAR >LDYA LineBufPtr diff --git a/BIN/EDIT.S.txt b/BIN/EDIT.S.txt index b7d0dee4..1ae1effe 100644 --- a/BIN/EDIT.S.txt +++ b/BIN/EDIT.S.txt @@ -143,6 +143,11 @@ J.DLG.CTRL.Focus .DA DLG.CTRL.Focus.TB .DA DLG.CTRL.Focus.OL .DA DLG.CTRL.Focus.BUT +J.DLG.CTRL.GetWitdh + .DA DLG.CTRL.GetWitdh.LBL + .DA DLG.CTRL.GetWitdh.TB + .DA DLG.CTRL.GetWitdh.OL + .DA DLG.CTRL.GetWitdh.BUT .DA 0 *-------------------------------------- CS.INIT clc @@ -170,6 +175,7 @@ CS.RUN >PUSHBI 0 lda #1 >SYSCALL ArgV bcs .2 No arg, new file.... + >SYSCALL RealPath txa >STA.G hFileName @@ -457,6 +463,8 @@ DLG.SAVE .DA #DLG.SAVE.LEN Size .DA #DLG.SAVE.4-DLG.SAVE .DA #DLG.SAVE.5-DLG.SAVE .DA #DLG.SAVE.6-DLG.SAVE + .DA #DLG.SAVE.7-DLG.SAVE + .DA #DLG.SAVE.8-DLG.SAVE .DA #0 DLG.SAVE.1 .DA #S.DLG.Ctrl.LBL,#2,#2 @@ -469,18 +477,25 @@ DLG.SAVE.3 .DA #S.DLG.Ctrl.LBL,#2,#5 .AZ "Filetype :" DLG.SAVE.4 .DA #S.DLG.Ctrl.OL,#2,#6 - .DA #20 Ctrl-T - .DA #0 Value - .AZ "TXT/CR" - .AZ "TXT/CRLF" - .AZ "S-C/ASM" + .DA #18 Ctrl-R .DA #0 + .AZ "TXT/CR" + +DLG.SAVE.5 .DA #S.DLG.Ctrl.OL,#13,#6 + .DA #12 Ctrl-L + .DA #0 + .AZ "TXT/CRLF" + +DLG.SAVE.6 .DA #S.DLG.Ctrl.OL,#26,#6 + .DA #1 Ctrl-A + .DA #0 + .AZ "S-C/ASM" -DLG.SAVE.5 .DA #S.DLG.Ctrl.BUT,#40,#8 +DLG.SAVE.7 .DA #S.DLG.Ctrl.BUT,#40,#8 .DA #C.CR .AZ " Save " -DLG.SAVE.6 .DA #S.DLG.Ctrl.BUT,#52,#8 +DLG.SAVE.8 .DA #S.DLG.Ctrl.BUT,#52,#8 .DA #3 Ctrl-C .AZ " Cancel "