2016-01-04 07:25:43 +00:00
|
|
|
|
NEW
|
2018-11-17 17:17:13 +00:00
|
|
|
|
PREFIX
|
2017-12-22 21:24:30 +00:00
|
|
|
|
AUTO 4,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
|
|
|
|
|
***** ^H
|
|
|
|
|
* ^I =
|
|
|
|
|
***** J,K
|
|
|
|
|
* ^L = Go To EOL
|
|
|
|
|
***** ^M
|
|
|
|
|
* ^N = Find Next
|
|
|
|
|
* ^O = Page Up
|
|
|
|
|
* ^P = Page Down
|
|
|
|
|
* ^Q = Quit
|
|
|
|
|
* ^R = Replace...
|
|
|
|
|
* ^S = Save
|
|
|
|
|
* ^T = Go To Top of file
|
|
|
|
|
***** ^U
|
|
|
|
|
* ^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
|
|
|
|
* ^Z = Undo
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.Invalid
|
|
|
|
|
clc
|
|
|
|
|
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
|
|
|
|
|
jsr GotoXY
|
|
|
|
|
|
|
|
|
|
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
|
2016-11-01 16:12:32 +00:00
|
|
|
|
bcs .9
|
2016-01-04 07:25:43 +00:00
|
|
|
|
|
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
|
|
|
|
|
2016-01-21 07:05:23 +00:00
|
|
|
|
.8 jsr SCRN.UpdateStatusBar
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.B jsr BUF.ComputeCOffset
|
|
|
|
|
lda BUF.COffset
|
|
|
|
|
ldy #SelStart
|
|
|
|
|
sta (pData),y
|
|
|
|
|
lda BUF.COffset+1
|
|
|
|
|
iny
|
|
|
|
|
sta (pData),y
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateMain
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
2016-01-29 17:05:08 +00:00
|
|
|
|
Ctrl.C jsr BUF.SelToClipboard
|
|
|
|
|
bcs .9
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.E jsr BUF.ComputeCOffset
|
|
|
|
|
lda BUF.COffset
|
|
|
|
|
ldy #SelEnd
|
|
|
|
|
sta (pData),y
|
|
|
|
|
lda BUF.COffset+1
|
|
|
|
|
iny
|
|
|
|
|
sta (pData),y
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateMain
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.F lda #PromptModeFind
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>STA.G PromptMode
|
2016-01-04 07:25:43 +00:00
|
|
|
|
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateStatusBar
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.G ldy #FileX
|
|
|
|
|
lda (pData),y
|
|
|
|
|
beq .8
|
|
|
|
|
lda #0
|
|
|
|
|
sta (pData),y
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateViewPort
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.BS ldy #FileX
|
|
|
|
|
lda (pData),y
|
|
|
|
|
beq .1 already at begining of line
|
|
|
|
|
dec
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bra .3
|
|
|
|
|
|
|
|
|
|
.1 ldy #FileY+1
|
|
|
|
|
lda (pData),y
|
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
ora (pData),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bne .2
|
|
|
|
|
dex
|
|
|
|
|
.2 dec
|
|
|
|
|
|
|
|
|
|
jsr BUF.GetLineAX
|
|
|
|
|
bcs .8
|
|
|
|
|
tya
|
|
|
|
|
ldy #FileX
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
ldy #FileY
|
|
|
|
|
lda (pData),y
|
|
|
|
|
sbc #1
|
|
|
|
|
sta (pData),y
|
|
|
|
|
iny
|
|
|
|
|
lda (pData),y
|
|
|
|
|
sbc #0
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2016-01-21 07:05:23 +00:00
|
|
|
|
.3 jsr SCRN.UpdateViewPort
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.TAB
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.LF ldy #FileY+1
|
|
|
|
|
lda (pData),y
|
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
lda (pData),y
|
|
|
|
|
inc
|
|
|
|
|
bne .1
|
|
|
|
|
inx
|
|
|
|
|
.1 jsr BUF.GetLineAX
|
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
tya Y = line length
|
|
|
|
|
ldy #FileX
|
|
|
|
|
cmp (pData),y
|
|
|
|
|
bcs .2
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
.2 ldy #FileY
|
|
|
|
|
lda (pData),y
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bne .3
|
|
|
|
|
iny
|
|
|
|
|
lda (pData),y
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2016-01-21 07:05:23 +00:00
|
|
|
|
.3 jsr SCRN.UpdateViewPort
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.VT ldy #FileY+1
|
|
|
|
|
lda (pData),y
|
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
ora (pData),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bne .1
|
|
|
|
|
dex
|
|
|
|
|
.1 dec
|
|
|
|
|
|
|
|
|
|
jsr BUF.GetLineAX
|
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
tya Y = line length
|
|
|
|
|
ldy #FileX
|
|
|
|
|
cmp (pData),y
|
|
|
|
|
bcs .2
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
.2 sec
|
|
|
|
|
ldy #FileY
|
|
|
|
|
lda (pData),y
|
|
|
|
|
sbc #1
|
|
|
|
|
sta (pData),y
|
|
|
|
|
iny
|
|
|
|
|
lda (pData),y
|
|
|
|
|
sbc #0
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateViewPort
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
2016-11-04 16:46:16 +00:00
|
|
|
|
Ctrl.L jsr BUF.GetLine
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
tya Y = line length
|
|
|
|
|
ldy #FileX
|
|
|
|
|
sta (pData),y
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateViewPort
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
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
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
ldy #FileX
|
|
|
|
|
lda #0
|
|
|
|
|
sta (pData),y
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateMain
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
ldy #ViewPortH
|
|
|
|
|
sec
|
|
|
|
|
sbc (pData),y
|
|
|
|
|
pha
|
|
|
|
|
txa
|
|
|
|
|
sbc #0
|
|
|
|
|
bcc .8
|
|
|
|
|
|
|
|
|
|
ldy #FileY+1
|
|
|
|
|
sta (pData),y
|
|
|
|
|
dey
|
|
|
|
|
pla
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
ldy #FileX
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
jsr SCRN.UpdateViewPort
|
|
|
|
|
bcs .9
|
2016-01-04 07:25:43 +00:00
|
|
|
|
rts
|
2016-11-07 15:13:25 +00:00
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
|
|
|
|
|
.8 pla
|
|
|
|
|
jmp Ctrl.T
|
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
|
|
|
|
|
|
|
|
|
|
ldy #ViewPortH
|
2016-01-04 07:25:43 +00:00
|
|
|
|
clc
|
2016-11-07 15:13:25 +00:00
|
|
|
|
adc (pData),y
|
|
|
|
|
|
|
|
|
|
bcc .1
|
|
|
|
|
inx
|
|
|
|
|
|
|
|
|
|
.1 pha
|
|
|
|
|
phx
|
|
|
|
|
|
|
|
|
|
jsr BUF.GetLineAX A,X = FileY+PAGE
|
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
tya Y = line length
|
|
|
|
|
ldy #FileX
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
ldy #FileY+1
|
|
|
|
|
pla
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
dey
|
|
|
|
|
pla
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
jsr SCRN.UpdateViewPort
|
|
|
|
|
bcs .9
|
2016-01-04 07:25:43 +00:00
|
|
|
|
rts
|
2016-11-07 15:13:25 +00:00
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
|
|
|
|
|
.8 pla
|
|
|
|
|
pla
|
|
|
|
|
jmp Ctrl.Y
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.Q lda #$FF
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>STA.G bCANCEL
|
2016-01-04 07:25:43 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.R lda #PromptModeReplace
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>STA.G PromptMode
|
|
|
|
|
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateStatusBar
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Ctrl.S lda #PromptModeSave
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>STA.G PromptMode
|
2016-01-04 07:25:43 +00:00
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>LDA.G hFileName
|
2016-01-04 07:25:43 +00:00
|
|
|
|
beq .2
|
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
2016-01-04 07:25:43 +00:00
|
|
|
|
>STYA ZPPTR1
|
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
ldy #$ff
|
2016-01-04 07:25:43 +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
|
|
|
|
|
|
|
|
|
|
tya
|
|
|
|
|
|
|
|
|
|
.2 >STA.G PromptBufPtr
|
|
|
|
|
|
|
|
|
|
jsr SCRN.UpdateStatusBar
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
2018-11-15 15:04:14 +00:00
|
|
|
|
Ctrl.T >STZ.G FileX
|
|
|
|
|
>STZW.G FileY
|
|
|
|
|
|
2016-02-25 17:02:57 +00:00
|
|
|
|
jsr SCRN.UpdateViewPort
|
|
|
|
|
bcs .9
|
2016-01-04 07:25:43 +00:00
|
|
|
|
rts
|
2016-02-25 17:02:57 +00:00
|
|
|
|
.9 jmp Ctrl.Q
|
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
|
|
|
|
|
|
|
|
|
|
tya Y = line length
|
|
|
|
|
ldy #FileX
|
|
|
|
|
cmp (pData),y
|
|
|
|
|
beq .1 already at end of line
|
|
|
|
|
|
|
|
|
|
lda (pData),y
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bra .3
|
|
|
|
|
|
|
|
|
|
.1 ldy #FileY+1
|
|
|
|
|
lda (pData),y
|
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
lda (pData),y
|
|
|
|
|
inc
|
|
|
|
|
bne .2
|
|
|
|
|
inx
|
|
|
|
|
|
|
|
|
|
.2 jsr BUF.GetLineAX
|
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
ldy #FileY CC
|
|
|
|
|
lda (pData),y
|
|
|
|
|
adc #1
|
|
|
|
|
sta (pData),y
|
|
|
|
|
iny
|
|
|
|
|
lda (pData),y
|
|
|
|
|
adc #0
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
ldy #FileX
|
|
|
|
|
lda #0
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2016-01-21 07:05:23 +00:00
|
|
|
|
.3 jsr SCRN.UpdateViewPort
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
2016-01-29 17:05:08 +00:00
|
|
|
|
Ctrl.V jsr BUF.InsertClipboard
|
|
|
|
|
bcs .9
|
|
|
|
|
jsr SCRN.UpdateMain
|
|
|
|
|
bcs .9
|
|
|
|
|
jsr SCRN.UpdateStatusBar
|
|
|
|
|
bcs .9
|
2016-01-04 07:25:43 +00:00
|
|
|
|
rts
|
2016-01-29 17:05:08 +00:00
|
|
|
|
.9 jmp Ctrl.Q
|
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
|
|
|
|
|
|
|
|
|
|
lda BUF.LOffset
|
|
|
|
|
ldy #SelStart
|
|
|
|
|
sta (pData),y
|
|
|
|
|
lda BUF.LOffset+1
|
|
|
|
|
iny
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
sec +1 for CR
|
|
|
|
|
adc BUF.LOffset
|
|
|
|
|
|
|
|
|
|
ldy #SelEnd
|
|
|
|
|
sta (pData),y
|
|
|
|
|
lda BUF.LOffset+1
|
|
|
|
|
adc #0
|
|
|
|
|
iny
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bra Ctrl.D
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2016-02-25 17:02:57 +00:00
|
|
|
|
Ctrl.X jsr BUF.SelToClipboard
|
2016-11-07 15:13:25 +00:00
|
|
|
|
bcs Ctrl.X.RTS
|
|
|
|
|
|
|
|
|
|
Ctrl.D jsr BUF.DelSel
|
2016-02-25 17:02:57 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
jsr SCRN.UpdateMain
|
|
|
|
|
bcs .9
|
|
|
|
|
jmp SCRN.UpdateStatusBar
|
2016-11-07 15:13:25 +00:00
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
|
|
|
|
|
Ctrl.X.RTS rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2016-11-04 16:46:16 +00:00
|
|
|
|
Ctrl.Y ldy #FileY+1
|
|
|
|
|
lda (pData),y
|
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
lda (pData),y
|
|
|
|
|
|
|
|
|
|
inc
|
|
|
|
|
bne .1
|
|
|
|
|
inx
|
|
|
|
|
|
|
|
|
|
.1 jsr BUF.GetLineAX
|
|
|
|
|
|
|
|
|
|
bcs .2
|
|
|
|
|
|
|
|
|
|
ldy #FileY
|
|
|
|
|
lda (pData),y
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bne Ctrl.Y
|
|
|
|
|
iny
|
|
|
|
|
lda (pData),y
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
bra Ctrl.Y
|
|
|
|
|
|
|
|
|
|
.2 jsr BUF.GetLine Y=linelen
|
|
|
|
|
|
|
|
|
|
tya Y = line length
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>STA.G FileX
|
2016-11-04 16:46:16 +00:00
|
|
|
|
|
|
|
|
|
jsr SCRN.UpdateViewPort
|
|
|
|
|
bcs .9
|
2016-01-04 07:25:43 +00:00
|
|
|
|
rts
|
2016-11-04 16:46:16 +00:00
|
|
|
|
.9 jmp Ctrl.Q
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2017-03-06 16:58:05 +00:00
|
|
|
|
Ctrl.Z clc
|
2016-01-04 07:25:43 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-03-06 16:58:05 +00:00
|
|
|
|
Ctrl.ESC clc
|
2016-01-04 07:25:43 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-11-15 15:04:14 +00:00
|
|
|
|
Prompt.Editor cmp #C.DEL
|
2016-01-04 07:25:43 +00:00
|
|
|
|
beq .4
|
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
cmp #C.SPACE
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .7
|
|
|
|
|
|
|
|
|
|
asl
|
|
|
|
|
tax
|
|
|
|
|
jmp (J.CTRL,x)
|
|
|
|
|
|
2016-01-09 22:33:47 +00:00
|
|
|
|
.4 jsr BUF.Del
|
|
|
|
|
bcs .9
|
2018-11-15 15:04:14 +00:00
|
|
|
|
|
|
|
|
|
cmp #C.CR did we DEL a CR ?
|
2016-01-28 17:03:51 +00:00
|
|
|
|
bne .5
|
2018-11-15 15:04:14 +00:00
|
|
|
|
|
2016-01-28 17:03:51 +00:00
|
|
|
|
jsr SCRN.UpdateMain
|
2016-01-09 22:33:47 +00:00
|
|
|
|
bcs .9
|
2018-11-15 15:04:14 +00:00
|
|
|
|
|
2016-01-28 17:03:51 +00:00
|
|
|
|
bra .6
|
|
|
|
|
|
|
|
|
|
.5 jsr SCRN.UpdateCurrentLine
|
|
|
|
|
bcs .9
|
2018-11-15 15:04:14 +00:00
|
|
|
|
|
2016-01-28 17:03:51 +00:00
|
|
|
|
.6 jsr SCRN.UpdateStatusBar
|
2016-01-09 22:33:47 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
|
|
|
|
|
.7 jsr BUF.InsertA
|
|
|
|
|
bcs .9
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateCurrentLine
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
jsr Ctrl.FS
|
|
|
|
|
bcs .9
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
2018-11-15 15:04:14 +00:00
|
|
|
|
Prompt.Help >STZ.G PromptMode
|
|
|
|
|
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateMain
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateStatusBar
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
rts
|
2018-11-15 15:04:14 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Prompt.Find 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
|
|
|
|
|
|
|
|
|
|
.1 cmp #13
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
.2
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
.1 cmp #13
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
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
|
2016-01-04 07:25:43 +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
|
2016-01-04 07:25:43 +00:00
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>LDYA pData
|
|
|
|
|
>SYSCALL RealPath
|
|
|
|
|
bcs .12
|
2016-09-20 16:00:51 +00:00
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
phx
|
2016-08-17 06:25:58 +00:00
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>LDA.G hFileName
|
|
|
|
|
beq .11
|
|
|
|
|
>SYSCALL FreeMem
|
|
|
|
|
|
|
|
|
|
.11 pla
|
|
|
|
|
>STA.G hFileName
|
2016-01-06 22:07:28 +00:00
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>STZ.G PromptMode
|
2016-01-06 22:07:28 +00:00
|
|
|
|
|
|
|
|
|
jsr SaveFile
|
|
|
|
|
bcc .81
|
2018-11-15 15:04:14 +00:00
|
|
|
|
.12 jsr SCRN.UpdateStatusBarErrA
|
2016-01-09 22:33:47 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
rts
|
2016-01-05 17:04:47 +00:00
|
|
|
|
|
|
|
|
|
.2 cmp #127
|
|
|
|
|
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
|
2018-11-15 15:04:14 +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
|
2018-11-15 15:04:14 +00:00
|
|
|
|
cpy #PromptBufMax
|
2016-01-05 17:04:47 +00:00
|
|
|
|
beq .8
|
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
|
2016-01-04 07:25:43 +00:00
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
|
2016-01-21 07:05:23 +00:00
|
|
|
|
.81 jsr SCRN.UpdateTopBar
|
2016-01-09 22:33:47 +00:00
|
|
|
|
bcs .9
|
2016-01-21 07:05:23 +00:00
|
|
|
|
.80 jsr SCRN.UpdateStatusBar
|
2016-01-05 17:04:47 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
rts
|
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.9 jmp Ctrl.Q
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2018-11-17 17:17:13 +00:00
|
|
|
|
SAVE USR/SRC/BIN/BIN/EDIT.S.CTRL
|
|
|
|
|
LOAD USR/SRC/BIN/BIN/EDIT.S
|
2016-01-04 07:25:43 +00:00
|
|
|
|
ASM
|