Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-08-23 22:38:32 +02:00
parent c0fbe3b8e3
commit 27fa64618a
5 changed files with 45 additions and 67 deletions

Binary file not shown.

Binary file not shown.

View File

@ -3,14 +3,14 @@ PREFIX /A2OSX.BUILD
AUTO 4,1
.LIST OFF
*--------------------------------------
SCRN.Init ldy #ScreenH
lda (pData),y
SCRN.Init >LDA.G ScreenH
dec
>PUSHA
>PUSHBI 1
>LDYA L.SEQ.INIT
>SYSCALL printf
bcs .9
lda #12
>SYSCALL PutChar
bcs .9
@ -45,8 +45,7 @@ SCRN.UpdateTopBar
jsr SCRN.InvLineA
bcs .9
ldy #hFileName
lda (pData),y
>LDA.G hFileName
beq .1
>SYSCALL GetMemPtr
bra .2
@ -60,8 +59,7 @@ SCRN.UpdateTopBar
.9 rts
*--------------------------------------
SCRN.UpdateMain ldy #ScreenY
lda (pData),y
SCRN.UpdateMain >LDA.G ScreenY
sta TmpIndex
iny
lda (pData),y
@ -70,12 +68,12 @@ SCRN.UpdateMain ldy #ScreenY
lda #0
sta TmpByte
ldy #ViewPortH
lda (pData),y
>LDA.G ViewPortH
sta TmpCount
.1 lda TmpIndex
ldx TmpIndex+1
jsr BUF.GetLineAX Y = line length
bcs .5
@ -96,6 +94,7 @@ SCRN.UpdateMain ldy #ScreenY
ldy TmpByte
jsr GotoXY
bcs .9
>PUSHBI 0
>LDYA L.SEQ.CEOL
>SYSCALL printf
@ -110,22 +109,19 @@ SCRN.UpdateMain ldy #ScreenY
.9 rts
*--------------------------------------
SCRN.UpdateCurrentLine
ldy #ScreenY+1
lda (pData),y
>LDA.G ScreenY+1
tax
dey
lda (pData),y
clc
ldy #CurY
adc (pData),y
>ADC.G CurY
bcc .1
inx
.1 jsr BUF.GetLineAX
bcs .9
phy
ldy #CurY
lda (pData),y
>LDA.G CurY
ply
jsr SCRN.UpdateLineAtALenY
.9 rts
@ -138,12 +134,10 @@ SCRN.UpdateLineAtALenY
jsr GotoXY
bcs .9
ldy #ScreenW
lda (pData),y
>LDA.G ScreenW
tax
ldy #ScreenX
lda (pData),y
>LDA.G ScreenX
tay
.1 cpy TmpLen
@ -173,6 +167,7 @@ SCRN.UpdateLineAtALenY
.3 sec
jsr SCRN.UpdateAttrC
bcs .9
>PUSHBI 0
>LDYA L.SEQ.CEOL
>SYSCALL printf
@ -207,38 +202,34 @@ SCRN.UpdateAttrC
.9 jmp Ctrl.Q
*--------------------------------------
SCRN.UpdateStatusBar
lda #1
>PUSHA
ldy #ScreenH
lda (pData),y
>PUSHA
>PUSHBI 1
>PUSHB.G ScreenH
>PUSHBI 2
>LDYA L.MSG.GOTOXY
>SYSCALL printf
bcs .9
>PUSHBI 0
>LDYA L.SEQ.INV
>SYSCALL printf
bcs .9
ldy #PromptMode
lda (pData),y
>LDA.G PromptMode
bne .2
ldy #FileY
lda (pData),y
>LDA.G FileY
tax
iny
lda (pData),y
inx
bne .1
inc
.1 >PUSHA
txa
>PUSHA
ldy #FileX
lda (pData),y
>LDA.G FileX
inc
>PUSHA
@ -246,7 +237,7 @@ SCRN.UpdateStatusBar
>PUSHB (pData),y
dey
>PUSHB (pData),y
>PUSHBI 6
>PUSHBI 5
>LDYA L.MSG.STATUSBAR
>SYSCALL printf
bcs .9
@ -268,8 +259,8 @@ SCRN.UpdateStatusBar
lda #2
.3 >PUSHA
ldy #ScreenH
lda (pData),y
>LDA.G ScreenH
jsr SCRN.InvLineA
bcs .9
@ -283,14 +274,13 @@ SCRN.UpdateStatusBar
rts
*--------------------------------------
SCRN.UpdateStatusBarErrA
sta .1+1
pha
ldy #ScreenH
lda (pData),y
dec
jsr SCRN.InvLineA
bcs .9
.1 lda #$ff
pla
>PUSHA
>PUSHBI 1
>LDYA L.MSG.STATUSBAR.E

