Kernel 0.93

This commit is contained in:
Rémy GIBERT 2019-07-16 17:42:36 +02:00
parent b8dda73b1b
commit 83aa8f705e
6 changed files with 81 additions and 95 deletions

Binary file not shown.

View File

@ -155,9 +155,18 @@ K.MKDev jsr MEM.SPtr1PPtr2 ptr1=fd, ptr2=name
* sec
.99 rts
.7 lda pFD
.7 ldy #S.FD.DEV.DRVPTR
lda (pFD),y
sta ZPPtr1
iny
lda (pFD),y
sta ZPPtr1+1
ldy #IOCTL.IRQ+4
lda (ZPPtr1),y
sta IRQ.Vectors,x
lda pFD+1
iny
lda (ZPPtr1),y
sta IRQ.Vectors+1,x
.8 lda DevMgr.DevIdx

View File

@ -27,10 +27,10 @@ K.IrqHAuxLC cld
stx K.IrqHAuxLC.5+1
sty K.IrqHAuxLC.4+1
lda $fe Save 2 bytes in ZP
pha
lda $ff
pha
* lda $fe Save 2 bytes in ZP
* pha
* lda $ff
* pha
lda RDPAGE2
pha
@ -86,10 +86,11 @@ K.IrqHAuxLC.3 pla Must keep Carry
sta SETPAGE2
.3 pla
sta $ff
pla
sta $fe
.3
* pla
* sta $ff
* pla
* sta $fe
bvc K.IrqHAuxLC.4 if V, skip task switching
@ -204,20 +205,11 @@ K.IrqH.DEV ldx #0
.1 lda IRQ.Vectors+1,x
beq .9
sta $ff
lda IRQ.Vectors,x
sta $fe
ldy #S.FD.DEV.DRVPTR
lda ($fe),y
sta .10+1
iny
lda ($fe),y
sta .10+2
lda IRQ.Vectors,x
sta .10+1
phx
ldx #IOCTL.IRQ
.10 jsr $ffff SELF MODIFIED
plx

View File

@ -198,14 +198,13 @@ MATH.DIVMOD php
.3 bvs MATH.PutARG32 DIV
*--------------------------------------
MATH.PutTMP32 ldy #0 MOD
ldx #3
MATH.PutTMP32 ldy #3 MOD
.1 lda TMP32,y
sta (pStack),y
iny
dex
dey
bpl .1
rts
*--------------------------------------
MATH.PutNotTMP32
@ -224,14 +223,13 @@ MATH.PutNotTMP32
rts
*--------------------------------------
MATH.PutARG32 ldy #0
ldx #3
MATH.PutARG32 ldy #3
.1 lda ARG32,y
sta (pStack),y
iny
dex
dey
bpl .1
rts
*--------------------------------------
MATH.PutNotARG32
@ -250,12 +248,12 @@ MATH.PutNotARG32
rts
*--------------------------------------
MATH.PopACC32 ldy #$ff
MATH.PopACC32 ldy #0
.1 iny
lda (pStack),y
.1 lda (pStack),y
sta ACC32,y
cpy #3
iny
cpy #4
bne .1
sta ACC32.Sign
@ -267,12 +265,12 @@ MATH.PopACC32 ldy #$ff
rts
*--------------------------------------
MATH.GetARG32 ldy #$ff
MATH.GetARG32 ldy #0
.1 iny
lda (pStack),y
.1 lda (pStack),y
sta ARG32,y
cpy #3
iny
cpy #4
bne .1
sta ARG32.Sign

View File

