Kernel 0.93++

This commit is contained in:
Rémy GIBERT 2020-02-02 19:24:40 +01:00
parent 686d4f8c66
commit ca2143fdba
6 changed files with 39 additions and 21 deletions

Binary file not shown.

View File

@ -26,6 +26,7 @@ CORE.Load.YAX stx M32.ACC X = Code to Execute
lda #8
jsr CORE.StkCheck
bcs .9
>LDYA ZPInputBuf
jsr CORE.StkPushYA

View File

@ -3,17 +3,17 @@ NEW
.LIST OFF
*--------------------------------------
HIS.Init >LDYAI HISTORY.MAX Get a buffer for History
>SYSCALL GetMem
>SYSCALL NewStkObj
bcs .9
>STYA ZPPTR1
txa
>STA.G HIS.hBuf
lda #0
sta (ZPPTR1)
>STA.G HIS.Count
>PUSHA
>PUSHWI 0
>SYSCALL StrVAdd Reset Buffer
>STZ.G HIS.Count
>STA.G HIS.Index
.9 rts
*--------------------------------------

View File

@ -435,10 +435,12 @@ CS.DOEVENT lda (pEvent)
*--------------------------------------
CS.QUIT jsr CORE.FUNCRESET
ldy #HIS.hBuf
jsr .7
>LDA.G HIS.hBuf
beq .1
>SYSCALL FreeStkObj
ldy #CL.hCLBuf
.1 ldy #CL.hCLBuf
jsr .7
ldy #CORE.hArgVBuf

View File

@ -386,11 +386,11 @@ K.SYSCALL.BANK .DA #RRAMWRAMBNK1 $00
.DA #$80
.DA #0 PWD
.DA #$80
.DA #0 StrV
.DA #$C0 StrV
.DA #$80
.DA #0
.DA #$C0
.DA #$80
.DA #0
.DA #$C0
.DA #$80
.DA #0
.DA #$80

View File

@ -8,12 +8,16 @@ NEW
* `>SYSCALL StrVShift`
* ## RETURN VALUE
*\--------------------------------------
K.StrVShift >PULLA index
K.StrVShift sta CLRREADAUX
>PULLA index
eor #$ff
tax
>PULLA
>SYSCALL GetMemPtr
sta SETREADAUX
jsr K.GetMemPtr
>STYA ZPPtr1 strV
.1 inx
@ -43,13 +47,15 @@ K.StrVShift >PULLA index
* CC: Y,A = Ptr
* CS: Y,A = NULL
*\--------------------------------------
K.StrVGet >PULLW FORPNT ptr
K.StrVGet sta CLRREADAUX
>PULLW FORPNT ptr
>PULLA index
eor #$ff
tax
>PULLA
sta SETREADAUX
jsr K.GetMemPtr
>STYA ZPPtr1 strV
@ -75,7 +81,7 @@ K.StrVGet >PULLW FORPNT ptr
.5 iny
lda (ZPPtr1),y
sta (FORPNT),y
jsr SHARED.FORPNT.PutY
bne .5
>LDYA FORPNT
@ -95,12 +101,21 @@ K.StrVGet >PULLW FORPNT ptr
* CC : str added to hSTRV
* CS : hSTRV full
*\--------------------------------------
K.StrVAdd >PULLW TXTPTR str
K.StrVAdd sta CLRREADAUX
>PULLW TXTPTR str
>PULLA
>SYSCALL GetMemPtr
sta SETREADAUX
jsr K.GetMemPtr
>STYA ZPPtr1
lda TXTPTR+1
bne .10
lda #1 for \0
sta (ZPPtr1)
clc
rts
.10 lda #1 for \0
sta ZPPtr2
stz ZPPtr2+1
@ -113,7 +128,7 @@ K.StrVAdd >PULLW TXTPTR str
.2 ldy #$ff
.3 iny
lda (TXTPTR),y
jsr SHARED.TXTPTR.GetY
bne .3
tya
@ -139,7 +154,7 @@ K.StrVAdd >PULLW TXTPTR str
.4 ldy #$ff
.5 iny
lda (TXTPTR),y
jsr SHARED.TXTPTR.GetY
sta (ZPPtr1),y
bne .5