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
|
|
|
|
|
*--------------------------------------
|
2020-02-05 16:35:04 +00:00
|
|
|
|
SCRN.Init >PUSHW L.SEQ.INIT
|
|
|
|
|
>LDA.G ScreenH
|
2016-01-04 07:25:43 +00:00
|
|
|
|
dec
|
|
|
|
|
>PUSHA
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 1
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2020-02-10 16:24:49 +00:00
|
|
|
|
bcs SCRN.Init.9
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2021-07-03 17:18:58 +00:00
|
|
|
|
jmp SCRN.Home
|
|
|
|
|
*--------------------------------------
|
2020-02-10 16:24:49 +00:00
|
|
|
|
SCRN.Repaint lda #$ff
|
2020-02-06 10:14:50 +00:00
|
|
|
|
>STA.G bUpdateTop
|
|
|
|
|
>STA.G bUpdateStatus
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2020-02-10 16:24:49 +00:00
|
|
|
|
jsr SCRN.UpdateTopBar
|
|
|
|
|
bcs SCRN.Init.9
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2020-02-10 16:24:49 +00:00
|
|
|
|
jsr SCRN.GotoCurXCurY
|
|
|
|
|
bcs SCRN.Init.9
|
2019-12-18 07:57:47 +00:00
|
|
|
|
|
2020-02-10 16:24:49 +00:00
|
|
|
|
jmp SCRN.UpdateMainAndStatus
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2020-02-10 16:24:49 +00:00
|
|
|
|
SCRN.Init.9 rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2019-11-04 13:41:58 +00:00
|
|
|
|
SCRN.Home lda #0
|
|
|
|
|
|
2019-11-17 14:39:55 +00:00
|
|
|
|
ldy #FileX Zero FileXY,ScreenXY & CurXY
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
|
|
|
|
.1 sta (pData),y
|
|
|
|
|
iny
|
|
|
|
|
|
2019-11-13 16:33:29 +00:00
|
|
|
|
cpy #CurY+1
|
2019-11-04 13:41:58 +00:00
|
|
|
|
bne .1
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-11-18 16:40:32 +00:00
|
|
|
|
SCRN.ResetScrollRgn
|
2020-02-05 16:35:04 +00:00
|
|
|
|
>PUSHW L.SEQ.SCROLLRGN
|
2019-11-18 16:40:32 +00:00
|
|
|
|
>LDA.G ScreenH
|
|
|
|
|
dec
|
|
|
|
|
>PUSHA
|
|
|
|
|
>PUSHBI 1
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2019-11-18 16:40:32 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-12-17 12:28:49 +00:00
|
|
|
|
SCRN.UnSaved >LDA.G bUnSaved
|
2020-01-28 10:40:54 +00:00
|
|
|
|
bne SCRN.UpdateTopBar.8
|
2019-12-16 13:14:11 +00:00
|
|
|
|
|
|
|
|
|
dec
|
|
|
|
|
sta (pData),y
|
|
|
|
|
*--------------------------------------
|
2019-11-04 07:21:40 +00:00
|
|
|
|
SCRN.UpdateTopBar
|
2020-02-06 10:14:50 +00:00
|
|
|
|
>LDA.G bUpdateTop
|
|
|
|
|
bmi SCRN.UpdateTopBar.1
|
2021-06-30 19:09:07 +00:00
|
|
|
|
SCRN.UpdateTopBar.8
|
2019-12-18 07:57:47 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
2020-02-06 10:14:50 +00:00
|
|
|
|
SCRN.UpdateTopBar.1
|
2020-02-05 16:35:04 +00:00
|
|
|
|
lda #0
|
2019-12-18 07:57:47 +00:00
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2019-12-09 07:12:14 +00:00
|
|
|
|
jsr SCRN.LineBufInitBar
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-18 07:57:47 +00:00
|
|
|
|
ldx #SEQ.CURSAVE-SEQS
|
|
|
|
|
jsr SCRN.SEQS.ToLineBuf
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-18 07:57:47 +00:00
|
|
|
|
ldy #1
|
|
|
|
|
jsr SCRN.LineBufGotoLineY
|
2017-03-06 16:58:05 +00:00
|
|
|
|
bcs .9
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-09 07:12:14 +00:00
|
|
|
|
>LDA.G ScreenW
|
|
|
|
|
tax
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-09 07:12:14 +00:00
|
|
|
|
lda #C.SPACE
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-09 07:12:14 +00:00
|
|
|
|
.1 jsr SCRN.ToLineBuf
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-09 07:12:14 +00:00
|
|
|
|
lda #C.CR
|
|
|
|
|
jsr SCRN.ToLineBuf
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2020-02-14 07:21:56 +00:00
|
|
|
|
>PUSHW LineBufPtr
|
|
|
|
|
>PUSHW L.MSG.TOPBAR
|
2021-05-09 17:04:44 +00:00
|
|
|
|
>PUSHW A2osX.KVER
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2020-02-14 07:21:56 +00:00
|
|
|
|
>LDA.G hFileName
|
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
>PUSHYA
|
2020-01-27 15:09:00 +00:00
|
|
|
|
>LDA.G FileType
|
2021-07-11 08:56:44 +00:00
|
|
|
|
asl
|
2019-11-12 16:39:22 +00:00
|
|
|
|
tax
|
|
|
|
|
>PUSHW L.MSG.FILETYPES,x
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2020-02-14 16:32:52 +00:00
|
|
|
|
>PUSHBI 6
|
2019-12-09 07:12:14 +00:00
|
|
|
|
jsr SCRN.LineBufSprintf
|
2019-11-04 07:21:40 +00:00
|
|
|
|
bcs .9
|
2019-12-16 13:14:11 +00:00
|
|
|
|
|
2020-01-27 15:09:00 +00:00
|
|
|
|
>LDA.G bUnSaved
|
|
|
|
|
beq .2
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2020-01-27 15:09:00 +00:00
|
|
|
|
lda #'!'
|
|
|
|
|
jsr SCRN.ToLineBuf
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2020-01-27 15:09:00 +00:00
|
|
|
|
.2 ldx #SEQ.CURRESTORE-SEQS
|
2019-12-18 07:57:47 +00:00
|
|
|
|
jsr SCRN.SEQS.ToLineBuf
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-18 07:57:47 +00:00
|
|
|
|
jmp SCRN.LineBufOut
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
|
|
|
|
.8 clc
|
2020-02-05 16:35:04 +00:00
|
|
|
|
.9 rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2021-06-30 19:09:07 +00:00
|
|
|
|
SCRN.UpdateViewPort
|
2019-12-14 18:44:01 +00:00
|
|
|
|
stz bRepaint
|
|
|
|
|
|
|
|
|
|
.1 >LDA.G FileX
|
|
|
|
|
>CMP.G ScreenX
|
|
|
|
|
bcs .2 out of left border ?
|
|
|
|
|
|
|
|
|
|
>DEC.G ScreenX yes
|
|
|
|
|
sec
|
|
|
|
|
ror bRepaint
|
|
|
|
|
bra .1
|
|
|
|
|
|
|
|
|
|
.2 bit bRepaint
|
|
|
|
|
bmi .30
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
.21 >LDA.G ScreenX
|
|
|
|
|
clc
|
|
|
|
|
>ADC.G ScreenW
|
|
|
|
|
dec
|
|
|
|
|
>CMP.G FileX
|
|
|
|
|
bcs .3 out of right border ?
|
|
|
|
|
|
|
|
|
|
>INC.G ScreenX
|
|
|
|
|
sec
|
|
|
|
|
ror bRepaint
|
|
|
|
|
bra .21
|
|
|
|
|
|
|
|
|
|
.3 bit bRepaint
|
|
|
|
|
.30 bmi .6
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
.31 >LDA.G FileY+1
|
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
lda (pData),y A,X = FileY
|
|
|
|
|
|
|
|
|
|
>CMP.G ScreenY
|
|
|
|
|
iny
|
|
|
|
|
txa
|
|
|
|
|
sbc (pData),y
|
|
|
|
|
bcs .4 out of top border ?
|
|
|
|
|
|
|
|
|
|
>DECW.G ScreenY move viewport up one line....
|
|
|
|
|
bit bRepaint
|
|
|
|
|
bmi .31 skip scroll, will be repainted later
|
|
|
|
|
|
2021-06-30 19:09:07 +00:00
|
|
|
|
jsr SCRN.scrollDn ...and move content one line down
|
2019-12-14 18:44:01 +00:00
|
|
|
|
bcc .31
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.4 bit bRepaint
|
|
|
|
|
bmi .6
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
.41 >LDA.G ScreenY+1
|
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
lda (pData),y
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
>ADC.G ViewPortHm1
|
|
|
|
|
bcc .5
|
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
|
|
|
|
|
|
.5 >CMP.G FileY A,X = screen bottom
|
|
|
|
|
txa
|
2021-06-30 19:09:07 +00:00
|
|
|
|
iny FileY > screen bottom ?
|
2019-12-14 18:44:01 +00:00
|
|
|
|
sbc (pData),y
|
|
|
|
|
bcs .6 CS : fileY>= screen bottom
|
|
|
|
|
|
|
|
|
|
>INCW.G ScreenY move viewport down one line....
|
|
|
|
|
bit bRepaint
|
|
|
|
|
bmi .41
|
|
|
|
|
|
|
|
|
|
jsr SCRN.scrollUp ...and move content one line up
|
|
|
|
|
bcc .41
|
|
|
|
|
.9 rts
|
|
|
|
|
|
|
|
|
|
.6 >LDA.G FileX
|
|
|
|
|
sec
|
|
|
|
|
>SBC.G ScreenX
|
|
|
|
|
>STA.G CurX
|
|
|
|
|
|
|
|
|
|
>LDA.G FileY
|
|
|
|
|
sec
|
|
|
|
|
>SBC.G ScreenY
|
|
|
|
|
>STA.G CurY
|
|
|
|
|
|
2019-12-17 12:28:49 +00:00
|
|
|
|
jsr BUF.ComputeCOffset
|
|
|
|
|
jsr SCRN.GotoCurXCurY
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
bit bRepaint
|
2019-12-17 12:28:49 +00:00
|
|
|
|
bmi SCRN.UpdateMain
|
2019-12-14 18:44:01 +00:00
|
|
|
|
|
2019-12-17 12:28:49 +00:00
|
|
|
|
jmp SCRN.UpdateStatusBar
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
SCRN.UpdateMainAndStatus
|
|
|
|
|
jsr SCRN.UpdateStatusBar
|
2019-12-14 18:44:01 +00:00
|
|
|
|
*--------------------------------------
|
2018-08-23 20:38:32 +00:00
|
|
|
|
SCRN.UpdateMain >LDA.G ScreenY
|
2016-01-04 07:25:43 +00:00
|
|
|
|
sta TmpIndex
|
|
|
|
|
iny
|
|
|
|
|
lda (pData),y
|
|
|
|
|
sta TmpIndex+1
|
|
|
|
|
|
2019-11-18 16:40:32 +00:00
|
|
|
|
stz TmpByte
|
2018-08-23 20:38:32 +00:00
|
|
|
|
>LDA.G ViewPortH
|
2019-11-18 16:40:32 +00:00
|
|
|
|
bra SCRN.UpdateMain.1
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-11-18 16:40:32 +00:00
|
|
|
|
SCRN.UpdateLast >LDA.G ViewPortHm1
|
|
|
|
|
sta TmpByte
|
|
|
|
|
clc
|
|
|
|
|
>ADC.G ScreenY
|
2020-02-10 16:24:49 +00:00
|
|
|
|
sta TmpIndex
|
2019-11-18 16:40:32 +00:00
|
|
|
|
iny
|
|
|
|
|
lda (pData),y
|
|
|
|
|
adc #0
|
2020-02-10 16:24:49 +00:00
|
|
|
|
sta TmpIndex+1
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-11-18 16:40:32 +00:00
|
|
|
|
lda #1
|
|
|
|
|
SCRN.UpdateMain.1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
sta TmpCount
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2017-10-12 15:28:59 +00:00
|
|
|
|
.1 lda TmpIndex
|
|
|
|
|
ldx TmpIndex+1
|
2019-11-17 14:39:55 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
jsr BUF.GetLineAX Y = line length
|
|
|
|
|
bcs .5
|
|
|
|
|
|
2016-01-04 22:15:29 +00:00
|
|
|
|
lda TmpByte
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateLineAtALenY
|
2019-05-28 16:00:53 +00:00
|
|
|
|
bcs SCRN.UpdateMain.9
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 22:15:29 +00:00
|
|
|
|
.3 inc TmpByte
|
|
|
|
|
inc TmpIndex
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bne .4
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
inc TmpIndex+1
|
2016-01-04 22:15:29 +00:00
|
|
|
|
.4 dec TmpCount
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bne .1
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-13 16:33:29 +00:00
|
|
|
|
bra .8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2020-02-06 10:14:50 +00:00
|
|
|
|
.5 ldx #0
|
2020-02-06 07:30:56 +00:00
|
|
|
|
ldy TmpByte
|
2020-02-06 10:14:50 +00:00
|
|
|
|
jsr SCRN.GotoXY
|
|
|
|
|
bcs SCRN.UpdateMain.9
|
|
|
|
|
|
|
|
|
|
>PUSHW L.SEQ.CEOL
|
|
|
|
|
>PUSHBI 0
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2019-05-28 16:00:53 +00:00
|
|
|
|
bcs SCRN.UpdateMain.9
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 22:15:29 +00:00
|
|
|
|
inc TmpByte
|
|
|
|
|
dec TmpCount
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bne .5
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-12-16 13:14:11 +00:00
|
|
|
|
.8 jsr BUF.ComputeCOffset
|
|
|
|
|
jmp SCRN.GotoCurXCurY
|
2019-05-28 16:00:53 +00:00
|
|
|
|
SCRN.UpdateMain.9
|
|
|
|
|
rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2019-12-18 07:57:47 +00:00
|
|
|
|
SCRN.UpdateCurrentEOL
|
|
|
|
|
jsr SCRN.LineBufInitEdit
|
|
|
|
|
bra SCRN.UpdateLineAtBufPtr
|
|
|
|
|
*--------------------------------------
|
2016-01-21 07:05:23 +00:00
|
|
|
|
SCRN.UpdateCurrentLine
|
2018-08-23 20:38:32 +00:00
|
|
|
|
>LDA.G ScreenY+1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
lda (pData),y
|
|
|
|
|
clc
|
2018-08-23 20:38:32 +00:00
|
|
|
|
>ADC.G CurY
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcc .1
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
inx
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.1 jsr BUF.GetLineAX
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bcc .2
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr SCRN.LineBufInitEdit
|
|
|
|
|
jmp SCRN.UpdateLineAtBufPtr.EOL
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
.2 phy
|
2018-08-23 20:38:32 +00:00
|
|
|
|
>LDA.G CurY
|
2016-01-04 07:25:43 +00:00
|
|
|
|
ply
|
2019-05-28 16:00:53 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* A = Target Screen Y position
|
|
|
|
|
* BufPtr = Text line start, Y = len
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2016-01-21 07:05:23 +00:00
|
|
|
|
SCRN.UpdateLineAtALenY
|
2016-01-04 07:25:43 +00:00
|
|
|
|
sty TmpLen
|
2019-12-18 07:57:47 +00:00
|
|
|
|
inc
|
|
|
|
|
inc
|
|
|
|
|
sta TmpLen+1
|
2019-11-13 16:33:29 +00:00
|
|
|
|
|
2019-12-18 21:52:43 +00:00
|
|
|
|
jsr SCRN.LineBufInitEdit
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-18 21:52:43 +00:00
|
|
|
|
ldy TmpLen+1
|
|
|
|
|
jsr SCRN.LineBufGotoLineY
|
|
|
|
|
|
2018-08-23 20:38:32 +00:00
|
|
|
|
>LDA.G ScreenX
|
2019-05-28 16:00:53 +00:00
|
|
|
|
cmp TmpLen
|
2020-02-06 07:30:56 +00:00
|
|
|
|
bcs SCRN.UpdateLineAtBufPtr.EOL
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-18 21:52:43 +00:00
|
|
|
|
tay
|
2019-05-28 16:00:53 +00:00
|
|
|
|
clc
|
|
|
|
|
adc BUF.LOffset
|
|
|
|
|
sta BUF.COffset
|
|
|
|
|
lda #0
|
|
|
|
|
adc BUF.LOffset+1
|
|
|
|
|
sta BUF.COffset+1
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-05-28 16:00:53 +00:00
|
|
|
|
tya
|
|
|
|
|
* clc
|
|
|
|
|
adc BufPtr
|
|
|
|
|
sta BufPtr
|
2019-12-18 07:57:47 +00:00
|
|
|
|
bcc .2
|
2019-05-28 16:00:53 +00:00
|
|
|
|
inc BufPtr+1
|
|
|
|
|
|
2021-06-30 19:09:07 +00:00
|
|
|
|
.2
|
2019-12-18 07:57:47 +00:00
|
|
|
|
|
|
|
|
|
SCRN.UpdateLineAtBufPtr
|
|
|
|
|
>LDA.G ScreenW
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
stz bSelected
|
|
|
|
|
|
|
|
|
|
.2 lda (BufPtr)
|
2019-05-28 16:00:53 +00:00
|
|
|
|
beq .8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2018-11-15 15:04:14 +00:00
|
|
|
|
cmp #C.CR
|
2019-05-28 16:00:53 +00:00
|
|
|
|
beq .8
|
2018-11-15 15:04:14 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
jsr BUF.CheckSelected
|
2019-05-28 16:00:53 +00:00
|
|
|
|
eor bSelected
|
|
|
|
|
bpl .5
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-05-29 05:58:28 +00:00
|
|
|
|
jsr SCRN.ToggleSel
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-05-28 16:00:53 +00:00
|
|
|
|
.5 lda (BufPtr)
|
2019-05-29 15:21:14 +00:00
|
|
|
|
cmp #'\'
|
2019-08-26 06:29:18 +00:00
|
|
|
|
beq .50
|
|
|
|
|
cmp #'%'
|
2019-05-29 15:21:14 +00:00
|
|
|
|
bne .51
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-08-26 06:29:18 +00:00
|
|
|
|
.50 pha
|
|
|
|
|
lda #'\'
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jsr SCRN.ToLineBuf
|
2019-08-26 06:29:18 +00:00
|
|
|
|
pla
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-08-26 06:29:18 +00:00
|
|
|
|
.51 jsr SCRN.ToLineBuf
|
|
|
|
|
inc BufPtr
|
2019-05-28 16:00:53 +00:00
|
|
|
|
bne .6
|
|
|
|
|
inc BufPtr+1
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-05-28 16:00:53 +00:00
|
|
|
|
.6 inc BUF.COffset
|
|
|
|
|
bne .7
|
|
|
|
|
inc BUF.COffset+1
|
|
|
|
|
.7 dex
|
2019-12-18 07:57:47 +00:00
|
|
|
|
bne .2
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-05-28 16:00:53 +00:00
|
|
|
|
.8 bit bSelected
|
2020-02-06 07:30:56 +00:00
|
|
|
|
bpl SCRN.UpdateLineAtBufPtr.EOL
|
2019-05-28 16:00:53 +00:00
|
|
|
|
jsr SCRN.ToggleSel
|
2018-08-23 20:38:32 +00:00
|
|
|
|
|
2020-02-06 07:30:56 +00:00
|
|
|
|
SCRN.UpdateLineAtBufPtr.EOL
|
2019-12-18 21:52:43 +00:00
|
|
|
|
ldx #SEQ.CEOL-SEQS
|
|
|
|
|
jsr SCRN.SEQS.ToLineBuf
|
|
|
|
|
jmp SCRN.LineBufOut
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2019-12-11 13:14:56 +00:00
|
|
|
|
SCRN.ToggleSel ldy #SEQ.NORM-SEQS
|
|
|
|
|
|
2019-05-28 16:00:53 +00:00
|
|
|
|
lda bSelected
|
2019-05-29 15:21:14 +00:00
|
|
|
|
eor #$ff
|
|
|
|
|
sta bSelected
|
2019-05-28 16:00:53 +00:00
|
|
|
|
bpl .1
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-12-11 13:14:56 +00:00
|
|
|
|
ldy #SEQ.INV-SEQS
|
2019-05-28 16:00:53 +00:00
|
|
|
|
|
2019-12-11 13:14:56 +00:00
|
|
|
|
.1 lda SEQS,y
|
2019-05-28 16:00:53 +00:00
|
|
|
|
beq .8
|
2019-12-11 13:14:56 +00:00
|
|
|
|
|
2019-05-28 16:00:53 +00:00
|
|
|
|
jsr SCRN.ToLineBuf
|
|
|
|
|
iny
|
2019-05-29 15:21:14 +00:00
|
|
|
|
bra .1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
|
2019-11-04 07:21:40 +00:00
|
|
|
|
.8
|
|
|
|
|
SCRN.ToggleSel.RTS
|
2019-12-17 12:28:49 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-06 10:14:50 +00:00
|
|
|
|
SCRN.UpdateStatusBar
|
2019-12-17 12:28:49 +00:00
|
|
|
|
>LDA.G bUpdateStatus
|
2020-02-06 10:14:50 +00:00
|
|
|
|
bpl SCRN.ToggleSel.RTS
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
|
|
|
|
lda #0
|
2019-12-17 12:28:49 +00:00
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
jsr SCRN.ResetStatusBar
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2020-02-14 07:21:56 +00:00
|
|
|
|
>PUSHW LineBufPtr
|
|
|
|
|
>PUSHW L.MSG.STATUSBAR
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2020-02-14 07:21:56 +00:00
|
|
|
|
>PUSHW FileLen
|
|
|
|
|
>PUSHW BUF.COffset
|
|
|
|
|
|
|
|
|
|
>LDA.G FileX
|
|
|
|
|
inc
|
|
|
|
|
>PUSHA
|
|
|
|
|
|
2018-08-23 20:38:32 +00:00
|
|
|
|
>LDA.G FileY
|
2016-01-04 07:25:43 +00:00
|
|
|
|
tax
|
2017-09-05 15:17:10 +00:00
|
|
|
|
iny
|
2016-01-04 07:25:43 +00:00
|
|
|
|
lda (pData),y
|
|
|
|
|
inx
|
2019-12-09 07:12:14 +00:00
|
|
|
|
bne .2
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2017-09-05 15:17:10 +00:00
|
|
|
|
inc
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-12-09 07:12:14 +00:00
|
|
|
|
.2 >PUSHA
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2017-09-05 15:17:10 +00:00
|
|
|
|
txa
|
|
|
|
|
>PUSHA
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-11-04 07:21:40 +00:00
|
|
|
|
>PUSHBI 7
|
2019-12-09 07:12:14 +00:00
|
|
|
|
jsr SCRN.LineBufSprintf
|
|
|
|
|
bcs .9
|
2019-12-14 18:44:01 +00:00
|
|
|
|
|
|
|
|
|
ldx #SEQ.CURRESTORE-SEQS
|
|
|
|
|
jsr SCRN.SEQS.ToLineBuf
|
|
|
|
|
|
2019-12-09 07:12:14 +00:00
|
|
|
|
jmp SCRN.LineBufOut
|
2019-12-16 13:14:11 +00:00
|
|
|
|
|
2019-12-17 12:28:49 +00:00
|
|
|
|
.8 clc
|
2019-12-09 07:12:14 +00:00
|
|
|
|
.9 rts
|
2019-05-29 15:21:14 +00:00
|
|
|
|
*--------------------------------------
|
2019-12-14 18:44:01 +00:00
|
|
|
|
SCRN.ResetStatusBar
|
|
|
|
|
jsr SCRN.LineBufInitBar
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-17 12:28:49 +00:00
|
|
|
|
ldx #SEQ.CURSAVE-SEQS
|
|
|
|
|
jsr SCRN.SEQS.ToLineBuf
|
|
|
|
|
|
2019-12-18 07:57:47 +00:00
|
|
|
|
>LDA.G ScreenH
|
|
|
|
|
tay
|
|
|
|
|
jsr SCRN.LineBufGotoLineY
|
2019-12-14 18:44:01 +00:00
|
|
|
|
|
2019-11-04 07:21:40 +00:00
|
|
|
|
>LDA.G ScreenW
|
|
|
|
|
tax
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
lda #C.SPACE
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
.1 jsr SCRN.ToLineBuf
|
2019-11-04 07:21:40 +00:00
|
|
|
|
dex
|
2019-12-14 18:44:01 +00:00
|
|
|
|
bne .1
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
lda #C.CR
|
2019-12-17 12:28:49 +00:00
|
|
|
|
jmp SCRN.ToLineBuf
|
2019-05-29 15:21:14 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
SCRN.CursorAdjust
|
|
|
|
|
.1 jsr BUF.ComputeCOffset
|
|
|
|
|
bcc .8
|
|
|
|
|
>DECW.G FileY
|
|
|
|
|
>STZ.G FileX
|
|
|
|
|
|
|
|
|
|
bra .1
|
|
|
|
|
|
|
|
|
|
.8 rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2021-06-30 19:09:07 +00:00
|
|
|
|
SCRN.GotoCurXCurY
|
2016-01-21 07:05:23 +00:00
|
|
|
|
ldy #CurX
|
2016-01-04 07:25:43 +00:00
|
|
|
|
lda (pData),y
|
|
|
|
|
tax
|
|
|
|
|
ldy #CurY
|
|
|
|
|
lda (pData),y
|
|
|
|
|
tay
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2020-02-05 16:35:04 +00:00
|
|
|
|
SCRN.GotoXY >PUSHW L.MSG.GOTOXY
|
2016-01-04 07:25:43 +00:00
|
|
|
|
tya
|
|
|
|
|
inc
|
|
|
|
|
inc
|
|
|
|
|
>PUSHA
|
2020-02-05 16:35:04 +00:00
|
|
|
|
txa
|
|
|
|
|
inc
|
|
|
|
|
>PUSHA
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 2
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2020-02-06 10:14:50 +00:00
|
|
|
|
rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-05 16:35:04 +00:00
|
|
|
|
SCRN.scrollUp >PUSHW L.SEQ.SCROLLUP
|
|
|
|
|
>PUSHBI 0
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2019-11-12 16:39:22 +00:00
|
|
|
|
>LDA.G ScreenY+1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
lda (pData),y
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2019-11-13 16:33:29 +00:00
|
|
|
|
* clc
|
2019-11-04 16:14:25 +00:00
|
|
|
|
>ADC.G ViewPortHm1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcc .1
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
inx
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.1 jsr BUF.GetLineAX
|
|
|
|
|
bcs .9
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2019-12-18 07:57:47 +00:00
|
|
|
|
phy
|
2019-11-04 13:41:58 +00:00
|
|
|
|
>LDA.G ViewPortHm1
|
2019-12-18 07:57:47 +00:00
|
|
|
|
ply
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateLineAtALenY
|
|
|
|
|
|
|
|
|
|
.9 rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-05 16:35:04 +00:00
|
|
|
|
SCRN.scrollDn >PUSHW L.SEQ.SCROLLDN
|
|
|
|
|
>PUSHBI 0
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2017-03-06 16:58:05 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
2019-11-12 16:39:22 +00:00
|
|
|
|
>LDA.G ScreenY+1
|
2016-11-07 15:13:25 +00:00
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
lda (pData),y
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2016-11-07 15:13:25 +00:00
|
|
|
|
jsr BUF.GetLineAX
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
2020-01-23 14:48:22 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
lda #0
|
2019-12-18 07:57:47 +00:00
|
|
|
|
jsr SCRN.UpdateLineAtALenY
|
2020-01-23 14:48:22 +00:00
|
|
|
|
|
2019-05-29 15:21:14 +00:00
|
|
|
|
.9 rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2019-12-09 07:12:14 +00:00
|
|
|
|
SCRN.LineBufInitBar
|
|
|
|
|
phx
|
|
|
|
|
ldx #SEQ.BAR-SEQS
|
|
|
|
|
bra SCRN.LineBufInit
|
2022-03-24 20:24:26 +00:00
|
|
|
|
SCRN.LineBufInitDLGBar
|
|
|
|
|
phx
|
|
|
|
|
ldx #SEQ.DLG.BAR-SEQS
|
|
|
|
|
bra SCRN.LineBufInit
|
2020-02-28 16:30:16 +00:00
|
|
|
|
SCRN.LineBufInitDLG
|
2019-12-09 07:12:14 +00:00
|
|
|
|
phx
|
|
|
|
|
ldx #SEQ.DLG-SEQS
|
|
|
|
|
bra SCRN.LineBufInit
|
2019-12-12 07:09:44 +00:00
|
|
|
|
SCRN.LineBufInitLBL
|
|
|
|
|
phx
|
|
|
|
|
ldx #SEQ.DLG.LBL-SEQS
|
|
|
|
|
bra SCRN.LineBufInit
|
2021-06-30 19:09:07 +00:00
|
|
|
|
SCRN.LineBufInitTB
|
2019-12-11 16:54:41 +00:00
|
|
|
|
phx
|
|
|
|
|
ldx #SEQ.DLG.TB-SEQS
|
|
|
|
|
bra SCRN.LineBufInit
|
2021-06-30 19:09:07 +00:00
|
|
|
|
SCRN.LineBufInitBut
|
2019-12-09 07:12:14 +00:00
|
|
|
|
phx
|
|
|
|
|
ldx #SEQ.DLG.BUT-SEQS
|
|
|
|
|
bra SCRN.LineBufInit
|
|
|
|
|
SCRN.LineBufInitEdit
|
|
|
|
|
phx
|
|
|
|
|
ldx #SEQ.EDIT-SEQS
|
2020-02-05 16:35:04 +00:00
|
|
|
|
|
2019-12-09 07:12:14 +00:00
|
|
|
|
SCRN.LineBufInit
|
2020-02-05 16:35:04 +00:00
|
|
|
|
>LDYA.G LineBufBase
|
2019-11-18 16:40:32 +00:00
|
|
|
|
>STYA LineBufPtr
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
jsr SCRN.SEQS.ToLineBuf
|
|
|
|
|
plx
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
SCRN.SEQS.ToLineBuf
|
|
|
|
|
lda SEQS,x
|
2019-11-18 16:40:32 +00:00
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
.1 jsr SCRN.ToLineBuf
|
2019-12-09 07:12:14 +00:00
|
|
|
|
inx
|
|
|
|
|
lda SEQS,x
|
2019-12-14 18:44:01 +00:00
|
|
|
|
bne .1
|
2019-11-18 16:40:32 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-12-18 07:57:47 +00:00
|
|
|
|
SCRN.LineBufGotoLineY
|
2020-02-14 07:21:56 +00:00
|
|
|
|
>PUSHW LineBufPtr
|
|
|
|
|
>PUSHW L.MSG.GOTOXY
|
2019-12-18 07:57:47 +00:00
|
|
|
|
tya
|
|
|
|
|
>PUSHA
|
2020-02-14 07:21:56 +00:00
|
|
|
|
>PUSHBI 1
|
2019-12-18 07:57:47 +00:00
|
|
|
|
>PUSHBI 2
|
|
|
|
|
*--------------------------------------
|
2019-12-09 07:12:14 +00:00
|
|
|
|
SCRN.LineBufSprintf
|
2020-02-28 16:30:16 +00:00
|
|
|
|
>SYSCALL SPrintF
|
2019-12-09 07:12:14 +00:00
|
|
|
|
bcs .9
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-09 07:12:14 +00:00
|
|
|
|
tya
|
|
|
|
|
clc
|
|
|
|
|
adc LineBufPtr
|
|
|
|
|
sta LineBufPtr
|
|
|
|
|
bcc .9
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2019-12-09 07:12:14 +00:00
|
|
|
|
inc LineBufPtr+1
|
|
|
|
|
clc
|
2021-06-30 19:09:07 +00:00
|
|
|
|
|
2020-02-05 16:35:04 +00:00
|
|
|
|
.9 rts
|
2019-12-09 07:12:14 +00:00
|
|
|
|
*--------------------------------------
|
2019-12-14 18:44:01 +00:00
|
|
|
|
SCRN.ToLineBuf sta (LineBufPtr)
|
|
|
|
|
inc LineBufPtr
|
|
|
|
|
bne .8
|
|
|
|
|
inc LineBufPtr+1
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
2019-11-18 16:40:32 +00:00
|
|
|
|
SCRN.LineBufOut lda #0
|
2019-12-13 16:06:23 +00:00
|
|
|
|
sta (LineBufPtr)
|
2019-11-18 16:40:32 +00:00
|
|
|
|
|
2020-02-05 16:35:04 +00:00
|
|
|
|
>PUSHW.G LineBufBase
|
2019-11-18 16:40:32 +00:00
|
|
|
|
>PUSHBI 0
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2020-02-05 16:35:04 +00:00
|
|
|
|
rts
|
2019-11-18 16:40:32 +00:00
|
|
|
|
*--------------------------------------
|
2016-01-04 07:25:43 +00:00
|
|
|
|
MAN
|
2020-07-27 14:09:19 +00:00
|
|
|
|
SAVE usr/src/bin/edit.s.scrn
|
|
|
|
|
LOAD usr/src/bin/edit.s
|
2016-01-04 07:25:43 +00:00
|
|
|
|
ASM
|