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

View File

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

View File

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