mirror of
https://github.com/A2osX/A2osX.git
synced 2024-08-11 07:29:00 +00:00
Kernel 0.93+
This commit is contained in:
parent
f795bc523a
commit
0c83cbab62
Binary file not shown.
@ -438,29 +438,15 @@ Ctrl.Q lda #$FF
|
|||||||
Ctrl.S >LDYA L.DLG.SAVE
|
Ctrl.S >LDYA L.DLG.SAVE
|
||||||
jsr DLG.Open
|
jsr DLG.Open
|
||||||
jsr DLG.Run
|
jsr DLG.Run
|
||||||
jsr DLG.Close
|
|
||||||
|
cmp #C.CR
|
||||||
|
bne .8
|
||||||
|
|
||||||
|
jsr FILE.Save
|
||||||
|
.8 jsr DLG.Close
|
||||||
|
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
lda #PromptModeSave
|
|
||||||
>STA.G PromptMode
|
|
||||||
>LDA.G hFileName
|
|
||||||
beq .2
|
|
||||||
|
|
||||||
>SYSCALL GetMemPtr
|
|
||||||
>STYA ZPPTR1
|
|
||||||
|
|
||||||
ldy #$ff
|
|
||||||
|
|
||||||
.1 iny
|
|
||||||
lda (ZPPTR1),y
|
|
||||||
sta (pData),y
|
|
||||||
bne .1
|
|
||||||
|
|
||||||
tya
|
|
||||||
.2 >STA.G PromptBufPtr
|
|
||||||
|
|
||||||
jmp SCRN.UpdateStatusBar
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Ctrl.FS jsr BUF.GetLine
|
Ctrl.FS jsr BUF.GetLine
|
||||||
bcs .8
|
bcs .8
|
||||||
|
@ -117,16 +117,24 @@ DLG.Run >SYSCALL getchar
|
|||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
cmp #C.TAB
|
cmp #C.TAB
|
||||||
bne DLG.Run
|
beq DLG.NextFocus
|
||||||
|
pha
|
||||||
|
|
||||||
jsr DLG.NextFocus
|
ldy #S.DLG.Focus
|
||||||
bcc DLG.Run
|
lda (ZPPTR1),y get actual focused Ctrl
|
||||||
|
|
||||||
|
tay
|
||||||
|
|
||||||
|
pla
|
||||||
|
jsr DLG.CTRL.CharIn
|
||||||
|
|
||||||
|
|
||||||
|
bra DLG.Run
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.8 clc
|
.8 clc
|
||||||
.9
|
.9 rts
|
||||||
DLG.Run.RTS rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DLG.NextFocus ldy #S.DLG.Focus
|
DLG.NextFocus ldy #S.DLG.Focus
|
||||||
lda (ZPPTR1),y get actual focused Ctrl
|
lda (ZPPTR1),y get actual focused Ctrl
|
||||||
@ -158,14 +166,10 @@ DLG.NextFocus ldy #S.DLG.Focus
|
|||||||
jsr DLG.CTRL.Focus
|
jsr DLG.CTRL.Focus
|
||||||
|
|
||||||
pla
|
pla
|
||||||
jmp DLG.CTRL.Focus
|
jsr DLG.CTRL.Focus
|
||||||
|
jmp DLG.Run
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DLG.Close ldy #S.DLG.H
|
DLG.Close ldy #S.DLG.Y
|
||||||
lda (ZPPTR1),y
|
|
||||||
|
|
||||||
sta TmpCount
|
|
||||||
|
|
||||||
ldy #S.DLG.Y
|
|
||||||
lda (ZPPTR1),y
|
lda (ZPPTR1),y
|
||||||
|
|
||||||
sta TmpByte
|
sta TmpByte
|
||||||
@ -180,23 +184,10 @@ DLG.Close ldy #S.DLG.H
|
|||||||
adc #0
|
adc #0
|
||||||
sta TmpIndex+1
|
sta TmpIndex+1
|
||||||
|
|
||||||
lda TmpIndex
|
ldy #S.DLG.H
|
||||||
ldx TmpIndex+1
|
lda (ZPPTR1),y
|
||||||
jsr BUF.GetLineAX
|
|
||||||
bcs .8
|
|
||||||
|
|
||||||
lda TmpByte
|
jmp SCRN.UpdateMain.1
|
||||||
jsr SCRN.UpdateLineAtALenY
|
|
||||||
|
|
||||||
inc TmpIndex
|
|
||||||
bne .2
|
|
||||||
inc TmpIndex+1
|
|
||||||
.2 inc TmpByte
|
|
||||||
dec TmpCount
|
|
||||||
bne .1
|
|
||||||
|
|
||||||
.8 clc
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DLG.CTRL.Draw sta TmpByte A=CtrlID
|
DLG.CTRL.Draw sta TmpByte A=CtrlID
|
||||||
tay
|
tay
|
||||||
@ -278,6 +269,8 @@ DLG.CTRL.Draw.TB
|
|||||||
iny
|
iny
|
||||||
iny
|
iny
|
||||||
|
|
||||||
|
txa
|
||||||
|
sta (ZPPTR1),y CURPOS
|
||||||
iny
|
iny
|
||||||
|
|
||||||
.3 txa
|
.3 txa
|
||||||
@ -309,6 +302,7 @@ DLG.CTRL.Draw.OL
|
|||||||
iny
|
iny
|
||||||
iny
|
iny
|
||||||
|
|
||||||
|
iny
|
||||||
iny
|
iny
|
||||||
|
|
||||||
lda (ZPPTR1),y value
|
lda (ZPPTR1),y value
|
||||||
@ -374,7 +368,10 @@ DLG.CTRL.Draw.BUT
|
|||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DLG.CTRL.Focus sta TmpByte A=CtrlID
|
DLG.CTRL.Focus sta TmpByte A=CtrlID
|
||||||
tay
|
|
||||||
|
jsr SCRN.LineBufInitNorm
|
||||||
|
|
||||||
|
ldy TmpByte
|
||||||
lda (ZPPTR1),y Ctrl Definition
|
lda (ZPPTR1),y Ctrl Definition
|
||||||
tay
|
tay
|
||||||
lda (ZPPTR1),y Ctrl Type
|
lda (ZPPTR1),y Ctrl Type
|
||||||
@ -396,7 +393,7 @@ DLG.CTRL.Focus.TB
|
|||||||
.1 lda #C.SPACE
|
.1 lda #C.SPACE
|
||||||
bcc .2
|
bcc .2
|
||||||
lda #'['
|
lda #'['
|
||||||
.2 >SYSCALL putchar
|
.2 jsr SCRN.ToLineBuf
|
||||||
|
|
||||||
jsr DLG.CTRL.GotoEnd
|
jsr DLG.CTRL.GotoEnd
|
||||||
|
|
||||||
@ -409,7 +406,9 @@ DLG.CTRL.Focus.TB
|
|||||||
.3 lda #C.SPACE
|
.3 lda #C.SPACE
|
||||||
bcc .4
|
bcc .4
|
||||||
lda #']'
|
lda #']'
|
||||||
.4 >SYSCALL putchar
|
.4 jsr SCRN.ToLineBuf
|
||||||
|
|
||||||
|
jsr SCRN.LineBufOut
|
||||||
|
|
||||||
ldy TmpByte CtrlID
|
ldy TmpByte CtrlID
|
||||||
lda (ZPPTR1),y
|
lda (ZPPTR1),y
|
||||||
@ -464,7 +463,7 @@ DLG.CTRL.Focus.OL
|
|||||||
.1 lda #'('
|
.1 lda #'('
|
||||||
bcc .2
|
bcc .2
|
||||||
lda #'['
|
lda #'['
|
||||||
.2 >SYSCALL putchar
|
.2 jsr SCRN.ToLineBuf
|
||||||
|
|
||||||
jsr DLG.CTRL.GotoEnd
|
jsr DLG.CTRL.GotoEnd
|
||||||
|
|
||||||
@ -477,9 +476,9 @@ DLG.CTRL.Focus.OL
|
|||||||
.3 lda #')'
|
.3 lda #')'
|
||||||
bcc .4
|
bcc .4
|
||||||
lda #']'
|
lda #']'
|
||||||
.4 >SYSCALL putchar
|
.4 jsr SCRN.ToLineBuf
|
||||||
clc
|
|
||||||
rts
|
jmp SCRN.LineBufOut
|
||||||
|
|
||||||
DLG.CTRL.Focus.BUT
|
DLG.CTRL.Focus.BUT
|
||||||
jsr DLG.CTRL.GotoOrg
|
jsr DLG.CTRL.GotoOrg
|
||||||
@ -493,7 +492,7 @@ DLG.CTRL.Focus.BUT
|
|||||||
.1 lda #C.SPACE
|
.1 lda #C.SPACE
|
||||||
bcc .2
|
bcc .2
|
||||||
lda #'['
|
lda #'['
|
||||||
.2 >SYSCALL putchar
|
.2 jsr SCRN.ToLineBuf
|
||||||
|
|
||||||
jsr DLG.CTRL.GotoEnd
|
jsr DLG.CTRL.GotoEnd
|
||||||
|
|
||||||
@ -506,10 +505,9 @@ DLG.CTRL.Focus.BUT
|
|||||||
.3 lda #C.SPACE
|
.3 lda #C.SPACE
|
||||||
bcc .4
|
bcc .4
|
||||||
lda #']'
|
lda #']'
|
||||||
.4 >SYSCALL putchar
|
.4 jsr SCRN.ToLineBuf
|
||||||
|
|
||||||
clc
|
jmp SCRN.LineBufOut
|
||||||
rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DLG.CTRL.GotoOrg
|
DLG.CTRL.GotoOrg
|
||||||
clc
|
clc
|
||||||
@ -533,9 +531,9 @@ DLG.CTRL.GotoEnd
|
|||||||
|
|
||||||
>PUSHA
|
>PUSHA
|
||||||
jsr DLG.CTRL.GetWitdh
|
jsr DLG.CTRL.GetWitdh
|
||||||
sec
|
clc
|
||||||
inc pData
|
adc (pStack)
|
||||||
adc (pData)
|
inc pStack
|
||||||
|
|
||||||
.1 tax
|
.1 tax
|
||||||
|
|
||||||
@ -553,7 +551,27 @@ DLG.CTRL.GotoEnd
|
|||||||
|
|
||||||
tay
|
tay
|
||||||
|
|
||||||
jmp SCRN.GotoXY
|
DLG.CTRL.GotoXY
|
||||||
|
txa
|
||||||
|
inc
|
||||||
|
>PUSHA
|
||||||
|
tya
|
||||||
|
inc
|
||||||
|
inc
|
||||||
|
>PUSHA
|
||||||
|
>PUSHBI 2
|
||||||
|
>PUSHW L.MSG.GOTOXY
|
||||||
|
>LDYA LineBufPtr
|
||||||
|
>SYSCALL sprintf
|
||||||
|
|
||||||
|
.2 lda (LineBufPtr)
|
||||||
|
beq .8
|
||||||
|
inc LineBufPtr
|
||||||
|
bne .2
|
||||||
|
inc LineBufPtr+1
|
||||||
|
bra .2
|
||||||
|
|
||||||
|
.8 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DLG.SetOrigin ldy #S.DLG.X
|
DLG.SetOrigin ldy #S.DLG.X
|
||||||
lda (ZPPTR1),y
|
lda (ZPPTR1),y
|
||||||
@ -625,10 +643,6 @@ DLG.CTRL.GetWitdh.OL
|
|||||||
lda (ZPPTR1),y
|
lda (ZPPTR1),y
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
iny
|
|
||||||
lda (ZPPTR1),y
|
|
||||||
bne .1
|
|
||||||
|
|
||||||
txa
|
txa
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@ -647,6 +661,112 @@ DLG.CTRL.GetWitdh.BUT
|
|||||||
txa
|
txa
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
DLG.CTRL.CharIn sty TmpByte A=CtrlID
|
||||||
|
pha
|
||||||
|
|
||||||
|
lda (ZPPTR1),y Ctrl Definition
|
||||||
|
tay
|
||||||
|
lda (ZPPTR1),y Ctrl Type
|
||||||
|
tax
|
||||||
|
pla
|
||||||
|
jmp (J.DLG.CTRL.CharIn,x)
|
||||||
|
*--------------------------------------
|
||||||
|
DLG.CTRL.CharIn.LBL
|
||||||
|
sec
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
|
DLG.CTRL.CharIn.TB
|
||||||
|
cmp #C.DEL
|
||||||
|
beq .5
|
||||||
|
|
||||||
|
pha
|
||||||
|
|
||||||
|
iny
|
||||||
|
iny
|
||||||
|
iny
|
||||||
|
lda (ZPPTR1),y CURPOS
|
||||||
|
iny
|
||||||
|
cmp (ZPPTR1),y MAXCHAR
|
||||||
|
beq .7
|
||||||
|
|
||||||
|
pha
|
||||||
|
|
||||||
|
inc
|
||||||
|
dey
|
||||||
|
sta (ZPPTR1),y CURPOS
|
||||||
|
|
||||||
|
iny
|
||||||
|
iny
|
||||||
|
|
||||||
|
lda (ZPPTR1),y hMem
|
||||||
|
tay
|
||||||
|
lda (pData),y
|
||||||
|
>SYSCALL getmemptr
|
||||||
|
>STYA ZPPTR2
|
||||||
|
|
||||||
|
ply
|
||||||
|
|
||||||
|
pla
|
||||||
|
pha
|
||||||
|
|
||||||
|
sta (ZPPTR2),y
|
||||||
|
iny
|
||||||
|
lda #0
|
||||||
|
sta (ZPPTR2),y
|
||||||
|
|
||||||
|
pla
|
||||||
|
>SYSCALL putchar
|
||||||
|
clc
|
||||||
|
rts
|
||||||
|
|
||||||
|
.5 iny
|
||||||
|
iny
|
||||||
|
iny
|
||||||
|
lda (ZPPTR1),y CURPOS
|
||||||
|
beq .8
|
||||||
|
|
||||||
|
dec
|
||||||
|
sta (ZPPTR1),y
|
||||||
|
pha
|
||||||
|
|
||||||
|
iny
|
||||||
|
iny
|
||||||
|
|
||||||
|
lda (ZPPTR1),y hMem
|
||||||
|
tay
|
||||||
|
lda (pData),y
|
||||||
|
>SYSCALL getmemptr
|
||||||
|
>STYA ZPPTR2
|
||||||
|
|
||||||
|
ply
|
||||||
|
lda #0
|
||||||
|
sta (ZPPTR2),y
|
||||||
|
|
||||||
|
lda #C.DEL
|
||||||
|
>SYSCALL putchar
|
||||||
|
clc
|
||||||
|
rts
|
||||||
|
|
||||||
|
.7 pla
|
||||||
|
|
||||||
|
.8 clc
|
||||||
|
rts
|
||||||
|
|
||||||
|
*--------------------------------------
|
||||||
|
DLG.CTRL.CharIn.OL
|
||||||
|
cmp #C.SPACE
|
||||||
|
bne .8
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.8 clc
|
||||||
|
rts
|
||||||
|
|
||||||
|
*--------------------------------------
|
||||||
|
DLG.CTRL.CharIn.BUT
|
||||||
|
clc
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
DLG.DrawInvBar phy
|
DLG.DrawInvBar phy
|
||||||
jsr SCRN.LineBufInitInv
|
jsr SCRN.LineBufInitInv
|
||||||
|
|
||||||
|
@ -148,6 +148,11 @@ J.DLG.CTRL.GetWitdh
|
|||||||
.DA DLG.CTRL.GetWitdh.TB
|
.DA DLG.CTRL.GetWitdh.TB
|
||||||
.DA DLG.CTRL.GetWitdh.OL
|
.DA DLG.CTRL.GetWitdh.OL
|
||||||
.DA DLG.CTRL.GetWitdh.BUT
|
.DA DLG.CTRL.GetWitdh.BUT
|
||||||
|
J.DLG.CTRL.CharIn
|
||||||
|
.DA DLG.CTRL.CharIn.LBL
|
||||||
|
.DA DLG.CTRL.CharIn.TB
|
||||||
|
.DA DLG.CTRL.CharIn.OL
|
||||||
|
.DA DLG.CTRL.CharIn.BUT
|
||||||
.DA 0
|
.DA 0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.INIT clc
|
CS.INIT clc
|
||||||
@ -412,14 +417,14 @@ MSG.HELP >PSTR "All commands: (* = Not yet implemented)"
|
|||||||
>PSTR " Ctrl-C : Copy selection to clipboard"
|
>PSTR " Ctrl-C : Copy selection to clipboard"
|
||||||
>PSTR " Ctrl-D : Delete selection"
|
>PSTR " Ctrl-D : Delete selection"
|
||||||
>PSTR " Ctrl-E : Mark end of selection"
|
>PSTR " Ctrl-E : Mark end of selection"
|
||||||
>PSTR " Ctrl-F : * Find a string..."
|
>PSTR " Ctrl-F : Find/Replace..."
|
||||||
>PSTR " Ctrl-G : Go to start of current line"
|
>PSTR " Ctrl-G : Go to start of current line"
|
||||||
>PSTR " Ctrl-L : Go to end of current line"
|
>PSTR " Ctrl-L : Go to end of current line"
|
||||||
>PSTR " Ctrl-N : * Find next"
|
>PSTR " Ctrl-N : Find next"
|
||||||
>PSTR " Ctrl-O : Page up"
|
>PSTR " Ctrl-O : Page up"
|
||||||
>PSTR " Ctrl-P : Page down"
|
>PSTR " Ctrl-P : Page down"
|
||||||
>PSTR " Ctrl-Q : Quit"
|
>PSTR " Ctrl-Q : Quit"
|
||||||
>PSTR " Ctrl-R : * Replace found string with..."
|
>PSTR " Ctrl-R : Replace next"
|
||||||
>PSTR " Ctrl-S : Save file..."
|
>PSTR " Ctrl-S : Save file..."
|
||||||
>PSTR " Ctrl-T : Go to top of file"
|
>PSTR " Ctrl-T : Go to top of file"
|
||||||
>PSTR " Ctrl-V : Past clipboard at cursor position"
|
>PSTR " Ctrl-V : Past clipboard at cursor position"
|
||||||
@ -478,17 +483,20 @@ DLG.SAVE.3 .DA #S.DLG.Ctrl.LBL,#2,#5
|
|||||||
|
|
||||||
DLG.SAVE.4 .DA #S.DLG.Ctrl.OL,#2,#6
|
DLG.SAVE.4 .DA #S.DLG.Ctrl.OL,#2,#6
|
||||||
.DA #18 Ctrl-R
|
.DA #18 Ctrl-R
|
||||||
|
.DA #FileType
|
||||||
.DA #0
|
.DA #0
|
||||||
.AZ "TXT/CR"
|
.AZ "TXT/CR"
|
||||||
|
|
||||||
DLG.SAVE.5 .DA #S.DLG.Ctrl.OL,#13,#6
|
DLG.SAVE.5 .DA #S.DLG.Ctrl.OL,#13,#6
|
||||||
.DA #12 Ctrl-L
|
.DA #12 Ctrl-L
|
||||||
.DA #0
|
.DA #FileType
|
||||||
|
.DA #2
|
||||||
.AZ "TXT/CRLF"
|
.AZ "TXT/CRLF"
|
||||||
|
|
||||||
DLG.SAVE.6 .DA #S.DLG.Ctrl.OL,#26,#6
|
DLG.SAVE.6 .DA #S.DLG.Ctrl.OL,#26,#6
|
||||||
.DA #1 Ctrl-A
|
.DA #1 Ctrl-A
|
||||||
.DA #0
|
.DA #FileType
|
||||||
|
.DA #4
|
||||||
.AZ "S-C/ASM"
|
.AZ "S-C/ASM"
|
||||||
|
|
||||||
DLG.SAVE.7 .DA #S.DLG.Ctrl.BUT,#40,#8
|
DLG.SAVE.7 .DA #S.DLG.Ctrl.BUT,#40,#8
|
||||||
@ -500,7 +508,7 @@ DLG.SAVE.8 .DA #S.DLG.Ctrl.BUT,#52,#8
|
|||||||
.AZ " Cancel "
|
.AZ " Cancel "
|
||||||
|
|
||||||
DLG.SAVE.T .AZ "Save As..." Title
|
DLG.SAVE.T .AZ "Save As..." Title
|
||||||
DLG.SAVE.S .AZ "CR:Save, Ctrl-T:Change Type, Ctrl-C:Cancel"
|
DLG.SAVE.S .AZ "CR:Save, Ctrl-R/L/A:Change Type, Ctrl-C:Cancel"
|
||||||
DLG.SAVE.LEN .EQ *-DLG.SAVE
|
DLG.SAVE.LEN .EQ *-DLG.SAVE
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.DUMMY
|
.DUMMY
|
||||||
|
@ -255,14 +255,21 @@ MATH.Dec2ACC32 jsr MATH.ACC32ZERO
|
|||||||
bne .1
|
bne .1
|
||||||
inc ACC32+3
|
inc ACC32+3
|
||||||
bne .1 if 0, overflow!!!
|
bne .1 if 0, overflow!!!
|
||||||
|
|
||||||
.9 lda #E.INUM
|
.9 lda #E.INUM
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.8 tya no digit parsed...error
|
.8 tya no digit parsed...error
|
||||||
beq .9
|
beq .9
|
||||||
|
|
||||||
.80 lda #$FF SELF MODIFIED
|
.80 lda #$FF SELF MODIFIED
|
||||||
bpl .88
|
bpl .88
|
||||||
|
|
||||||
|
phy
|
||||||
jsr MATH.ACC32NEG
|
jsr MATH.ACC32NEG
|
||||||
|
ply
|
||||||
|
|
||||||
.88 clc
|
.88 clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user