Kernel 0.93

This commit is contained in:
Rémy GIBERT 2019-03-27 17:01:01 +00:00
parent 1c1c13a328
commit f9e0ce0fab
6 changed files with 61 additions and 36 deletions

Binary file not shown.

View File

@ -148,7 +148,7 @@ SYM.NewOrGetGlobal
SYM.NewGlobal jsr SYM.StoreGlobal
bcs .99
>DEBUG
>PUSHW ZPLinePtr Pass #1; try to add global...
>LDA.G SYM.hGlobalList
>SYSCALL SListNewKey
@ -285,11 +285,21 @@ SYM.StoreGlobal >LDA.G ASM.PASS
bne .1
inc
phy
pha
>PUSHYA
>PUSHBI 2
>LDYA L.MSG.WORD
>SYSCALL printf
pla
ply
.1 >PUSHYA
.2 >PUSHW ZPGlobalBuf
>PUSHW.G SYM.GlobalID
>LDA.G SYM.hGlobalList
>DEBUG
>SYSCALL SListAddData
bcs .9

View File

@ -169,7 +169,7 @@ GP.SysCall dec IRQ.InKernel
.7 ldx #$FF Self Modified
jmp (K.SYSCALL.JMP,x)
*--------------------------------------
GP.LibCall dec IRQ.InKernel
GP.LibCall dec IRQ.InLib
pha No need to save X, K.GetMemPtr will leave it unmodified
tya Get LIB hMem in A
@ -178,19 +178,20 @@ GP.LibCall dec IRQ.InKernel
pla
.1 jsr $FFFF SELF MODIFIED
GP.LibCall.8 inc IRQ.InKernel
GP.LibCall.8 inc IRQ.InLib
rts
*--------------------------------------
GP.AtkCall dec IRQ.InKernel
>STYA .1
jsr GO.ProDOS
jsr MLI
.DA #MLIATALK
.1 .DA *
jsr GO.A2osX
* >STYA .1
* jsr GO.ProDOS
* jsr MLI
* .DA #MLIATALK
*.1 .DA *
* jsr GO.A2osX
bra GP.LibCall.8
inc IRQ.InKernel
rts
*--------------------------------------
GP.RomCallPushFAC
jsr GP.ROMCALL
@ -364,6 +365,7 @@ IRQ.Mode .BS 1
IRQ.SkipA2osX .BS 1
IRQ.Tick .BS 1
IRQ.InKernel .BS 1
IRQ.InLib .BS 1
IRQ.IntNum .BS 1
IRQ.VBL.n0 .BS 1
IRQ.VBL.0n .BS 1

View File

@ -100,6 +100,7 @@ Kernel.Init3 sta SETALTZP
lda #$ff Make sure we are in Kernel Mode during setup
sta IRQ.InKernel
stz IRQ.InLib
sta CLRMIXED
sta CLRHIRES

View File

@ -176,6 +176,7 @@ K.IrqH.Switch inc IRQ.Tick
bpl .1
.2 lda IRQ.InKernel keep V flag set
ora IRQ.InLib
bpl .3
inc PS.Table.Hits

View File

@ -109,22 +109,35 @@ SLIST.AddData jsr SLIST.Select
>LDYA SLIST.KeyID Save DataLen location
>STYA ZPSListKeyID to update later
jsr SLIST.SkipData
lda ZPSListDataLen
ldy SLIST.BytePtr
lda (ZPSListDBlkPtr),y
pha
clc
adc SLIST.DataLen
sta SLIST.DataLen
adc ZPSListDataLen
sta (ZPSListDBlkPtr),y
php
jsr SLIST.ToNextByte skip LEN lo
plp
ldy SLIST.BytePtr
lda (ZPSListDBlkPtr),y
pha
adc ZPSListDataLen+1
sta (ZPSListDBlkPtr),y
jsr SLIST.ToNextByte skip LEN hi
plx
pla
jsr SLIST.SkipDataAX
lda ZPSListDataLen
eor #$ff
sta ZPSListDataLen
lda ZPSListDataLen+1
pha
adc SLIST.DataLen+1
sta SLIST.DataLen+1
pla
eor #$ff
sta ZPSListDataLen+1
@ -141,16 +154,7 @@ SLIST.AddData jsr SLIST.Select
.8 lda #0
jsr SLIST.AddBlockByte Make sure 0 follow DATA
bcs .9
jsr SLIST.Select.I go back to DataLen Location
lda SLIST.DataLen
jsr SLIST.SetBlockByte
lda SLIST.DataLen+1
jsr SLIST.SetBlockByte
clc
.9 rts
*--------------------------------------
SLIST.SetData jsr SLIST.Select
@ -233,7 +237,7 @@ SLIST.NewKey jsr SLIST.Search
cpy SLIST.KeyLen
bne .1
lda #0
lda #0 Data Len = 0
jsr SLIST.AddBlockByte
bcs .9
@ -241,6 +245,10 @@ SLIST.NewKey jsr SLIST.Search
jsr SLIST.AddBlockByte
bcs .9
lda #0 Next Len = 0
jsr SLIST.AddBlockByte
bcs .9
>LDYA ZPSListKeyID
ldx SLIST.KeyLen
clc
@ -265,8 +273,11 @@ SLIST.New >LDYAI 160 40k Max before out of memory!!!
stx .8+1
>LDYAI 256
jsr K.GetMem0
jsr K.GetMem
bcs .9
>STYA ZPSListDBlkPtr
lda #0
sta (ZPSListDBlkPtr)
txa
sta (ZPSListIBlkPtr)
@ -309,14 +320,10 @@ SLIST.Select.I ldy ZPSListKeyID+1
SLIST.Search jsr K.GetMemPtr
>STYA ZPSListIBlkPtr
stz SLIST.BlockPtr
lda (ZPSListIBlkPtr)
jsr K.GetMemPtr
>STYA ZPSListDBlkPtr
stz SLIST.BytePtr
ldy #$ff
.1 iny
@ -325,6 +332,9 @@ SLIST.Search jsr K.GetMemPtr
sty SLIST.KeyLen
stz SLIST.BytePtr
stz SLIST.BlockPtr
.2 >LDYA SLIST.KeyID
>STYA ZPSListKeyID
@ -367,7 +377,7 @@ SLIST.Search jsr K.GetMemPtr
SLIST.Next jsr SLIST.SkipKey
SLIST.SkipData jsr SLIST.GetDataLen
lda SLIST.DataLen
ldx SLIST.DataLen+1
SLIST.SkipDataAX
@ -409,6 +419,7 @@ SLIST.GetDataLen
SLIST.GetNextByte
ldy SLIST.BytePtr
lda (ZPSListDBlkPtr),y
SLIST.ToNextByte
inc SLIST.BytePtr
bne .8
@ -430,7 +441,7 @@ SLIST.AddBlockByte
phx
>LDYAI 256
jsr K.GetMem0
jsr K.GetMem
bcs .9
>STYA ZPSListDBlkPtr
txa