Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-10-05 08:25:15 +02:00
parent 66f6298626
commit 006a952ac3
5 changed files with 25 additions and 9 deletions

Binary file not shown.

Binary file not shown.

View File

@ -116,7 +116,7 @@ Kernel.Init3 sta SETALTZP
>PUSHBI 0
>LDYAI MSG.Init3
>SYSCALL printf
jsr CPU.Init.6502
jsr CPU.Init.Z80
jsr DevMgrInit
@ -291,11 +291,12 @@ PS0.Init >LDYAI CORE.S.PS0 Select Process 0 (Kernel)
>LDYAI K.STACKTOP
>STYA pStack
>PUSHWI 0
>PUSHBI 0
>LDYAI DEV.SYS
>SYSCALL fopen
bcs .9
ldy #S.PS.hStdIn
sta (pPs),y
sta CORE.S.PS0+S.PS.hStdIn
@ -505,6 +506,18 @@ MemMgrInit >LDYAI Mem.MHiMem
sta CLRWRITEAUX
ldx #K.Dev.MAX*4-1
.1 stz Dev.Table.hFD,x
dex
bpl .1
ldx #K.NOD.MAX*2-1
.2 stz Nod.Table.hPath,x
dex
bpl .2
rts
*--------------------------------------
* Setup AuxLC $FFFE->Kernel IRQ Handler

View File

@ -47,10 +47,11 @@ IO.Open.I jsr STDIO.SetMLIPathYA
bcs IO.OPEN.RTS
>STYA pFD
stx .1+1 DEVID
phx DEVID
lda (pFD) #S.FD.T
tax
pla
jmp (.3,x)
.3 .DA STDIO.IOERR REG
@ -154,14 +155,16 @@ K.IO.OPEN.REG.E >LDYAI S.FD.REG
sec
rts
*--------------------------------------
IO.OPEN.CDEV jsr K.IOCTL.GetPDrv
IO.OPEN.CDEV sta .1+1 A=DEVID
pha
jsr K.IOCTL.GetPDrv
.1 lda #$ff SELF MODIFIED pass A=DEVID To Driver
ldx #IOCTL.OPEN
.2 jsr K.IOCTL.pDrvJmp
pla pass A=DEVID To Driver
jsr K.IOCTL.pDrvJmp
bcs .9
ldx .1+1
.1 ldx #$ff SELF MODIFIED
lda Dev.Table.hFD,x
.9 rts
*--------------------------------------

View File

@ -113,7 +113,7 @@ K.FPutS jsr STDIO.GetHFile
* `int fprintf ( hFILE stream, const char * format, ... );`
* ## ASM
* **In:**
* PrintF : (example is for printing Y,A as integer : format="Y,A= %I", 2 bytes)
* PrintF : (example is for printing Y,A as integer : format="%I", 2 bytes)
* `>PUSHYA`
* `...`
* `>PUSHBI bytecount`
@ -1331,7 +1331,7 @@ STDIO.GetHFileREG
.9 rts
*--------------------------------------
STDIO.GetHFile tay
lda Dev.Table.hFD,y
lda Nod.Table.hFD,y
beq STDIO.GetHFile.9
jsr K.GetMemPtr
>STYA pFD