View File

@ -110,8 +110,7 @@ CS.INIT lda #$ff
>SYSCALL RealPath
txa
ldy #hFileName
sta (pData),y
>STA.G hFileName
jsr LoadFile
bcc .8 if CS, Failed to load file, keep name, but new file....
@ -132,7 +131,7 @@ CS.INIT lda #$ff
*--------------------------------------
CS.RUN >PUSHBI 0
>LDYA L.SEQ.DETECT
>SYSCALL printf Send Query for term W & H
>SYSCALL printf Send Query for term W & H
bcs .9
.1 >SLEEP
@ -141,15 +140,13 @@ CS.RUN >PUSHBI 0
jsr CharIn
ldy #ScreenW Wait for Response from terminal
lda (pData),y for W & H
>LDA.G ScreenW Wait for Response from terminal for W & H
beq .1
jsr SCRN.Init
bcs .9
.2 ldy #bCancel
lda (pData),y
.2 >LDA.G bCancel
bne .99
>SLEEP
@ -161,36 +158,31 @@ CS.RUN >PUSHBI 0
bra .2
.99 lda #0
.9 sec
rts
.9
*--------------------------------------
CS.DOEVENT sec
rts
*--------------------------------------
CS.QUIT ldy #hBuffer
lda (pData),y
beq .1
>SYSCALL FreeMem
jsr .8
.1 ldy #hBufferBackup
lda (pData),y
beq .2
>SYSCALL FreeMem
ldy #hBufferBackup
jsr .8
.2 ldy #hClipBoard
lda (pData),y
beq .3
>SYSCALL FreeMem
ldy #hClipBoard
jsr .8
.3 ldy #hFileName
lda (pData),y
beq .8
ldy #hFileName
.8 lda (pData),y
beq .9
>SYSCALL FreeMem
.9 rts
.8 >PUSHBI 0
>PUSHBI 0
>LDYA L.SEQ.RESET
>SYSCALL printf
.9 rts
rts
*--------------------------------------
CharIn tax
@ -343,8 +335,7 @@ CharIn.Esc ldy #bEscMode
LoadFile >PUSHWI 0 Aux type
>PUSHBI 4 S.FI.T.TXT
>PUSHBI SYS.FOpen.R
ldy #hFileName
lda (pData),y
>LDA.G hFileName
>SYSCALL GetMemPtr
@ -362,8 +353,7 @@ LoadFile >PUSHWI 0 Aux type
>STYA ZPPTR2
txa
ldy #hBuffer
sta (pData),y
>STA.G hBuffer
lda hMem

View File

@ -471,13 +471,13 @@ CS.RUN.FILE.MSG clc
ldy #hDstFullPath
jsr CS.RUN.GetPathY
>PUSHYA
.FIN
ldy #hSrcFullPath
jsr CS.RUN.GetPathY
>PUSHYA
.DO X.COPY.TO.DEST=1
@ -489,8 +489,6 @@ CS.RUN.FILE.MSG clc
.FIN
>PUSHYA
plp
bcc .1
>LDYA L.MSG.DIR