2016-01-04 07:25:43 +00:00
|
|
|
|
NEW
|
2019-05-27 06:01:59 +00:00
|
|
|
|
AUTO 3,1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* ^A = Help
|
|
|
|
|
* ^B = Begin Block
|
|
|
|
|
* ^C = Copy Block
|
|
|
|
|
* ^D = Delete Block
|
|
|
|
|
* ^E = End Block
|
|
|
|
|
* ^F = Find...
|
|
|
|
|
* ^G = Go To SOL
|
2019-05-27 15:37:31 +00:00
|
|
|
|
******** ^H = BS
|
|
|
|
|
******** ^I = TAB
|
|
|
|
|
******** ^J = LF
|
|
|
|
|
******** ^K = VT
|
2016-01-04 07:25:43 +00:00
|
|
|
|
* ^L = Go To EOL
|
2019-05-27 15:37:31 +00:00
|
|
|
|
******** ^M = CR
|
2016-01-04 07:25:43 +00:00
|
|
|
|
* ^N = Find Next
|
|
|
|
|
* ^O = Page Up
|
|
|
|
|
* ^P = Page Down
|
|
|
|
|
* ^Q = Quit
|
|
|
|
|
* ^R = Replace...
|
|
|
|
|
* ^S = Save
|
|
|
|
|
* ^T = Go To Top of file
|
2019-05-27 15:37:31 +00:00
|
|
|
|
******** ^U = FS
|
2016-01-04 07:25:43 +00:00
|
|
|
|
* ^V = Paste Block
|
2016-02-25 17:02:57 +00:00
|
|
|
|
* ^W = Erase line
|
2016-01-04 07:25:43 +00:00
|
|
|
|
* ^X = Cut Block
|
2016-02-25 17:02:57 +00:00
|
|
|
|
* ^Y = End Of File
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2019-05-27 15:37:31 +00:00
|
|
|
|
Prompt.Editor cmp #C.DEL
|
|
|
|
|
beq Ctrl.DEL
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-05-27 15:37:31 +00:00
|
|
|
|
cmp #C.SPACE
|
|
|
|
|
bcc .3
|
|
|
|
|
|
|
|
|
|
jsr BUF.InsertA
|
|
|
|
|
bcs .9
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-05-27 15:37:31 +00:00
|
|
|
|
jsr SCRN.UpdateCurrentLine
|
|
|
|
|
bcs .9
|
|
|
|
|
|
2019-11-04 07:21:40 +00:00
|
|
|
|
jmp Ctrl.FS
|
|
|
|
|
|
2019-08-26 06:29:18 +00:00
|
|
|
|
.9 rts
|
2019-05-27 15:37:31 +00:00
|
|
|
|
|
|
|
|
|
.3 asl
|
|
|
|
|
tax
|
|
|
|
|
jmp (J.CTRL,x)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.DEL jsr BUF.ComputeCOffset
|
2019-08-26 06:29:18 +00:00
|
|
|
|
|
2019-05-27 15:37:31 +00:00
|
|
|
|
lda BUF.COffset
|
|
|
|
|
ora BUF.COffset+1 No Backspace possible
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
jsr Ctrl.BS
|
|
|
|
|
bcs .9
|
2019-08-26 09:26:42 +00:00
|
|
|
|
jmp Ctrl.Z
|
2019-05-27 15:37:31 +00:00
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2016-01-04 07:25:43 +00:00
|
|
|
|
Ctrl.Invalid
|
|
|
|
|
clc
|
2019-10-03 06:25:27 +00:00
|
|
|
|
Ctrl.Invalid.RTS
|
2016-01-04 07:25:43 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-11-15 15:04:14 +00:00
|
|
|
|
Ctrl.A lda #PromptModeHelp
|
|
|
|
|
>STA.G PromptMode
|
2016-01-04 07:25:43 +00:00
|
|
|
|
>LDYA L.MSG.HELP
|
|
|
|
|
>STYA ZPPTR1
|
2017-03-06 16:58:05 +00:00
|
|
|
|
stz .1+1
|
|
|
|
|
.1 ldy #0
|
|
|
|
|
ldx #0
|
2019-11-04 07:21:40 +00:00
|
|
|
|
jsr SCRN.GotoXY
|
2017-03-06 16:58:05 +00:00
|
|
|
|
lda (ZPPTR1)
|
2016-10-17 15:47:50 +00:00
|
|
|
|
beq .8
|
2017-08-22 06:37:03 +00:00
|
|
|
|
>PUSHW ZPPTR1
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 2
|
2017-08-22 06:37:03 +00:00
|
|
|
|
>LDYA L.MSG.HELPLINE
|
2018-06-21 15:12:10 +00:00
|
|
|
|
>SYSCALL printf
|
2019-05-29 15:21:14 +00:00
|
|
|
|
bcs Ctrl.Invalid.RTS
|
2017-03-06 16:58:05 +00:00
|
|
|
|
inc .1+1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
lda (ZPPTR1)
|
2017-03-06 16:58:05 +00:00
|
|
|
|
sec
|
2016-01-04 07:25:43 +00:00
|
|
|
|
adc ZPPTR1
|
|
|
|
|
sta ZPPTR1
|
2016-10-17 15:47:50 +00:00
|
|
|
|
bcc .1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
inc ZPPTR1+1
|
|
|
|
|
bra .1
|
2016-10-17 15:47:50 +00:00
|
|
|
|
|
2019-05-29 15:21:14 +00:00
|
|
|
|
.8 jmp SCRN.UpdateStatusBar
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.B jsr BUF.ComputeCOffset
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
lda BUF.COffset
|
|
|
|
|
ldy #SelStart
|
|
|
|
|
sta (pData),y
|
|
|
|
|
lda BUF.COffset+1
|
|
|
|
|
iny
|
|
|
|
|
sta (pData),y
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateMain
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2019-05-29 15:21:14 +00:00
|
|
|
|
Ctrl.C jmp BUF.SelToClipboard
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.E jsr BUF.ComputeCOffset
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
lda BUF.COffset
|
|
|
|
|
ldy #SelEnd
|
|
|
|
|
sta (pData),y
|
|
|
|
|
lda BUF.COffset+1
|
|
|
|
|
iny
|
|
|
|
|
sta (pData),y
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateMain
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.F lda #PromptModeFind
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>STA.G PromptMode
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateStatusBar
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2019-11-04 13:41:58 +00:00
|
|
|
|
Ctrl.G >LDA.G FileX
|
2016-01-04 07:25:43 +00:00
|
|
|
|
beq .8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
lda #0
|
|
|
|
|
sta (pData),y
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateViewPort
|
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-11-04 13:41:58 +00:00
|
|
|
|
Ctrl.BS >LDA.G FileX
|
2019-05-25 19:24:07 +00:00
|
|
|
|
beq .1 already at beginning of line
|
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
dec
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bra .3
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-04 13:41:58 +00:00
|
|
|
|
.1 >LDA.G FileY+1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
ora (pData),y
|
|
|
|
|
beq .8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
lda (pData),y
|
|
|
|
|
bne .2
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
dex
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.2 dec
|
|
|
|
|
jsr BUF.GetLineAX
|
|
|
|
|
bcs .8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
tya
|
2019-11-04 13:41:58 +00:00
|
|
|
|
>STA.G FileX
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
|
|
|
|
>DECW.G FileY
|
|
|
|
|
|
2019-11-04 16:14:25 +00:00
|
|
|
|
.3 jmp SCRN.UpdateViewPort
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-11-04 13:41:58 +00:00
|
|
|
|
Ctrl.TAB jsr BUF.InsertTAB
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
>LDA.G FileX
|
2016-01-04 07:25:43 +00:00
|
|
|
|
clc
|
2019-11-04 13:41:58 +00:00
|
|
|
|
adc #TABLEN
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
>LDA.G CurX
|
|
|
|
|
clc
|
|
|
|
|
adc #TABLEN
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
>SBC.G ScreenX
|
|
|
|
|
>SBC.G ScreenW
|
|
|
|
|
|
|
|
|
|
bcs .8
|
|
|
|
|
jsr SCRN.UpdateCurrentLine
|
|
|
|
|
bcs .9
|
|
|
|
|
jmp SCRN.UpdateStatusBar
|
|
|
|
|
|
|
|
|
|
.8 >ADC.G ScreenX
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
jmp SCRN.UpdateViewPort
|
|
|
|
|
|
|
|
|
|
.9 rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2019-11-04 07:21:40 +00:00
|
|
|
|
Ctrl.LF jsr BUF.GetNextLine
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
tya Y = line length
|
2019-11-04 13:41:58 +00:00
|
|
|
|
>CMP.G FileX
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .2
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
sta (pData),y
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
|
|
|
|
.2 >INCW.G FileY
|
|
|
|
|
|
|
|
|
|
jmp SCRN.UpdateViewPort
|
2019-11-04 16:14:25 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-11-04 13:41:58 +00:00
|
|
|
|
Ctrl.VT >LDA.G FileY+1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
ora (pData),y
|
|
|
|
|
beq .8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
lda (pData),y
|
|
|
|
|
bne .1
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
dex
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.1 dec
|
|
|
|
|
jsr BUF.GetLineAX
|
|
|
|
|
bcs .8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
tya Y = line length
|
2019-11-04 13:41:58 +00:00
|
|
|
|
>CMP.G FileX
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .2
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
sta (pData),y
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
|
|
|
|
.2 >DECW.G FileY
|
|
|
|
|
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateViewPort
|
2019-11-04 13:41:58 +00:00
|
|
|
|
.8
|
|
|
|
|
Ctrl.VT.8 clc
|
2016-01-04 07:25:43 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-11-04 16:46:16 +00:00
|
|
|
|
Ctrl.L jsr BUF.GetLine
|
2019-11-04 13:41:58 +00:00
|
|
|
|
bcs Ctrl.VT.8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
tya Y = line length
|
2019-11-04 13:41:58 +00:00
|
|
|
|
>STA.G FileX
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateViewPort
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2018-11-15 15:04:14 +00:00
|
|
|
|
Ctrl.CR lda #C.CR
|
2016-01-04 07:25:43 +00:00
|
|
|
|
jsr BUF.InsertA
|
|
|
|
|
bcs .9
|
2018-11-15 15:04:14 +00:00
|
|
|
|
|
2019-11-04 07:21:40 +00:00
|
|
|
|
>STZ.G FileX
|
|
|
|
|
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateMain
|
|
|
|
|
|
|
|
|
|
.9 rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.N
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-11-07 15:13:25 +00:00
|
|
|
|
Ctrl.O ldy #FileY+1
|
|
|
|
|
lda (pData),y
|
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
lda (pData),y
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2016-11-07 15:13:25 +00:00
|
|
|
|
ldy #ViewPortH
|
|
|
|
|
sec
|
|
|
|
|
sbc (pData),y
|
|
|
|
|
pha
|
|
|
|
|
txa
|
|
|
|
|
sbc #0
|
|
|
|
|
bcc .8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-11-07 15:13:25 +00:00
|
|
|
|
ldy #FileY+1
|
|
|
|
|
sta (pData),y
|
|
|
|
|
dey
|
|
|
|
|
pla
|
|
|
|
|
sta (pData),y
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
|
|
|
|
>STZ.G FileX
|
2016-11-07 15:13:25 +00:00
|
|
|
|
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateViewPort
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-11-07 15:13:25 +00:00
|
|
|
|
.8 pla
|
2019-11-06 06:42:14 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.T jsr SCRN.Home
|
|
|
|
|
jmp SCRN.UpdateViewPort
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2016-11-07 15:13:25 +00:00
|
|
|
|
Ctrl.P ldy #FileY+1
|
|
|
|
|
lda (pData),y
|
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
lda (pData),y
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2016-11-07 15:13:25 +00:00
|
|
|
|
ldy #ViewPortH
|
2016-01-04 07:25:43 +00:00
|
|
|
|
clc
|
2016-11-07 15:13:25 +00:00
|
|
|
|
adc (pData),y
|
|
|
|
|
bcc .1
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-11-07 15:13:25 +00:00
|
|
|
|
inx
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-11-07 15:13:25 +00:00
|
|
|
|
.1 pha
|
|
|
|
|
phx
|
|
|
|
|
jsr BUF.GetLineAX A,X = FileY+PAGE
|
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
tya Y = line length
|
2019-11-04 13:41:58 +00:00
|
|
|
|
>STA.G FileX
|
2016-11-07 15:13:25 +00:00
|
|
|
|
|
|
|
|
|
ldy #FileY+1
|
|
|
|
|
pla
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
dey
|
|
|
|
|
pla
|
|
|
|
|
sta (pData),y
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateViewPort
|
2016-11-07 15:13:25 +00:00
|
|
|
|
|
|
|
|
|
.8 pla
|
|
|
|
|
pla
|
2019-11-06 06:42:14 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.Y jsr BUF.GetNextLine
|
|
|
|
|
bcs .1
|
|
|
|
|
|
|
|
|
|
>INCW.G FileY
|
|
|
|
|
bra Ctrl.Y
|
|
|
|
|
|
|
|
|
|
.1 jsr BUF.GetLine
|
|
|
|
|
|
|
|
|
|
tya Y = line length
|
|
|
|
|
>STA.G FileX
|
|
|
|
|
|
|
|
|
|
jmp SCRN.UpdateViewPort
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2019-11-04 07:21:40 +00:00
|
|
|
|
Ctrl.R lda #PromptModeReplace
|
|
|
|
|
>STA.G PromptMode
|
|
|
|
|
jmp SCRN.UpdateStatusBar
|
|
|
|
|
*--------------------------------------
|
2016-01-04 07:25:43 +00:00
|
|
|
|
Ctrl.Q lda #$FF
|
2019-11-04 13:41:58 +00:00
|
|
|
|
>STA.G bExit
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
|
|
|
|
>LDA.G bSaved
|
|
|
|
|
beq Ctrl.S
|
2016-01-04 07:25:43 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.S lda #PromptModeSave
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>STA.G PromptMode
|
|
|
|
|
>LDA.G hFileName
|
2016-01-04 07:25:43 +00:00
|
|
|
|
beq .2
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
2016-01-04 07:25:43 +00:00
|
|
|
|
>STYA ZPPTR1
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
ldy #$ff
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
.1 iny
|
|
|
|
|
lda (ZPPTR1),y
|
2016-01-04 07:25:43 +00:00
|
|
|
|
sta (pData),y
|
2018-11-15 15:04:14 +00:00
|
|
|
|
bne .1
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
tya
|
|
|
|
|
.2 >STA.G PromptBufPtr
|
|
|
|
|
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateStatusBar
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2016-11-04 16:46:16 +00:00
|
|
|
|
Ctrl.FS jsr BUF.GetLine
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
tya Y = line length
|
2019-11-04 13:41:58 +00:00
|
|
|
|
>CMP.G FileX
|
2016-01-04 07:25:43 +00:00
|
|
|
|
beq .1 already at end of line
|
|
|
|
|
|
|
|
|
|
lda (pData),y
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bra .3
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
|
|
|
|
.1 jsr BUF.GetNextLine
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
|
|
|
|
>INCW.G FileY
|
|
|
|
|
|
|
|
|
|
>STZ.G FileX
|
|
|
|
|
|
2019-11-04 16:14:25 +00:00
|
|
|
|
.3 jmp SCRN.UpdateViewPort
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.8 clc
|
2019-11-04 16:14:25 +00:00
|
|
|
|
.9 rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2016-01-29 17:05:08 +00:00
|
|
|
|
Ctrl.V jsr BUF.InsertClipboard
|
|
|
|
|
bcs .9
|
|
|
|
|
jsr SCRN.UpdateMain
|
|
|
|
|
bcs .9
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateStatusBar
|
|
|
|
|
|
|
|
|
|
.9 rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2016-11-07 15:13:25 +00:00
|
|
|
|
Ctrl.W jsr BUF.ComputeCOffset Y=line len
|
|
|
|
|
phy
|
2019-05-29 15:21:14 +00:00
|
|
|
|
|
2016-11-07 15:13:25 +00:00
|
|
|
|
lda BUF.LOffset
|
|
|
|
|
ldy #SelStart
|
|
|
|
|
sta (pData),y
|
|
|
|
|
lda BUF.LOffset+1
|
|
|
|
|
iny
|
|
|
|
|
sta (pData),y
|
2019-09-06 12:50:27 +00:00
|
|
|
|
|
|
|
|
|
ply Get back line len
|
2019-05-29 15:21:14 +00:00
|
|
|
|
clc
|
|
|
|
|
lda (BufPtr),y
|
2019-09-06 12:50:27 +00:00
|
|
|
|
beq .1 last line \0 ending
|
|
|
|
|
sec delete CR
|
2019-05-29 15:21:14 +00:00
|
|
|
|
.1 tya
|
|
|
|
|
|
2016-11-07 15:13:25 +00:00
|
|
|
|
adc BUF.LOffset
|
|
|
|
|
ldy #SelEnd
|
|
|
|
|
sta (pData),y
|
|
|
|
|
lda BUF.LOffset+1
|
|
|
|
|
adc #0
|
|
|
|
|
iny
|
|
|
|
|
sta (pData),y
|
2019-05-29 15:21:14 +00:00
|
|
|
|
bra Ctrl.D
|
2019-08-26 09:26:42 +00:00
|
|
|
|
.8
|
|
|
|
|
Ctrl.W.RTS rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2016-02-25 17:02:57 +00:00
|
|
|
|
Ctrl.X jsr BUF.SelToClipboard
|
2019-08-26 09:26:42 +00:00
|
|
|
|
bcs Ctrl.W.RTS
|
2016-11-07 15:13:25 +00:00
|
|
|
|
|
|
|
|
|
Ctrl.D jsr BUF.DelSel
|
2019-08-26 09:26:42 +00:00
|
|
|
|
bcs Ctrl.W.RTS
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jsr SCRN.CursorAdjust
|
2016-02-25 17:02:57 +00:00
|
|
|
|
jsr SCRN.UpdateMain
|
2019-08-26 09:26:42 +00:00
|
|
|
|
bcs Ctrl.W.RTS
|
2019-05-29 15:21:14 +00:00
|
|
|
|
|
2016-02-25 17:02:57 +00:00
|
|
|
|
jmp SCRN.UpdateStatusBar
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2019-05-27 15:37:31 +00:00
|
|
|
|
Ctrl.Z jsr BUF.ComputeCOffset
|
2019-05-25 19:24:07 +00:00
|
|
|
|
|
2019-05-27 15:37:31 +00:00
|
|
|
|
lda BUF.COffset
|
2019-11-06 13:14:42 +00:00
|
|
|
|
eor FileLen
|
2019-08-26 09:26:42 +00:00
|
|
|
|
bne .1
|
2019-05-27 15:37:31 +00:00
|
|
|
|
lda BUF.COffset+1
|
2019-11-06 13:14:42 +00:00
|
|
|
|
eor FileLen+1
|
2019-08-26 09:26:42 +00:00
|
|
|
|
bne .1
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-05-27 15:37:31 +00:00
|
|
|
|
clc
|
2019-08-26 09:26:42 +00:00
|
|
|
|
rts
|
2019-05-27 15:37:31 +00:00
|
|
|
|
|
2019-08-26 09:26:42 +00:00
|
|
|
|
.1 jsr BUF.DelCharAtCursor
|
|
|
|
|
bcs Ctrl.W.RTS
|
2018-11-15 15:04:14 +00:00
|
|
|
|
|
|
|
|
|
cmp #C.CR did we DEL a CR ?
|
2019-08-26 09:26:42 +00:00
|
|
|
|
beq Prompt.Help.Upd yes repaint whole screen
|
2018-11-15 15:04:14 +00:00
|
|
|
|
|
2019-08-26 09:26:42 +00:00
|
|
|
|
jsr SCRN.UpdateCurrentLine
|
|
|
|
|
bcs Ctrl.W.RTS
|
2019-05-27 15:37:31 +00:00
|
|
|
|
jmp SCRN.UpdateStatusBar
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2018-11-15 15:04:14 +00:00
|
|
|
|
Prompt.Help >STZ.G PromptMode
|
|
|
|
|
|
2019-09-06 12:50:27 +00:00
|
|
|
|
Prompt.Help.Upd jsr SCRN.UpdateStatusBar
|
2019-10-18 15:07:14 +00:00
|
|
|
|
bcs Prompt.Find.RTS
|
2019-09-06 12:50:27 +00:00
|
|
|
|
jmp SCRN.UpdateMain
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
Prompt.Find cmp #3
|
|
|
|
|
bne .1
|
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>STZ.G PromptMode
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateStatusBar
|
2019-08-26 09:26:42 +00:00
|
|
|
|
.1 cmp #C.CR
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bne .2
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.2
|
2016-01-04 07:25:43 +00:00
|
|
|
|
clc
|
2019-10-18 15:07:14 +00:00
|
|
|
|
.9
|
|
|
|
|
Prompt.Find.RTS rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
Prompt.Replace cmp #3
|
|
|
|
|
bne .1
|
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>STZ.G PromptMode
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateStatusBar
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
rts
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-08-26 09:26:42 +00:00
|
|
|
|
.1 cmp #C.CR
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bne .2
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.2
|
2016-01-04 07:25:43 +00:00
|
|
|
|
|
|
|
|
|
clc
|
2019-05-29 15:21:14 +00:00
|
|
|
|
|
|
|
|
|
.9 rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2018-11-15 15:04:14 +00:00
|
|
|
|
Prompt.Save cmp #3 Ctrl-C
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>STZ.G PromptMode
|
2016-01-05 17:04:47 +00:00
|
|
|
|
bra .80
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
.1 cmp #C.CR
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bne .2
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>LDA.G PromptBufPtr
|
2016-01-05 17:04:47 +00:00
|
|
|
|
beq .8
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>LDYA pData
|
|
|
|
|
>SYSCALL RealPath
|
|
|
|
|
bcs .12
|
|
|
|
|
phx
|
|
|
|
|
>LDA.G hFileName
|
|
|
|
|
beq .11
|
|
|
|
|
>SYSCALL FreeMem
|
|
|
|
|
|
|
|
|
|
.11 pla
|
|
|
|
|
>STA.G hFileName
|
|
|
|
|
>STZ.G PromptMode
|
2016-01-06 22:07:28 +00:00
|
|
|
|
jsr SaveFile
|
|
|
|
|
bcc .81
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
|
|
|
|
.12 jsr SCRN.LineBufInit
|
|
|
|
|
jmp SCRN.UpdateStatusBarErrA
|
|
|
|
|
|
2019-08-26 09:26:42 +00:00
|
|
|
|
.2 cmp #C.DEL
|
2016-01-05 17:04:47 +00:00
|
|
|
|
bne .3
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>LDA.G PromptBufPtr
|
2016-01-05 17:04:47 +00:00
|
|
|
|
beq .8
|
|
|
|
|
dec
|
2018-11-15 15:04:14 +00:00
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
tay
|
|
|
|
|
lda #0
|
|
|
|
|
sta (pData),y
|
2016-01-05 17:04:47 +00:00
|
|
|
|
bra .80
|
2018-11-15 15:04:14 +00:00
|
|
|
|
.3 cmp #C.SPACE
|
2016-01-05 17:04:47 +00:00
|
|
|
|
bcc .8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-05 17:04:47 +00:00
|
|
|
|
pha
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>LDA.G PromptBufPtr
|
2016-01-05 17:04:47 +00:00
|
|
|
|
tay
|
|
|
|
|
pla
|
2019-11-04 13:41:58 +00:00
|
|
|
|
cpy #PROMPTBUFMAX
|
2016-01-05 17:04:47 +00:00
|
|
|
|
beq .8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
sta (pData),y
|
2016-01-05 17:04:47 +00:00
|
|
|
|
iny
|
2018-11-15 15:04:14 +00:00
|
|
|
|
lda #0
|
2016-01-05 17:04:47 +00:00
|
|
|
|
sta (pData),y
|
|
|
|
|
tya
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>STA.G PromptBufPtr
|
2016-01-05 17:04:47 +00:00
|
|
|
|
bra .80
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.8 clc
|
2019-10-03 06:25:27 +00:00
|
|
|
|
rts
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-21 07:05:23 +00:00
|
|
|
|
.81 jsr SCRN.UpdateTopBar
|
2016-01-09 22:33:47 +00:00
|
|
|
|
bcs .9
|
2019-05-29 15:21:14 +00:00
|
|
|
|
.80 jmp SCRN.UpdateStatusBar
|
|
|
|
|
|
|
|
|
|
.9 rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2019-02-01 16:32:29 +00:00
|
|
|
|
SAVE USR/SRC/BIN/EDIT.S.CTRL
|
|
|
|
|
LOAD USR/SRC/BIN/EDIT.S
|
2016-01-04 07:25:43 +00:00
|
|
|
|
ASM
|