mirror of
https://github.com/A2osX/A2osX.git
synced 2024-07-13 13:29:04 +00:00
Kernel 0.93+
This commit is contained in:
parent
3e6c5d24dc
commit
20daf12519
Binary file not shown.
@ -100,7 +100,11 @@ DLG.Open >STYA ZPPTR2
|
|||||||
iny
|
iny
|
||||||
bra .5
|
bra .5
|
||||||
|
|
||||||
.8 clc
|
.8 ldy #S.DLG.Focus
|
||||||
|
lda (ZPPTR1),y
|
||||||
|
jsr DLG.CTRL.Focus
|
||||||
|
|
||||||
|
clc
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DLG.Run >SYSCALL getchar
|
DLG.Run >SYSCALL getchar
|
||||||
@ -151,11 +155,10 @@ DLG.NextFocus ldy #S.DLG.Focus
|
|||||||
pla get old focused
|
pla get old focused
|
||||||
|
|
||||||
phx save new focused
|
phx save new focused
|
||||||
jsr DLG.CTRL.Draw
|
jsr DLG.CTRL.Focus
|
||||||
pla
|
|
||||||
bcs DLG.Run.RTS
|
|
||||||
|
|
||||||
jmp DLG.CTRL.Draw
|
pla
|
||||||
|
jmp DLG.CTRL.Focus
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DLG.Close ldy #S.DLG.H
|
DLG.Close ldy #S.DLG.H
|
||||||
lda (ZPPTR1),y
|
lda (ZPPTR1),y
|
||||||
@ -206,7 +209,7 @@ DLG.CTRL.Draw sta TmpByte A=CtrlID
|
|||||||
DLG.CTRL.Draw.LBL
|
DLG.CTRL.Draw.LBL
|
||||||
jsr SCRN.LineBufInitNorm
|
jsr SCRN.LineBufInitNorm
|
||||||
|
|
||||||
jsr DLG.CTRL.GotoXY
|
jsr DLG.CTRL.GotoOrg
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
ldy TmpByte CtrlID
|
ldy TmpByte CtrlID
|
||||||
@ -230,7 +233,7 @@ DLG.CTRL.Draw.LBL
|
|||||||
DLG.CTRL.Draw.TB
|
DLG.CTRL.Draw.TB
|
||||||
jsr SCRN.LineBufInitNorm
|
jsr SCRN.LineBufInitNorm
|
||||||
|
|
||||||
jsr DLG.CTRL.GotoXY
|
jsr DLG.CTRL.GotoOrg
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
ldy TmpByte
|
ldy TmpByte
|
||||||
@ -252,17 +255,8 @@ DLG.CTRL.Draw.TB
|
|||||||
>SYSCALL getmemptr
|
>SYSCALL getmemptr
|
||||||
>STYA ZPPTR2
|
>STYA ZPPTR2
|
||||||
|
|
||||||
ldy #S.DLG.Focus
|
lda #C.SPACE
|
||||||
lda (ZPPTR1),y
|
jsr SCRN.ToLineBuf
|
||||||
eor TmpByte
|
|
||||||
bne .10
|
|
||||||
sec
|
|
||||||
|
|
||||||
.10 lda #C.SPACE
|
|
||||||
bcc .11
|
|
||||||
lda #'['
|
|
||||||
|
|
||||||
.11 jsr SCRN.ToLineBuf
|
|
||||||
|
|
||||||
ldy #0
|
ldy #0
|
||||||
|
|
||||||
@ -296,9 +290,7 @@ DLG.CTRL.Draw.TB
|
|||||||
bra .3
|
bra .3
|
||||||
|
|
||||||
.8 lda #C.SPACE
|
.8 lda #C.SPACE
|
||||||
bcc .81
|
jsr SCRN.ToLineBuf
|
||||||
lda #']'
|
|
||||||
.81 jsr SCRN.ToLineBuf
|
|
||||||
|
|
||||||
jmp SCRN.LineBufOut
|
jmp SCRN.LineBufOut
|
||||||
.9 rts
|
.9 rts
|
||||||
@ -306,7 +298,7 @@ DLG.CTRL.Draw.TB
|
|||||||
DLG.CTRL.Draw.OL
|
DLG.CTRL.Draw.OL
|
||||||
jsr SCRN.LineBufInitNorm
|
jsr SCRN.LineBufInitNorm
|
||||||
|
|
||||||
jsr DLG.CTRL.GotoXY
|
jsr DLG.CTRL.GotoOrg
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
ldy TmpByte
|
ldy TmpByte
|
||||||
@ -323,9 +315,7 @@ DLG.CTRL.Draw.OL
|
|||||||
sta TmpCount
|
sta TmpCount
|
||||||
|
|
||||||
iny
|
iny
|
||||||
|
|
||||||
ldx #0
|
|
||||||
|
|
||||||
.1 lda #"("
|
.1 lda #"("
|
||||||
jsr SCRN.ToLineBuf
|
jsr SCRN.ToLineBuf
|
||||||
lda #"o"
|
lda #"o"
|
||||||
@ -348,27 +338,16 @@ DLG.CTRL.Draw.OL
|
|||||||
.4 lda #C.SPACE
|
.4 lda #C.SPACE
|
||||||
jsr SCRN.ToLineBuf
|
jsr SCRN.ToLineBuf
|
||||||
|
|
||||||
inx
|
|
||||||
iny
|
|
||||||
lda (ZPPTR1),y
|
|
||||||
bne .1
|
|
||||||
|
|
||||||
.8 jmp SCRN.LineBufOut
|
.8 jmp SCRN.LineBufOut
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DLG.CTRL.Draw.BUT
|
DLG.CTRL.Draw.BUT
|
||||||
jsr SCRN.LineBufInitInv
|
jsr SCRN.LineBufInitInv
|
||||||
|
|
||||||
jsr DLG.CTRL.GotoXY
|
jsr DLG.CTRL.GotoOrg
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
ldy #S.DLG.Focus
|
ldy TmpByte CtrlID
|
||||||
lda (ZPPTR1),y
|
|
||||||
eor TmpByte
|
|
||||||
bne .10
|
|
||||||
sec
|
|
||||||
|
|
||||||
.10 ldy TmpByte CtrlID
|
|
||||||
lda (ZPPTR1),y
|
lda (ZPPTR1),y
|
||||||
tay
|
tay
|
||||||
|
|
||||||
@ -379,10 +358,7 @@ DLG.CTRL.Draw.BUT
|
|||||||
iny
|
iny
|
||||||
|
|
||||||
lda #C.SPACE
|
lda #C.SPACE
|
||||||
bcc .11
|
jsr SCRN.ToLineBuf
|
||||||
lda #'['
|
|
||||||
|
|
||||||
.11 jsr SCRN.ToLineBuf
|
|
||||||
|
|
||||||
.1 lda (ZPPTR1),y
|
.1 lda (ZPPTR1),y
|
||||||
beq .8
|
beq .8
|
||||||
@ -392,10 +368,7 @@ DLG.CTRL.Draw.BUT
|
|||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.8 lda #C.SPACE
|
.8 lda #C.SPACE
|
||||||
bcc .81
|
jsr SCRN.ToLineBuf
|
||||||
lda #']'
|
|
||||||
|
|
||||||
.81 jsr SCRN.ToLineBuf
|
|
||||||
|
|
||||||
jmp SCRN.LineBufOut
|
jmp SCRN.LineBufOut
|
||||||
.9 rts
|
.9 rts
|
||||||
@ -409,13 +382,35 @@ DLG.CTRL.Focus sta TmpByte A=CtrlID
|
|||||||
jmp (J.DLG.CTRL.Focus,x)
|
jmp (J.DLG.CTRL.Focus,x)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DLG.CTRL.Focus.LBL
|
DLG.CTRL.Focus.LBL
|
||||||
DLG.CTRL.Focus.TB
|
|
||||||
DLG.CTRL.Focus.OL
|
|
||||||
DLG.CTRL.Focus.BUT
|
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
DLG.CTRL.Focus.TB
|
||||||
DLG.CTRL.GotoXY
|
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
|
ldy TmpByte CtrlID
|
||||||
lda (ZPPTR1),y
|
lda (ZPPTR1),y
|
||||||
tay
|
tay
|
||||||
@ -423,14 +418,134 @@ DLG.CTRL.GotoXY
|
|||||||
iny skip Ctrl Type
|
iny skip Ctrl Type
|
||||||
lda (ZPPTR1),y
|
lda (ZPPTR1),y
|
||||||
clc
|
clc
|
||||||
phy
|
|
||||||
ldy #S.DLG.X
|
ldy #S.DLG.X
|
||||||
adc (ZPPTR1),y
|
adc (ZPPTR1),y
|
||||||
|
pha
|
||||||
|
|
||||||
|
ldy TmpByte CtrlID
|
||||||
|
lda (ZPPTR1),y
|
||||||
|
tay
|
||||||
|
|
||||||
|
iny
|
||||||
|
iny
|
||||||
|
iny
|
||||||
|
pla
|
||||||
|
|
||||||
|
sec +1
|
||||||
|
adc (ZPPTR1),y
|
||||||
tax
|
tax
|
||||||
|
|
||||||
ply
|
ldy TmpByte CtrlID
|
||||||
iny
|
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
|
lda (ZPPTR1),y
|
||||||
clc
|
clc
|
||||||
ldy #S.DLG.Y
|
ldy #S.DLG.Y
|
||||||
@ -473,6 +588,65 @@ DLG.SetOrigin ldy #S.DLG.X
|
|||||||
|
|
||||||
rts
|
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
|
DLG.DrawInvBar phy
|
||||||
jsr SCRN.LineBufInitInv
|
jsr SCRN.LineBufInitInv
|
||||||
|
|
||||||
|
@ -18,6 +18,13 @@ FILE.New >LDYAI 4096
|
|||||||
|
|
||||||
stz FileLen
|
stz FileLen
|
||||||
stz FileLen+1
|
stz FileLen+1
|
||||||
|
|
||||||
|
>LDYA L.MSG.NEWFILE
|
||||||
|
>SYSCALL RealPath
|
||||||
|
bcs .9
|
||||||
|
|
||||||
|
txa
|
||||||
|
>STA.G hFileName
|
||||||
|
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -54,14 +54,8 @@ SCRN.UpdateTopBar
|
|||||||
>PUSHW L.MSG.FILETYPES,x
|
>PUSHW L.MSG.FILETYPES,x
|
||||||
|
|
||||||
>LDA.G hFileName
|
>LDA.G hFileName
|
||||||
beq .1
|
|
||||||
|
|
||||||
>SYSCALL GetMemPtr
|
>SYSCALL GetMemPtr
|
||||||
bra .2
|
>PUSHYA
|
||||||
|
|
||||||
.1 >LDYA L.MSG.NEWFILE
|
|
||||||
|
|
||||||
.2 >PUSHYA
|
|
||||||
>PUSHBI 4
|
>PUSHBI 4
|
||||||
>PUSHW L.MSG.TOPBAR
|
>PUSHW L.MSG.TOPBAR
|
||||||
>LDYA LineBufPtr
|
>LDYA LineBufPtr
|
||||||
|
@ -143,6 +143,11 @@ J.DLG.CTRL.Focus
|
|||||||
.DA DLG.CTRL.Focus.TB
|
.DA DLG.CTRL.Focus.TB
|
||||||
.DA DLG.CTRL.Focus.OL
|
.DA DLG.CTRL.Focus.OL
|
||||||
.DA DLG.CTRL.Focus.BUT
|
.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
|
.DA 0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.INIT clc
|
CS.INIT clc
|
||||||
@ -170,6 +175,7 @@ CS.RUN >PUSHBI 0
|
|||||||
lda #1
|
lda #1
|
||||||
>SYSCALL ArgV
|
>SYSCALL ArgV
|
||||||
bcs .2 No arg, new file....
|
bcs .2 No arg, new file....
|
||||||
|
|
||||||
>SYSCALL RealPath
|
>SYSCALL RealPath
|
||||||
txa
|
txa
|
||||||
>STA.G hFileName
|
>STA.G hFileName
|
||||||
@ -457,6 +463,8 @@ DLG.SAVE .DA #DLG.SAVE.LEN Size
|
|||||||
.DA #DLG.SAVE.4-DLG.SAVE
|
.DA #DLG.SAVE.4-DLG.SAVE
|
||||||
.DA #DLG.SAVE.5-DLG.SAVE
|
.DA #DLG.SAVE.5-DLG.SAVE
|
||||||
.DA #DLG.SAVE.6-DLG.SAVE
|
.DA #DLG.SAVE.6-DLG.SAVE
|
||||||
|
.DA #DLG.SAVE.7-DLG.SAVE
|
||||||
|
.DA #DLG.SAVE.8-DLG.SAVE
|
||||||
.DA #0
|
.DA #0
|
||||||
|
|
||||||
DLG.SAVE.1 .DA #S.DLG.Ctrl.LBL,#2,#2
|
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 :"
|
.AZ "Filetype :"
|
||||||
|
|
||||||
DLG.SAVE.4 .DA #S.DLG.Ctrl.OL,#2,#6
|
DLG.SAVE.4 .DA #S.DLG.Ctrl.OL,#2,#6
|
||||||
.DA #20 Ctrl-T
|
.DA #18 Ctrl-R
|
||||||
.DA #0 Value
|
|
||||||
.AZ "TXT/CR"
|
|
||||||
.AZ "TXT/CRLF"
|
|
||||||
.AZ "S-C/ASM"
|
|
||||||
.DA #0
|
.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
|
.DA #C.CR
|
||||||
.AZ " Save "
|
.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
|
.DA #3 Ctrl-C
|
||||||
.AZ " Cancel "
|
.AZ " Cancel "
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user