2015-08-05 20:38:05 +00:00
|
|
|
|
NEW
|
2019-05-27 06:01:59 +00:00
|
|
|
|
AUTO 3,1
|
2015-08-05 20:38:05 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2018-07-23 15:28:42 +00:00
|
|
|
|
.TF BIN/EDIT
|
2015-08-05 20:38:05 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-23 15:28:42 +00:00
|
|
|
|
.INB INC/MACROS.I
|
|
|
|
|
.INB INC/A2OSX.I
|
2018-10-08 05:55:28 +00:00
|
|
|
|
.INB INC/MLI.I
|
2015-08-05 20:38:05 +00:00
|
|
|
|
*--------------------------------------
|
2019-03-26 12:17:47 +00:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR ZPBIN
|
|
|
|
|
ZS.START
|
|
|
|
|
BufPtr .BS 2
|
|
|
|
|
BufPtrBackup .BS 2
|
|
|
|
|
ClipboardPtr .BS 2
|
2019-05-27 06:01:59 +00:00
|
|
|
|
LineBufPtr .BS 2
|
2019-05-24 15:26:07 +00:00
|
|
|
|
|
2019-03-26 12:17:47 +00:00
|
|
|
|
BUF.LOffset .BS 2
|
|
|
|
|
BUF.COffset .BS 2
|
|
|
|
|
BUF.TmpLine1 .BS 2
|
|
|
|
|
BUF.TmpLine2 .BS 2
|
2019-05-27 06:01:59 +00:00
|
|
|
|
|
2019-05-27 15:37:31 +00:00
|
|
|
|
BufLen .BS 2
|
2019-05-27 06:01:59 +00:00
|
|
|
|
SelLen .BS 2
|
2019-03-26 12:17:47 +00:00
|
|
|
|
bNotRepaint .BS 1
|
|
|
|
|
bSelected .BS 1
|
2019-05-27 15:37:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ZPPTR1 .BS 2
|
|
|
|
|
TmpLen .BS 2
|
|
|
|
|
TmpIndex .BS 2
|
|
|
|
|
TmpCount .BS 1
|
2019-05-27 06:01:59 +00:00
|
|
|
|
TmpByte .BS 1
|
|
|
|
|
|
2019-03-26 12:17:47 +00:00
|
|
|
|
ZS.END .ED
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2018-11-15 15:04:14 +00:00
|
|
|
|
PromptBufMax .EQ 64
|
2016-01-04 07:25:43 +00:00
|
|
|
|
PromptModeHelp .EQ 2
|
|
|
|
|
PromptModeFind .EQ 4
|
|
|
|
|
PromptModeReplace .EQ 6
|
|
|
|
|
PromptModeSave .EQ 8
|
2015-08-05 20:38:05 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* File Header (16 Bytes)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
2018-10-29 08:41:10 +00:00
|
|
|
|
.DA #0
|
|
|
|
|
.DA #0
|
2017-09-22 06:38:22 +00:00
|
|
|
|
.DA CS.END-CS.START CS
|
|
|
|
|
.DA DS.END-DS.START DS
|
2019-05-24 15:26:07 +00:00
|
|
|
|
.DA #64 SS
|
2019-03-26 12:17:47 +00:00
|
|
|
|
.DA #ZS.END-ZS.START Zero Page Size
|
2015-08-05 20:38:05 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
2019-10-03 06:25:27 +00:00
|
|
|
|
*--------------------------------------
|
2015-08-05 20:38:05 +00:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
2016-01-04 07:25:43 +00:00
|
|
|
|
L.SEQ.DETECT .DA SEQ.DETECT
|
|
|
|
|
L.SEQ.INIT .DA SEQ.INIT
|
|
|
|
|
L.SEQ.RESET .DA SEQ.RESET
|
2017-03-06 16:58:05 +00:00
|
|
|
|
L.SEQ.SCROLLUP .DA SEQ.SCROLLUP
|
|
|
|
|
L.SEQ.SCROLLDN .DA SEQ.SCROLLDN
|
2015-11-29 22:19:10 +00:00
|
|
|
|
L.SEQ.INV .DA SEQ.INV
|
|
|
|
|
L.SEQ.NORM .DA SEQ.NORM
|
2016-01-04 07:25:43 +00:00
|
|
|
|
L.SEQ.CEOL .DA SEQ.CEOL
|
2015-11-29 22:19:10 +00:00
|
|
|
|
L.MSG.TOPBAR .DA MSG.TOPBAR
|
2016-01-04 07:25:43 +00:00
|
|
|
|
L.MSG.STATUSBAR .DA MSG.STATUSBAR
|
|
|
|
|
L.MSG.STATUSBAR.H .DA MSG.STATUSBAR.H
|
|
|
|
|
L.MSG.STATUSBAR.F .DA MSG.STATUSBAR.F
|
|
|
|
|
L.MSG.STATUSBAR.R .DA MSG.STATUSBAR.R
|
|
|
|
|
L.MSG.STATUSBAR.S .DA MSG.STATUSBAR.S
|
2016-01-06 22:07:28 +00:00
|
|
|
|
L.MSG.STATUSBAR.E .DA MSG.STATUSBAR.E
|
2015-11-29 22:19:10 +00:00
|
|
|
|
L.MSG.NEWFILE .DA MSG.NEWFILE
|
2016-01-04 07:25:43 +00:00
|
|
|
|
L.MSG.GOTOXY .DA MSG.GOTOXY
|
2017-08-22 06:37:03 +00:00
|
|
|
|
L.MSG.HELPLINE .DA MSG.HELPLINE
|
2016-01-04 07:25:43 +00:00
|
|
|
|
L.MSG.HELP .DA MSG.HELP
|
|
|
|
|
J.PROMPT .DA Prompt.Editor
|
|
|
|
|
.DA Prompt.Help
|
|
|
|
|
.DA Prompt.Find
|
|
|
|
|
.DA Prompt.Replace
|
|
|
|
|
.DA Prompt.Save
|
|
|
|
|
J.CTRL .DA Ctrl.Invalid
|
|
|
|
|
.DA Ctrl.A
|
|
|
|
|
.DA Ctrl.B
|
|
|
|
|
.DA Ctrl.C
|
|
|
|
|
.DA Ctrl.D
|
|
|
|
|
.DA Ctrl.E
|
|
|
|
|
.DA Ctrl.F
|
|
|
|
|
.DA Ctrl.G
|
|
|
|
|
.DA Ctrl.BS
|
|
|
|
|
.DA Ctrl.TAB
|
|
|
|
|
.DA Ctrl.LF
|
|
|
|
|
.DA Ctrl.VT
|
|
|
|
|
.DA Ctrl.L
|
|
|
|
|
.DA Ctrl.CR
|
|
|
|
|
.DA Ctrl.N
|
|
|
|
|
.DA Ctrl.O
|
|
|
|
|
.DA Ctrl.P
|
|
|
|
|
.DA Ctrl.Q
|
|
|
|
|
.DA Ctrl.R
|
|
|
|
|
.DA Ctrl.S
|
|
|
|
|
.DA Ctrl.T
|
|
|
|
|
.DA Ctrl.FS
|
|
|
|
|
.DA Ctrl.V
|
|
|
|
|
.DA Ctrl.W
|
|
|
|
|
.DA Ctrl.X
|
|
|
|
|
.DA Ctrl.Y
|
|
|
|
|
.DA Ctrl.Z
|
2019-05-27 15:37:31 +00:00
|
|
|
|
.DA Ctrl.Invalid
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.DA Ctrl.Invalid
|
|
|
|
|
.DA Ctrl.Invalid
|
|
|
|
|
.DA Ctrl.Invalid
|
|
|
|
|
.DA Ctrl.Invalid
|
2015-08-05 20:38:05 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2018-10-29 08:41:10 +00:00
|
|
|
|
CS.INIT clc
|
|
|
|
|
rts
|
2015-08-05 20:38:05 +00:00
|
|
|
|
*--------------------------------------
|
2018-08-22 15:23:27 +00:00
|
|
|
|
CS.RUN >PUSHBI 0
|
|
|
|
|
>LDYA L.SEQ.DETECT
|
2018-08-23 20:38:32 +00:00
|
|
|
|
>SYSCALL printf Send Query for term W & H
|
2018-10-29 08:41:10 +00:00
|
|
|
|
bcs CS.RUN.RTS
|
2019-02-20 16:07:43 +00:00
|
|
|
|
.1 >SYSCALL GetChar
|
|
|
|
|
bcs CS.RUN.RTS
|
2017-01-23 07:16:06 +00:00
|
|
|
|
jsr CharIn
|
2018-08-23 20:38:32 +00:00
|
|
|
|
>LDA.G ScreenW Wait for Response from terminal for W & H
|
2016-01-04 07:25:43 +00:00
|
|
|
|
beq .1
|
2018-10-29 08:41:10 +00:00
|
|
|
|
lda #1
|
|
|
|
|
>SYSCALL ArgV
|
|
|
|
|
bcs .2 No arg, new file....
|
|
|
|
|
>SYSCALL RealPath
|
|
|
|
|
txa
|
|
|
|
|
>STA.G hFileName
|
|
|
|
|
jsr LoadFile
|
|
|
|
|
bcc .3 if CS, Failed to load file, keep name, but new file....
|
2019-05-27 06:01:59 +00:00
|
|
|
|
|
|
|
|
|
cmp #E.OOM
|
|
|
|
|
beq CS.RUN.RTS
|
2018-10-29 08:41:10 +00:00
|
|
|
|
.2 >LDYAI 1 buffer size = 0 (+ 1 for ending 0)
|
|
|
|
|
>SYSCALL GetMem0
|
|
|
|
|
bcs CS.RUN.RTS
|
|
|
|
|
txa
|
2019-05-27 15:37:31 +00:00
|
|
|
|
>STA.G hBuffer BufLen already set to 0
|
2018-10-29 08:41:10 +00:00
|
|
|
|
.3 lda #$ff
|
|
|
|
|
>STA.G bSaved
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.Init
|
2019-05-27 06:01:59 +00:00
|
|
|
|
bcs CS.RUN.RTS
|
2019-02-20 16:07:43 +00:00
|
|
|
|
CS.RUN.LOOP >SYSCALL GetChar
|
2019-05-27 06:01:59 +00:00
|
|
|
|
bcs CS.RUN.RTS I/O error
|
2019-05-27 15:37:31 +00:00
|
|
|
|
jsr CharIn
|
2019-05-29 15:21:14 +00:00
|
|
|
|
bcs .9
|
2018-10-29 08:41:10 +00:00
|
|
|
|
>LDA.G bCancel
|
|
|
|
|
bpl CS.RUN.LOOP
|
|
|
|
|
|
2019-05-29 15:21:14 +00:00
|
|
|
|
lda #0
|
|
|
|
|
.9 pha
|
2018-10-29 08:41:10 +00:00
|
|
|
|
>PUSHBI 0
|
|
|
|
|
>LDYA L.SEQ.RESET
|
|
|
|
|
>SYSCALL printf
|
2019-05-29 15:21:14 +00:00
|
|
|
|
pla
|
2019-02-20 16:07:43 +00:00
|
|
|
|
sec
|
2018-10-29 08:41:10 +00:00
|
|
|
|
CS.RUN.RTS rts
|
2015-08-05 20:38:05 +00:00
|
|
|
|
*--------------------------------------
|
2017-01-23 07:16:06 +00:00
|
|
|
|
CS.DOEVENT sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-05-27 06:01:59 +00:00
|
|
|
|
CS.QUIT ldy #hLineBuffer
|
|
|
|
|
jsr .8
|
|
|
|
|
|
|
|
|
|
ldy #hBuffer
|
2018-08-23 20:38:32 +00:00
|
|
|
|
jsr .8
|
|
|
|
|
ldy #hBufferBackup
|
|
|
|
|
jsr .8
|
|
|
|
|
ldy #hClipBoard
|
|
|
|
|
jsr .8
|
2017-01-23 07:16:06 +00:00
|
|
|
|
|
2018-08-23 20:38:32 +00:00
|
|
|
|
ldy #hFileName
|
2018-08-24 12:40:19 +00:00
|
|
|
|
.8 lda (pData),y
|
|
|
|
|
beq .9
|
|
|
|
|
>SYSCALL FreeMem
|
2019-05-31 20:04:41 +00:00
|
|
|
|
.9 clc
|
|
|
|
|
rts
|
2017-01-23 07:16:06 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CharIn tax
|
2017-03-03 16:37:15 +00:00
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>LDA.G bEscMode
|
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
asl
|
|
|
|
|
txa
|
2017-03-06 16:58:05 +00:00
|
|
|
|
bcc .1 Not in ESC mode
|
2016-01-04 07:25:43 +00:00
|
|
|
|
cmp #'['
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
ldy #EscBuffer
|
|
|
|
|
lda (pData),y
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
clc
|
|
|
|
|
adc #EscBuffer
|
|
|
|
|
tay
|
|
|
|
|
txa
|
2015-08-05 20:38:05 +00:00
|
|
|
|
sta (pData),y
|
2016-01-04 07:25:43 +00:00
|
|
|
|
cmp #64
|
|
|
|
|
|
|
|
|
|
bcc .8
|
2017-01-23 07:16:06 +00:00
|
|
|
|
jsr CharIn.Esc
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .8 Not translated, exit
|
2018-11-15 15:04:14 +00:00
|
|
|
|
.1 cmp #C.ESC
|
2017-03-06 16:58:05 +00:00
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
lda #$ff
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>STA.G bEscMode
|
2017-03-06 16:58:05 +00:00
|
|
|
|
inc
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>STA.G EscBuffer
|
2017-03-06 16:58:05 +00:00
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
.2 pha
|
2018-11-15 15:04:14 +00:00
|
|
|
|
>LDA.G PromptMode
|
2016-01-04 07:25:43 +00:00
|
|
|
|
tax
|
|
|
|
|
pla
|
|
|
|
|
jmp (J.PROMPT,x)
|
2015-08-05 20:38:05 +00:00
|
|
|
|
*--------------------------------------
|
2018-11-15 15:04:14 +00:00
|
|
|
|
CharIn.Esc >STZ.G bEscMode
|
2016-01-04 07:25:43 +00:00
|
|
|
|
ldy #EscBuffer
|
2015-11-22 22:30:06 +00:00
|
|
|
|
lda (pData),y
|
2016-01-04 07:25:43 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #EscBuffer
|
|
|
|
|
tay
|
2015-11-29 22:19:10 +00:00
|
|
|
|
lda (pData),y
|
2016-01-04 07:25:43 +00:00
|
|
|
|
ldx EscChars
|
|
|
|
|
.1 cmp EscChars,x
|
2017-03-06 16:58:05 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
beq .2
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
cmp #'R' Response to cursor position query?
|
|
|
|
|
beq .3
|
|
|
|
|
sec
|
2015-08-05 20:38:05 +00:00
|
|
|
|
rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.2 lda EscAscii,x
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2016-01-04 22:15:29 +00:00
|
|
|
|
.3 stz TmpByte
|
|
|
|
|
ldy #EscBuffer+1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.4 lda (pData),y
|
|
|
|
|
cmp #';'
|
|
|
|
|
beq .5
|
|
|
|
|
and #$0f
|
|
|
|
|
pha
|
2016-01-04 22:15:29 +00:00
|
|
|
|
lda TmpByte
|
2016-01-04 07:25:43 +00:00
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
clc
|
2016-01-04 22:15:29 +00:00
|
|
|
|
adc TmpByte
|
2016-01-04 07:25:43 +00:00
|
|
|
|
asl
|
2016-01-04 22:15:29 +00:00
|
|
|
|
sta TmpByte
|
2016-01-04 07:25:43 +00:00
|
|
|
|
pla
|
|
|
|
|
clc
|
2016-01-04 22:15:29 +00:00
|
|
|
|
adc TmpByte
|
|
|
|
|
sta TmpByte
|
2016-01-04 07:25:43 +00:00
|
|
|
|
iny
|
|
|
|
|
bra .4
|
|
|
|
|
.5 phy
|
2016-11-07 15:13:25 +00:00
|
|
|
|
|
2016-01-04 22:15:29 +00:00
|
|
|
|
lda TmpByte
|
2016-01-04 07:25:43 +00:00
|
|
|
|
ldy #ScreenH
|
2015-11-29 22:19:10 +00:00
|
|
|
|
sta (pData),y
|
2016-11-07 15:13:25 +00:00
|
|
|
|
dec Remove 2 (top & status bar) for viewportH
|
|
|
|
|
dec
|
|
|
|
|
ldy #ViewPortH
|
|
|
|
|
sta (pData),y
|
|
|
|
|
dec
|
|
|
|
|
ldy #ViewPortHm1 Remove 1 more to store offsert to last line of viewport
|
|
|
|
|
sta (pData),y
|
2016-01-04 07:25:43 +00:00
|
|
|
|
ply
|
2016-01-04 22:15:29 +00:00
|
|
|
|
stz TmpByte
|
|
|
|
|
iny
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.6 lda (pData),y
|
|
|
|
|
cmp #'R'
|
|
|
|
|
beq .7
|
|
|
|
|
and #$0f
|
|
|
|
|
pha
|
2016-01-04 22:15:29 +00:00
|
|
|
|
lda TmpByte
|
2016-01-04 07:25:43 +00:00
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
clc
|
2016-01-04 22:15:29 +00:00
|
|
|
|
adc TmpByte
|
2016-01-04 07:25:43 +00:00
|
|
|
|
asl
|
2016-01-04 22:15:29 +00:00
|
|
|
|
sta TmpByte
|
2016-01-04 07:25:43 +00:00
|
|
|
|
pla
|
|
|
|
|
clc
|
2016-01-04 22:15:29 +00:00
|
|
|
|
adc TmpByte
|
|
|
|
|
sta TmpByte
|
2016-01-04 07:25:43 +00:00
|
|
|
|
iny
|
|
|
|
|
bra .6
|
2016-01-04 22:15:29 +00:00
|
|
|
|
.7 lda TmpByte
|
2016-01-04 07:25:43 +00:00
|
|
|
|
ldy #ScreenW
|
2015-11-29 22:19:10 +00:00
|
|
|
|
sta (pData),y
|
2017-03-04 08:30:09 +00:00
|
|
|
|
sec
|
2016-01-04 07:25:43 +00:00
|
|
|
|
rts
|
2015-08-05 20:38:05 +00:00
|
|
|
|
*--------------------------------------
|
2019-06-07 15:02:51 +00:00
|
|
|
|
LoadFile >PUSHWZ Aux type
|
2018-10-02 15:52:30 +00:00
|
|
|
|
>PUSHBI S.FI.T.TXT
|
|
|
|
|
>PUSHBI O.RDONLY
|
2018-08-23 20:38:32 +00:00
|
|
|
|
>LDA.G hFileName
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
2019-03-26 12:17:47 +00:00
|
|
|
|
>SYSCALL LoadTXTFile
|
2016-09-20 16:00:51 +00:00
|
|
|
|
bcs .9
|
2019-05-27 06:01:59 +00:00
|
|
|
|
|
2016-09-20 16:00:51 +00:00
|
|
|
|
txa
|
2018-08-23 20:38:32 +00:00
|
|
|
|
>STA.G hBuffer
|
2019-05-27 15:37:31 +00:00
|
|
|
|
|
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
>STYA BufPtr
|
|
|
|
|
>STYA BufPtrBackup
|
|
|
|
|
stz BufLen
|
|
|
|
|
stz BufLen+1
|
2019-03-26 12:17:47 +00:00
|
|
|
|
|
2016-09-20 16:00:51 +00:00
|
|
|
|
ldy #0
|
2019-05-27 15:37:31 +00:00
|
|
|
|
|
2019-03-26 12:17:47 +00:00
|
|
|
|
ldx #0
|
2019-05-27 15:37:31 +00:00
|
|
|
|
.1 lda (BufPtrBackup),y
|
2019-03-26 12:17:47 +00:00
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
cpx #C.CR
|
2019-05-27 15:37:31 +00:00
|
|
|
|
bne .2
|
2019-03-26 12:17:47 +00:00
|
|
|
|
cmp #C.LF
|
2019-05-27 06:01:59 +00:00
|
|
|
|
beq .5
|
2019-05-27 15:37:31 +00:00
|
|
|
|
.2 cmp #C.SPACE
|
|
|
|
|
bcs .3
|
2019-05-27 06:01:59 +00:00
|
|
|
|
cmp #C.CR
|
|
|
|
|
bne .5
|
2019-05-27 15:37:31 +00:00
|
|
|
|
.3 sta (BufPtr)
|
|
|
|
|
inc BufPtr
|
2019-05-27 06:01:59 +00:00
|
|
|
|
bne .4
|
2019-05-27 15:37:31 +00:00
|
|
|
|
inc BufPtr+1
|
|
|
|
|
.4 inc BufLen
|
2019-05-27 06:01:59 +00:00
|
|
|
|
bne .5
|
2019-05-27 15:37:31 +00:00
|
|
|
|
inc BufLen+1
|
2019-05-27 06:01:59 +00:00
|
|
|
|
.5 tax set previous char
|
2016-09-20 16:00:51 +00:00
|
|
|
|
iny
|
2019-05-27 15:37:31 +00:00
|
|
|
|
bne .1
|
|
|
|
|
inc BufPtrBackup+1
|
|
|
|
|
bra .1
|
|
|
|
|
.8 sta (BufPtr)
|
2016-10-10 06:01:29 +00:00
|
|
|
|
clc
|
2019-05-29 15:21:14 +00:00
|
|
|
|
.9 jmp BUF.ResetSel
|
2016-09-20 16:00:51 +00:00
|
|
|
|
*--------------------------------------
|
2019-06-07 15:02:51 +00:00
|
|
|
|
SaveFile >PUSHWZ Aux type
|
2018-10-02 15:52:30 +00:00
|
|
|
|
>PUSHBI S.FI.T.TXT
|
|
|
|
|
>PUSHBI O.CREATE+O.WRONLY
|
2017-10-19 15:27:38 +00:00
|
|
|
|
>LDA.G hFileName
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
2018-07-25 15:26:14 +00:00
|
|
|
|
|
2017-10-19 15:27:38 +00:00
|
|
|
|
>SYSCALL FOpen
|
|
|
|
|
bcs .9
|
|
|
|
|
pha
|
2019-05-27 15:37:31 +00:00
|
|
|
|
>PUSHW BufLen
|
2017-10-19 15:27:38 +00:00
|
|
|
|
>LDA.G hBuffer
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
2016-01-06 22:07:28 +00:00
|
|
|
|
>PUSHYA
|
2017-10-19 15:27:38 +00:00
|
|
|
|
pla
|
|
|
|
|
pha
|
2018-07-24 16:00:24 +00:00
|
|
|
|
|
2017-10-19 15:27:38 +00:00
|
|
|
|
>SYSCALL FWrite
|
|
|
|
|
bcc .1
|
|
|
|
|
|
|
|
|
|
tax
|
|
|
|
|
pla
|
|
|
|
|
phx
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL FClose
|
2017-10-19 15:27:38 +00:00
|
|
|
|
pla
|
|
|
|
|
sec
|
2016-01-09 22:33:47 +00:00
|
|
|
|
rts
|
2017-10-19 15:27:38 +00:00
|
|
|
|
.1 pla
|
2019-10-03 06:25:27 +00:00
|
|
|
|
>SYSCALL FClose.9
|
|
|
|
|
rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2019-02-01 16:32:29 +00:00
|
|
|
|
.INB USR/SRC/BIN/EDIT.S.BUF
|
|
|
|
|
.INB USR/SRC/BIN/EDIT.S.CTRL
|
|
|
|
|
.INB USR/SRC/BIN/EDIT.S.SCRN
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2015-08-05 20:38:05 +00:00
|
|
|
|
CS.END
|
2018-04-11 15:35:51 +00:00
|
|
|
|
SEQ.DETECT .AZ "Querying terminal capabilities...\e[999;999H\e[6n"
|
2019-05-29 15:21:14 +00:00
|
|
|
|
SEQ.INIT .AZ "\ec\e[?7l\e[2;%dr"
|
2018-04-11 15:35:51 +00:00
|
|
|
|
SEQ.RESET .AZ "\ec"
|
|
|
|
|
SEQ.SCROLLUP .AZ "\e[%d;%dH\eD"
|
|
|
|
|
SEQ.SCROLLDN .AZ "\e[%d;%dH\eM"
|
|
|
|
|
SEQ.NORM .AZ "\e[0m"
|
2019-05-29 05:58:28 +00:00
|
|
|
|
SEQ.INV .AZ "\e[7m"
|
2018-04-11 15:35:51 +00:00
|
|
|
|
SEQ.CEOL .AZ "\e[K"
|
|
|
|
|
MSG.TOPBAR .AZ "\e[1;1HA2osX Edit:%s\e[0m"
|
|
|
|
|
MSG.STATUSBAR .AZ "Press Ctrl-A For Help Length:%5D,Col:%3d,Line:%5D"
|
2019-05-29 15:21:14 +00:00
|
|
|
|
MSG.STATUSBAR.H .AZ "Press any key to exit this screen:"
|
|
|
|
|
MSG.STATUSBAR.F .AZ "Find:%s"
|
|
|
|
|
MSG.STATUSBAR.R .AZ "Replace:%s"
|
|
|
|
|
MSG.STATUSBAR.S .AZ "Save:%s"
|
|
|
|
|
MSG.STATUSBAR.E .AZ "Error:%h"
|
2018-04-11 15:35:51 +00:00
|
|
|
|
MSG.GOTOXY .AZ "\e[%d;%dH"
|
|
|
|
|
MSG.HELPLINE .AZ "%S\e[K"
|
2016-10-24 15:54:43 +00:00
|
|
|
|
MSG.HELP >PSTR "All commands: (* = Not yet implemented)"
|
|
|
|
|
>PSTR "------------"
|
|
|
|
|
>PSTR " Ctrl-A : This help screen"
|
|
|
|
|
>PSTR " Ctrl-B : Mark beginning of selection"
|
|
|
|
|
>PSTR " Ctrl-C : Copy selection to clipboard"
|
|
|
|
|
>PSTR " Ctrl-D : Delete selection"
|
|
|
|
|
>PSTR " Ctrl-E : Mark end of selection"
|
|
|
|
|
>PSTR " Ctrl-F : * Find a string..."
|
|
|
|
|
>PSTR " Ctrl-G : Go to start of current line"
|
|
|
|
|
>PSTR " Ctrl-L : Go to end of current line"
|
|
|
|
|
>PSTR " Ctrl-N : * Find next"
|
2016-11-07 15:13:25 +00:00
|
|
|
|
>PSTR " Ctrl-O : Page up"
|
|
|
|
|
>PSTR " Ctrl-P : Page down"
|
2016-10-24 15:54:43 +00:00
|
|
|
|
>PSTR " Ctrl-Q : Quit"
|
|
|
|
|
>PSTR " Ctrl-R : * Replace found string with..."
|
|
|
|
|
>PSTR " Ctrl-S : Save file to disk..."
|
|
|
|
|
>PSTR " Ctrl-T : Go to top of file"
|
|
|
|
|
>PSTR " Ctrl-V : Past clipboard at cursor position"
|
2016-11-07 15:13:25 +00:00
|
|
|
|
>PSTR " Ctrl-W : Erase current line"
|
2016-10-24 15:54:43 +00:00
|
|
|
|
>PSTR " Ctrl-X : Cut block to clipboard"
|
2016-11-04 16:46:16 +00:00
|
|
|
|
>PSTR " Ctrl-Y : Go to end of file"
|
2019-08-26 09:26:42 +00:00
|
|
|
|
>PSTR " Ctrl-Z : Erase char under cursor"
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.HS 00
|
2016-10-17 15:47:50 +00:00
|
|
|
|
*--------------------------------------
|
2018-11-15 15:04:14 +00:00
|
|
|
|
MSG.NEWFILE .AZ "(new file)"
|
2016-10-24 15:54:43 +00:00
|
|
|
|
EscChars >PSTR "DBAC"
|
2016-01-04 07:25:43 +00:00
|
|
|
|
EscAscii .HS 04080A0B15
|
2015-08-05 20:38:05 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
|
|
|
|
DS.START
|
2018-11-15 15:04:14 +00:00
|
|
|
|
PromptBuf .BS PromptBufMax+1
|
|
|
|
|
PromptBufPtr .BS 1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
PromptMode .BS 1
|
|
|
|
|
bCancel .BS 1
|
|
|
|
|
bSaved .BS 1
|
|
|
|
|
bEscMode .BS 1
|
|
|
|
|
EscBuffer .BS 16
|
2015-08-05 20:38:05 +00:00
|
|
|
|
hFileName .BS 1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
hFind .BS 1
|
|
|
|
|
hReplace .BS 1
|
2019-05-27 06:01:59 +00:00
|
|
|
|
hLineBuffer .BS 1
|
2015-08-05 20:38:05 +00:00
|
|
|
|
hBuffer .BS 1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
hBufferBackup .BS 1
|
2016-01-29 17:05:08 +00:00
|
|
|
|
hClipBoard .BS 1
|
|
|
|
|
ClipBoardLen .BS 2
|
2016-01-04 07:25:43 +00:00
|
|
|
|
ScreenW .BS 1
|
|
|
|
|
ScreenH .BS 1
|
2016-11-07 15:13:25 +00:00
|
|
|
|
ViewPortH .BS 1
|
|
|
|
|
ViewPortHm1 .BS 1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
ScreenX .BS 1
|
|
|
|
|
ScreenY .BS 2
|
|
|
|
|
CurX .BS 1
|
|
|
|
|
CurY .BS 1
|
|
|
|
|
FileX .BS 1
|
|
|
|
|
FileY .BS 2
|
|
|
|
|
SelStart .BS 2
|
|
|
|
|
SelEnd .BS 2
|
2015-08-05 20:38:05 +00:00
|
|
|
|
DS.END
|
|
|
|
|
.ED
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2019-02-01 16:32:29 +00:00
|
|
|
|
SAVE USR/SRC/BIN/EDIT.S
|
2015-08-05 20:38:05 +00:00
|
|
|
|
ASM
|