Kernel 0.93+

This commit is contained in:
Rémy GIBERT 2019-11-04 17:14:25 +01:00
parent 1242a63434
commit 8f3a32f4d6
4 changed files with 36 additions and 56 deletions

Binary file not shown.

View File

@ -124,8 +124,6 @@ Ctrl.G >LDA.G FileX
lda #0
sta (pData),y
jsr BUF.ComputeCOffset
jmp SCRN.UpdateViewPort
.8 clc
@ -158,9 +156,7 @@ Ctrl.BS >LDA.G FileX
>DECW.G FileY
.3 jsr BUF.ComputeCOffset
jmp SCRN.UpdateViewPort
.3 jmp SCRN.UpdateViewPort
.8 clc
rts
@ -190,8 +186,6 @@ Ctrl.TAB jsr BUF.InsertTAB
inc
sta (pData),y
jsr BUF.ComputeCOffset
jmp SCRN.UpdateViewPort
.9 rts
@ -207,9 +201,8 @@ Ctrl.LF jsr BUF.GetNextLine
.2 >INCW.G FileY
jsr BUF.ComputeCOffset
jmp SCRN.UpdateViewPort
.8 clc
rts
*--------------------------------------
@ -236,8 +229,6 @@ Ctrl.VT >LDA.G FileY+1
.2 >DECW.G FileY
jsr BUF.ComputeCOffset
jmp SCRN.UpdateViewPort
.8
Ctrl.VT.8 clc
@ -249,8 +240,6 @@ Ctrl.L jsr BUF.GetLine
tya Y = line length
>STA.G FileX
jsr BUF.ComputeCOffset
jmp SCRN.UpdateViewPort
*--------------------------------------
Ctrl.CR lda #C.CR
@ -289,8 +278,6 @@ Ctrl.O ldy #FileY+1
>STZ.G FileX
jsr BUF.ComputeCOffset
jmp SCRN.UpdateViewPort
.8 pla
@ -325,8 +312,6 @@ Ctrl.P ldy #FileY+1
pla
sta (pData),y
jsr BUF.ComputeCOffset
jmp SCRN.UpdateViewPort
.8 pla
@ -366,8 +351,6 @@ Ctrl.S lda #PromptModeSave
jmp SCRN.UpdateStatusBar
*--------------------------------------
Ctrl.T jsr SCRN.Home
jsr BUF.ComputeCOffset
jmp SCRN.UpdateViewPort
*--------------------------------------
Ctrl.Y jsr BUF.GetNextLine
@ -381,8 +364,6 @@ Ctrl.Y jsr BUF.GetNextLine
tya Y = line length
>STA.G FileX
jsr BUF.ComputeCOffset
jmp SCRN.UpdateViewPort
*--------------------------------------
Ctrl.FS jsr BUF.GetLine
@ -404,11 +385,10 @@ Ctrl.FS jsr BUF.GetLine
>STZ.G FileX
.3 jsr BUF.ComputeCOffset
.3 jmp SCRN.UpdateViewPort
jmp SCRN.UpdateViewPort
.8 clc
rts
.9 rts
*--------------------------------------
Ctrl.V jsr BUF.InsertClipboard
bcs .9

View File

@ -389,32 +389,29 @@ SCRN.GotoXY txa
>PUSHBI 2
>LDYA L.MSG.GOTOXY
>SYSCALL printf
SCRN.GotoXY.RTS rts
rts
*--------------------------------------
SCRN.UpdateViewPort
lda #$ff
sta bNotRepaint
stz bRepaint
.1 >LDA.G FileX
>CMP.G ScreenX
bcs .2 out of left border ?
>DEC.G ScreenX yes
stz bNotRepaint
sec
ror bRepaint
bra .1
.2 clc
ldy #ScreenX
lda (pData),y
ldy #ScreenW
adc (pData),y
.2 >LDA.G ScreenX
>ADC.G ScreenW
dec
ldy #FileX
cmp (pData),y
>CMP.G FileX
bcs .3 out of right border ?
>INC.G ScreenX
stz bNotRepaint
sec
ror bRepaint
bra .2
.3 ldy #FileY+1
@ -431,11 +428,12 @@ SCRN.UpdateViewPort
bcs .4 out of top border ?
>DECW.G ScreenY move viewport up one line....
bit bNotRepaint
bpl .3
bit bRepaint
bmi .3 skip scroll, will be repainted later
jsr SCRN.scrollDn ...and move content one line down
bcs SCRN.GotoXY.RTS
bcc .3
rts
.4 ldy #ScreenY+1
lda (pData),y
@ -444,43 +442,47 @@ SCRN.UpdateViewPort
lda (pData),y
>ADC.G ViewPortHm1
bcc .41
bcc .5
inx
.41 ldy #FileY A,X = screen bottom
cmp (pData),y
.5 ldy #FileY A,X = screen bottom
clc
sbc (pData),y
txa
iny FileY > screen bottom ?
sbc (pData),y
bcs .5 CS : fileY>= screen bottom
bcs .6 CS : fileY>= screen bottom
>INCW.G ScreenY move viewport down one line....
bit bNotRepaint
bpl .4
bit bRepaint
bmi .4
jsr SCRN.scrollUp ...and move content one line up
bcs .9
bra .4
bcc .4
.5 >LDA.G FileX
.9 rts
.6 >LDA.G FileX
>SBC.G ScreenX
>STA.G CurX
>LDA.G FileY
>SBC.G ScreenY
>STA.G CurY
bit bNotRepaint
bmi .6
bit bRepaint
bpl .7
jsr SCRN.UpdateMain
bcs .9
.6 jsr SCRN.UpdateStatusBar
.7 jsr BUF.ComputeCOffset
jsr SCRN.UpdateStatusBar
bcs .9
jmp SCRN.GotoCurXCurY
.9 rts
*--------------------------------------
SCRN.scrollUp >LDA.G CurX
inc
@ -500,9 +502,7 @@ SCRN.scrollUp >LDA.G CurX
dey
lda (pData),y
clc
ldy #ViewPortHm1
adc (pData),y
>ADC.G ViewPortHm1
bcc .1
inx

View File

@ -31,7 +31,7 @@ ZPPTR1 .BS 2
TmpCount .BS 1
TmpByte .BS 1
bNotRepaint .BS 1
bRepaint .BS 1
bSelected .BS 1
ZS.END .ED