@ -204,7 +204,6 @@ K.FPutS jsr PFT.CheckNodeA set IO.hFD
* CS : error, A = code from Output
* Specifiers :
* + %b : pull 1 byte to Print BIN
* + %B : pull 2 bytes to Print BIN
* + %d : pull 1 byte unsigned DEC 0..255
* + %D : pull 2 bytes unsigned DEC 0..65535
* + %u : pull 4 bytes long unsigned DEC 0..4294967295
@ -327,10 +326,16 @@ K.PrintF.1 stz PrintF.Cnt
lda (ZPPtr2)
beq .7
.6 jsr K.PrintF.CheckTBL1 do we have a %x command?
bcs .20
.6 ldx #PrintFTBL1.Cnt-1 do we have a %x command?
jsr MEM.NextCharPtr2
.61 cmp PrintFTBL1,x
beq .62
dex
bpl .61
bra .20 unknown ...
.62 jsr MEM.NextCharPtr2
txa yes, jmp to it!
asl
@ -433,29 +438,15 @@ PrintF.LocalGetByte
* sec
rts
*--------------------------------------
K.PrintF.CheckTBL1
ldx #PrintFTBL1.Cnt-1
.1 cmp PrintFTBL1,x
beq .8
dex
bpl .1
sec no valid letter...
rts
.8 clc
rts
*--------------------------------------
PrintF.ESC jmp (.1,x)
.1 .DA PrintF.B,PrintF.BB
.1 .DA PrintF.B
.DA PrintF.D,PrintF.DD,PrintF.U
.DA PrintF.E,PrintF.F
.DA PrintF.H,PrintF.HH
.DA PrintF.I,PrintF.II,PrintF.L
.DA PrintF.S,PrintF.SS
*--------------------------------------
PrintFTBL1 .AS "bBdDuefhHiILsS"
PrintFTBL1 .AS "bdDuefhHiILsS"
PrintFTBL1.Cnt .EQ *-PrintFTBL1
PrintFTBL2 .AS "befnrtv\%"
PrintFTBL2.Cnt .EQ *-PrintFTBL2
@ -463,19 +454,10 @@ PrintFTBL2.OUT .HS 08.1B.0C.0A.0D.09.0B \b\e\f\n\r\t\v
.DA #'\' \\
.DA #'%' \%
*--------------------------------------
PrintF.BB jsr PrintF.LocalGetByte
bcs PrintF.B.RTS
pha
jsr PrintF.B
plx
bcs PrintF.B.RTS
txa
bra PrintF.B.1
*--------------------------------------
PrintF.B jsr PrintF.LocalGetByte
bcs PrintF.B.RTS
PrintF.B.1 ldy #8
ldy #8
.1 asl
pha

View File

@ -40,7 +40,7 @@ K.Time >PUSHYA
* ## RETURN VALUE
*\--------------------------------------
K.PTime2Time jsr MEM.SPtr1PPtr2
TIME.PTime2TimeP1P2
ldy #1
lda (ZPPtr1),y Get Year
lsr C is high bit of month
@ -403,37 +403,46 @@ K.StrFTime.JMP .DA K.StrFTime.A
.DA K.StrFTime.Y
.DA K.StrFTime.YY
*--------------------------------------
K.StrFTime.A ldx #3 Short day of week, 3 chars...
.HS 2C Bit abs
K.StrFTime.A sec Short day of week, 3 chars...
.HS 90 BCC
K.StrFTime.AA ldx #15 full DoW
>LDYAI K.StrFTime.DAY
>STYA ZPPtr4
K.StrFTime.AA clc full DoW
lda #K.StrFTime.DAY
ldx /K.StrFTime.DAY
ldy #S.Time.WDAY
bra K.StrFTime.STR
K.StrFTime.B ldx #3 Short Month, 3 chars....
.HS 2C Bit abs
K.StrFTime.B sec Short Month, 3 chars....
.HS 90 BCC
K.StrFTime.BB ldx #15 full Month....
>LDYAI K.StrFTime.MON
>STYA ZPPtr4
K.StrFTime.BB clc full Month....
lda #K.StrFTime.MON
ldx /K.StrFTime.MON
ldy #S.Time.MONTH
K.StrFTime.STR lda (ZPPtr3),y get required S.Time field value
tay
beq .9 Illegal value
K.StrFTime.STR sta ZPPtr4
stx ZPPtr4+1
.1 dey range 0..x
beq .2
lda (ZPPtr4)
ldx #15
bcc .10
ldx #3
.10 lda (ZPPtr3),y get required S.Time field value
tay
beq .2 Illegal value, print ???
.1 lda (ZPPtr4)
sec
adc ZPPtr4
sta ZPPtr4
bcc .1
bcc .11
inc ZPPtr4+1
bra .1
.11 dey
bne .1
.2
* ldy #0 Y is already 0
@ -446,14 +455,8 @@ K.StrFTime.STR lda (ZPPtr3),y get required S.Time field value
dex
bne .3
.8 rts
.9 ldx #3
lda #'?'
.99 jsr MEM.PutCharPtr1
dex
bne .99
rts
.8 rts
*--------------------------------------
K.StrFTime.II ldy #S.Time.HOUR
lda (ZPPtr3),y
@ -503,7 +506,8 @@ K.StrFTime.addDecA
lda A2osX.NumStrBuf+1
jmp MEM.PutCharPtr1
*--------------------------------------
K.StrFTime.DAY >PSTR "Monday"
K.StrFTime.DAY >PSTR "???"
>PSTR "Monday"
>PSTR "Tuesday"
>PSTR "Wednesday"
>PSTR "Thursday"
@ -511,7 +515,8 @@ K.StrFTime.DAY >PSTR "Monday"
>PSTR "Saturday"
>PSTR "Sunday"
*--------------------------------------
K.StrFTime.MON >PSTR "January"
K.StrFTime.MON >PSTR "???"
>PSTR "January"
>PSTR "February"
>PSTR "March"
>PSTR "April"