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
|
|
|
|
|
*--------------------------------------
|
2019-11-06 16:25:00 +00:00
|
|
|
|
SCRN.Init >LDA.G ScreenH
|
2016-01-04 07:25:43 +00:00
|
|
|
|
dec
|
|
|
|
|
>PUSHA
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
>LDYA L.SEQ.INIT
|
2018-06-21 15:12:10 +00:00
|
|
|
|
>SYSCALL printf
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-04 13:41:58 +00:00
|
|
|
|
jsr SCRN.Home
|
2016-01-04 07:25:43 +00:00
|
|
|
|
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateTopBar
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
2019-11-17 14:39:55 +00:00
|
|
|
|
|
2019-11-13 16:33:29 +00:00
|
|
|
|
jmp SCRN.UpdateMain
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
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
|
|
|
|
|
>LDA.G ScreenH
|
|
|
|
|
dec
|
|
|
|
|
>PUSHA
|
|
|
|
|
>PUSHBI 1
|
|
|
|
|
>LDYA L.SEQ.SCROLLRGN
|
|
|
|
|
>SYSCALL printf
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-11-04 07:21:40 +00:00
|
|
|
|
SCRN.UpdateTopBar
|
2019-12-09 07:12:14 +00:00
|
|
|
|
jsr SCRN.LineBufInitBar
|
|
|
|
|
|
2019-11-04 07:21:40 +00:00
|
|
|
|
>PUSHBI 1
|
|
|
|
|
>PUSHBI 1
|
|
|
|
|
>PUSHBI 2
|
2019-12-09 07:12:14 +00:00
|
|
|
|
>PUSHW L.MSG.GOTOXY
|
|
|
|
|
jsr SCRN.LineBufSprintf
|
2017-03-06 16:58:05 +00:00
|
|
|
|
bcs .9
|
2019-12-09 07:12:14 +00:00
|
|
|
|
|
|
|
|
|
>LDA.G ScreenW
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
lda #C.SPACE
|
|
|
|
|
|
|
|
|
|
.1 jsr SCRN.ToLineBuf
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
lda #C.CR
|
|
|
|
|
jsr SCRN.ToLineBuf
|
2019-11-18 16:40:32 +00:00
|
|
|
|
|
2019-11-12 16:39:22 +00:00
|
|
|
|
>LDA.G FileType
|
|
|
|
|
tax
|
|
|
|
|
>PUSHW L.MSG.FILETYPES,x
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2018-08-23 20:38:32 +00:00
|
|
|
|
>LDA.G hFileName
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
2019-11-27 16:47:13 +00:00
|
|
|
|
>PUSHYA
|
2019-11-12 16:39:22 +00:00
|
|
|
|
>PUSHBI 4
|
2019-11-04 07:21:40 +00:00
|
|
|
|
>PUSHW L.MSG.TOPBAR
|
2019-12-09 07:12:14 +00:00
|
|
|
|
jsr SCRN.LineBufSprintf
|
2019-11-04 07:21:40 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
>LDA.G bSaved
|
|
|
|
|
bne .8
|
|
|
|
|
|
2019-11-04 13:41:58 +00:00
|
|
|
|
lda #'!'
|
2019-12-09 07:12:14 +00:00
|
|
|
|
jsr SCRN.ToLineBuf
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-12-09 07:12:14 +00:00
|
|
|
|
.8 jmp SCRN.LineBufOut
|
2019-11-04 07:21:40 +00:00
|
|
|
|
.9 rts
|
2016-01-04 07:25:43 +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
|
|
|
|
|
|
|
|
|
|
SCRN.UpdateLast >LDA.G ViewPortHm1
|
|
|
|
|
sta TmpByte
|
|
|
|
|
clc
|
|
|
|
|
>ADC.G ScreenY
|
|
|
|
|
sta (pData),y
|
|
|
|
|
iny
|
|
|
|
|
lda (pData),y
|
|
|
|
|
adc #0
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
lda #1
|
|
|
|
|
SCRN.UpdateMain.1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
sta TmpCount
|
2019-11-18 16:40:32 +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
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
.5 ldx #0
|
2016-01-04 22:15:29 +00:00
|
|
|
|
ldy TmpByte
|
2019-11-04 07:21:40 +00:00
|
|
|
|
jsr SCRN.GotoXY
|
2019-05-28 16:00:53 +00:00
|
|
|
|
bcs SCRN.UpdateMain.9
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 0
|
2016-01-04 07:25:43 +00:00
|
|
|
|
>LDYA L.SEQ.CEOL
|
2018-06-21 15:12:10 +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-11-13 16:33:29 +00:00
|
|
|
|
.8 jsr SCRN.UpdateStatusBar
|
|
|
|
|
bcs SCRN.UpdateMain.9
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jmp SCRN.GotoCurXCurY
|
2016-01-04 07:25:43 +00:00
|
|
|
|
|
2019-05-28 16:00:53 +00:00
|
|
|
|
SCRN.UpdateMain.9
|
|
|
|
|
rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
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
|
2019-05-28 16:00:53 +00:00
|
|
|
|
bcs SCRN.UpdateMain.9
|
2016-01-04 07:25:43 +00:00
|
|
|
|
|
|
|
|
|
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
|
|
|
|
stz bSelected
|
|
|
|
|
sty TmpLen
|
2019-11-13 16:33:29 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
ldx #0
|
|
|
|
|
tay
|
2019-11-04 07:21:40 +00:00
|
|
|
|
jsr SCRN.GotoXY
|
2019-08-26 06:29:18 +00:00
|
|
|
|
bcs SCRN.UpdateMain.9
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-12-09 07:12:14 +00:00
|
|
|
|
jsr SCRN.LineBufInitEdit
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
|
|
|
|
ldy #$ff
|
|
|
|
|
|
2019-12-11 13:14:56 +00:00
|
|
|
|
>LDA.G ScreenW
|
2016-01-04 07:25:43 +00:00
|
|
|
|
tax
|
2018-08-23 20:38:32 +00:00
|
|
|
|
>LDA.G ScreenX
|
2019-05-28 16:00:53 +00:00
|
|
|
|
cmp TmpLen
|
|
|
|
|
bcs .8
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-04 07:25: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
|
|
|
|
|
bcc .1
|
|
|
|
|
inc BufPtr+1
|
|
|
|
|
|
|
|
|
|
.1 lda (BufPtr)
|
|
|
|
|
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
|
2019-11-04 07:21:40 +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
|
2019-11-04 07:21:40 +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
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bne .1
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-05-28 16:00:53 +00:00
|
|
|
|
.8 bit bSelected
|
|
|
|
|
bpl .80
|
|
|
|
|
jsr SCRN.ToggleSel
|
2018-08-23 20:38:32 +00:00
|
|
|
|
|
2019-11-18 16:40:32 +00:00
|
|
|
|
.80 jmp SCRN.LineBufOut
|
2019-05-29 15:21:14 +00:00
|
|
|
|
.9 rts
|
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
|
|
|
|
|
rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2016-01-21 07:05:23 +00:00
|
|
|
|
SCRN.UpdateStatusBar
|
2019-12-09 07:12:14 +00:00
|
|
|
|
jsr SCRN.LineBufInitBar
|
2019-11-18 16:40:32 +00:00
|
|
|
|
|
2018-08-23 20:38:32 +00:00
|
|
|
|
>PUSHBI 1
|
|
|
|
|
>PUSHB.G ScreenH
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 2
|
2019-12-09 07:12:14 +00:00
|
|
|
|
>PUSHW L.MSG.GOTOXY
|
|
|
|
|
jsr SCRN.LineBufSprintf
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
>LDA.G ScreenW
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
lda #C.SPACE
|
|
|
|
|
|
|
|
|
|
.1 jsr SCRN.ToLineBuf
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
lda #C.CR
|
|
|
|
|
jsr SCRN.ToLineBuf
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
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
|
2017-09-05 15:17:10 +00:00
|
|
|
|
txa
|
|
|
|
|
>PUSHA
|
2018-08-23 20:38:32 +00:00
|
|
|
|
>LDA.G FileX
|
2016-01-04 07:25:43 +00:00
|
|
|
|
inc
|
|
|
|
|
>PUSHA
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
|
|
|
|
>PUSHW BUF.COffset
|
2019-11-06 13:14:42 +00:00
|
|
|
|
>PUSHW FileLen
|
2019-05-27 15:37:31 +00:00
|
|
|
|
|
2019-11-04 07:21:40 +00:00
|
|
|
|
>PUSHBI 7
|
2019-12-09 07:12:14 +00:00
|
|
|
|
>PUSHW L.MSG.STATUSBAR
|
|
|
|
|
jsr SCRN.LineBufSprintf
|
|
|
|
|
bcs .9
|
|
|
|
|
jmp SCRN.LineBufOut
|
|
|
|
|
|
|
|
|
|
.9 rts
|
2019-05-29 15:21:14 +00:00
|
|
|
|
*--------------------------------------
|
2019-12-09 07:12:14 +00:00
|
|
|
|
SCRN.UpdateStatusBar.OLD
|
2018-08-22 15:23:27 +00:00
|
|
|
|
.2 eor #PromptModeHelp
|
2016-01-06 22:07:28 +00:00
|
|
|
|
beq .3
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-06 22:07:28 +00:00
|
|
|
|
>PUSHW pData
|
2018-08-22 15:23:27 +00:00
|
|
|
|
lda #2
|
|
|
|
|
.3 >PUSHA
|
2019-11-04 07:21:40 +00:00
|
|
|
|
bra SCRN.UpdateStatusBarOut
|
2016-01-06 22:07:28 +00:00
|
|
|
|
*--------------------------------------
|
2016-01-21 07:05:23 +00:00
|
|
|
|
SCRN.UpdateStatusBarErrA
|
2016-01-06 22:07:28 +00:00
|
|
|
|
>PUSHA
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 1
|
2019-11-04 07:21:40 +00:00
|
|
|
|
ldx #10
|
|
|
|
|
bra SCRN.UpdateStatusBarOutErr
|
|
|
|
|
SCRN.UpdateStatusBarOut
|
|
|
|
|
ldy #PromptMode
|
|
|
|
|
lda (pData),y
|
|
|
|
|
tax
|
|
|
|
|
SCRN.UpdateStatusBarOutErr
|
|
|
|
|
>PUSHW L.MSG.STATUSBAR,x
|
2019-11-18 16:40:32 +00:00
|
|
|
|
>LDYA LineBufPtr
|
2019-11-04 07:21:40 +00:00
|
|
|
|
>SYSCALL sprintf
|
|
|
|
|
SCRN.LineBufOutBar
|
|
|
|
|
>LDA.G ScreenW
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
|
2019-11-18 16:40:32 +00:00
|
|
|
|
.1 lda (LineBufPtr),y
|
2019-11-04 07:21:40 +00:00
|
|
|
|
beq .2
|
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
bra .4
|
|
|
|
|
|
|
|
|
|
.2 lda #C.SPACE
|
|
|
|
|
|
2019-11-18 16:40:32 +00:00
|
|
|
|
.3 sta (LineBufPtr),y
|
2019-11-04 07:21:40 +00:00
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .3
|
|
|
|
|
|
|
|
|
|
lda #0
|
2019-11-18 16:40:32 +00:00
|
|
|
|
sta (LineBufPtr),y
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-18 16:40:32 +00:00
|
|
|
|
.4 >PUSHW.G LineBufBase
|
2019-11-04 07:21:40 +00:00
|
|
|
|
>PUSHBI 2
|
|
|
|
|
>LDYA L.SEQ.BAR
|
2018-06-21 15:12:10 +00:00
|
|
|
|
>SYSCALL printf
|
2019-11-04 07:21:40 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
.9 rts
|
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
|
|
|
|
*--------------------------------------
|
2016-01-21 07:05:23 +00:00
|
|
|
|
SCRN.GotoCurXCurY
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
SCRN.GotoXY txa
|
2016-01-04 07:25:43 +00:00
|
|
|
|
inc
|
|
|
|
|
>PUSHA
|
|
|
|
|
tya
|
|
|
|
|
inc
|
|
|
|
|
inc
|
|
|
|
|
>PUSHA
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 2
|
2016-01-04 07:25:43 +00:00
|
|
|
|
>LDYA L.MSG.GOTOXY
|
2018-06-21 15:12:10 +00:00
|
|
|
|
>SYSCALL printf
|
2019-11-04 16:14:25 +00:00
|
|
|
|
rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2016-01-21 07:05:23 +00:00
|
|
|
|
SCRN.UpdateViewPort
|
2019-11-04 16:14:25 +00:00
|
|
|
|
stz bRepaint
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-04 13:41:58 +00:00
|
|
|
|
.1 >LDA.G FileX
|
|
|
|
|
>CMP.G ScreenX
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .2 out of left border ?
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-04 13:41:58 +00:00
|
|
|
|
>DEC.G ScreenX yes
|
2019-11-04 16:14:25 +00:00
|
|
|
|
sec
|
|
|
|
|
ror bRepaint
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bra .1
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-12 16:39:22 +00:00
|
|
|
|
.2 bit bRepaint
|
|
|
|
|
bmi .30
|
|
|
|
|
|
|
|
|
|
.21 >LDA.G ScreenX
|
2019-11-13 16:33:29 +00:00
|
|
|
|
clc
|
2019-11-04 16:14:25 +00:00
|
|
|
|
>ADC.G ScreenW
|
2016-01-04 22:15:29 +00:00
|
|
|
|
dec
|
2019-11-04 16:14:25 +00:00
|
|
|
|
>CMP.G FileX
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .3 out of right border ?
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-04 13:41:58 +00:00
|
|
|
|
>INC.G ScreenX
|
2019-11-04 16:14:25 +00:00
|
|
|
|
sec
|
|
|
|
|
ror bRepaint
|
2019-11-12 16:39:22 +00:00
|
|
|
|
bra .21
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-12 16:39:22 +00:00
|
|
|
|
.3 bit bRepaint
|
|
|
|
|
.30 bmi .6
|
|
|
|
|
|
|
|
|
|
.31 >LDA.G FileY+1
|
2016-11-04 16:46:16 +00:00
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
lda (pData),y A,X = FileY
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2019-11-12 16:39:22 +00:00
|
|
|
|
>CMP.G ScreenY
|
2016-11-04 16:46:16 +00:00
|
|
|
|
iny
|
|
|
|
|
txa
|
2016-01-04 07:25:43 +00:00
|
|
|
|
sbc (pData),y
|
|
|
|
|
bcs .4 out of top border ?
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-04 13:41:58 +00:00
|
|
|
|
>DECW.G ScreenY move viewport up one line....
|
2019-11-04 16:14:25 +00:00
|
|
|
|
bit bRepaint
|
2019-11-12 16:39:22 +00:00
|
|
|
|
bmi .31 skip scroll, will be repainted later
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-11-07 15:13:25 +00:00
|
|
|
|
jsr SCRN.scrollDn ...and move content one line down
|
2019-11-12 16:39:22 +00:00
|
|
|
|
bcc .31
|
2019-11-04 16:14:25 +00:00
|
|
|
|
rts
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-12 16:39:22 +00:00
|
|
|
|
.4 bit bRepaint
|
|
|
|
|
bmi .6
|
|
|
|
|
|
|
|
|
|
.41 >LDA.G ScreenY+1
|
2016-01-04 07:25:43 +00:00
|
|
|
|
tax
|
2016-11-07 15:13:25 +00:00
|
|
|
|
dey
|
|
|
|
|
lda (pData),y
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2019-11-13 16:33:29 +00:00
|
|
|
|
clc
|
|
|
|
|
>ADC.G ViewPortHm1
|
2019-11-04 16:14:25 +00:00
|
|
|
|
bcc .5
|
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
|
|
|
|
|
2019-11-13 16:33:29 +00:00
|
|
|
|
.5 >CMP.G FileY A,X = screen bottom
|
2016-01-04 07:25:43 +00:00
|
|
|
|
txa
|
2016-11-07 15:13:25 +00:00
|
|
|
|
iny FileY > screen bottom ?
|
2016-01-04 07:25:43 +00:00
|
|
|
|
sbc (pData),y
|
2019-11-04 16:14:25 +00:00
|
|
|
|
bcs .6 CS : fileY>= screen bottom
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-04 13:41:58 +00:00
|
|
|
|
>INCW.G ScreenY move viewport down one line....
|
2019-11-04 16:14:25 +00:00
|
|
|
|
bit bRepaint
|
2019-11-12 16:39:22 +00:00
|
|
|
|
bmi .41
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-13 16:33:29 +00:00
|
|
|
|
jsr SCRN.scrollUp ...and move content one line up
|
2019-11-12 16:39:22 +00:00
|
|
|
|
bcc .41
|
2019-11-04 16:14:25 +00:00
|
|
|
|
.9 rts
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-04 16:14:25 +00:00
|
|
|
|
.6 >LDA.G FileX
|
2019-11-13 16:33:29 +00:00
|
|
|
|
sec
|
2019-11-04 13:41:58 +00:00
|
|
|
|
>SBC.G ScreenX
|
|
|
|
|
>STA.G CurX
|
|
|
|
|
|
|
|
|
|
>LDA.G FileY
|
2019-11-13 16:33:29 +00:00
|
|
|
|
sec
|
2019-11-04 13:41:58 +00:00
|
|
|
|
>SBC.G ScreenY
|
|
|
|
|
>STA.G CurY
|
2019-11-04 16:14:25 +00:00
|
|
|
|
|
|
|
|
|
bit bRepaint
|
|
|
|
|
bpl .7
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2016-01-21 07:05:23 +00:00
|
|
|
|
jsr SCRN.UpdateMain
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-11-04 16:14:25 +00:00
|
|
|
|
.7 jsr BUF.ComputeCOffset
|
|
|
|
|
|
|
|
|
|
jsr SCRN.UpdateStatusBar
|
2016-01-04 07:25:43 +00:00
|
|
|
|
bcs .9
|
2019-11-04 07:21:40 +00:00
|
|
|
|
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.GotoCurXCurY
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2019-11-13 16:33:29 +00:00
|
|
|
|
SCRN.scrollUp >PUSHBI 0
|
2017-03-06 16:58:05 +00:00
|
|
|
|
>LDYA L.SEQ.SCROLLUP
|
2018-06-21 15:12:10 +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
|
|
|
|
|
|
|
|
|
>LDA.G ViewPortHm1
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateLineAtALenY
|
|
|
|
|
|
|
|
|
|
.9 rts
|
2016-01-04 07:25:43 +00:00
|
|
|
|
*--------------------------------------
|
2019-11-13 16:33:29 +00:00
|
|
|
|
SCRN.scrollDn >PUSHBI 0
|
2017-03-06 16:58:05 +00:00
|
|
|
|
>LDYA L.SEQ.SCROLLDN
|
2018-06-21 15:12:10 +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
|
2019-11-04 13:41:58 +00:00
|
|
|
|
|
2016-01-04 07:25:43 +00:00
|
|
|
|
lda #0
|
2019-05-29 15:21:14 +00:00
|
|
|
|
jmp SCRN.UpdateLineAtALenY
|
2019-11-04 13:41:58 +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
|
|
|
|
|
SCRN.LineBufInitDlg
|
|
|
|
|
phx
|
|
|
|
|
ldx #SEQ.DLG-SEQS
|
|
|
|
|
bra SCRN.LineBufInit
|
|
|
|
|
SCRN.LineBufInitBut
|
|
|
|
|
phx
|
|
|
|
|
ldx #SEQ.DLG.BUT-SEQS
|
|
|
|
|
bra SCRN.LineBufInit
|
|
|
|
|
SCRN.LineBufInitEdit
|
|
|
|
|
phx
|
|
|
|
|
ldx #SEQ.EDIT-SEQS
|
|
|
|
|
bra SCRN.LineBufInit
|
2019-11-18 16:40:32 +00:00
|
|
|
|
SCRN.LineBufInitNorm
|
2019-12-09 07:12:14 +00:00
|
|
|
|
phx
|
|
|
|
|
ldx #SEQ.NORM-SEQS
|
|
|
|
|
bra SCRN.LineBufInit
|
2019-11-18 16:40:32 +00:00
|
|
|
|
SCRN.LineBufInitInv
|
2019-12-09 07:12:14 +00:00
|
|
|
|
phx
|
|
|
|
|
ldx #SEQ.INV-SEQS
|
|
|
|
|
|
|
|
|
|
SCRN.LineBufInit
|
2019-11-18 16:40:32 +00:00
|
|
|
|
>LDYA.G LineBufBase
|
|
|
|
|
>STYA LineBufPtr
|
|
|
|
|
|
2019-12-09 07:12:14 +00:00
|
|
|
|
.1 lda SEQS,x
|
2019-11-18 16:40:32 +00:00
|
|
|
|
|
|
|
|
|
.2 jsr SCRN.ToLineBuf
|
2019-12-09 07:12:14 +00:00
|
|
|
|
inx
|
|
|
|
|
lda SEQS,x
|
2019-11-18 16:40:32 +00:00
|
|
|
|
bne .2
|
2019-12-09 07:12:14 +00:00
|
|
|
|
plx
|
2019-11-18 16:40:32 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
SCRN.ToLineBuf sta (LineBufPtr)
|
|
|
|
|
inc LineBufPtr
|
|
|
|
|
bne .8
|
|
|
|
|
inc LineBufPtr+1
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
2019-12-09 07:12:14 +00:00
|
|
|
|
SCRN.LineBufSprintf
|
|
|
|
|
>LDYA LineBufPtr
|
|
|
|
|
>SYSCALL sprintf
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
tya
|
|
|
|
|
clc
|
|
|
|
|
adc LineBufPtr
|
|
|
|
|
sta LineBufPtr
|
|
|
|
|
bcc .9
|
|
|
|
|
|
|
|
|
|
inc LineBufPtr+1
|
|
|
|
|
clc
|
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2019-11-18 16:40:32 +00:00
|
|
|
|
SCRN.LineBufOut lda #0
|
|
|
|
|
jsr SCRN.ToLineBuf
|
|
|
|
|
|
|
|
|
|
>PUSHBI 0
|
|
|
|
|
>LDYA.G LineBufBase
|
|
|
|
|
>SYSCALL printf
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-01-04 07:25:43 +00:00
|
|
|
|
MAN
|
2019-02-01 16:32:29 +00:00
|
|
|
|
SAVE USR/SRC/BIN/EDIT.S.SCRN
|
|
|
|
|
LOAD USR/SRC/BIN/EDIT.S
|
2016-01-04 07:25:43 +00:00
|
|
|
|
ASM
|