mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-10 18:34:45 +00:00
Kernel 0.94
This commit is contained in:
parent
6eaa0718ba
commit
26d16e1e37
Binary file not shown.
@ -273,12 +273,17 @@ CS.RUN.LOOP >SLEEP
|
||||
tay
|
||||
bne .2
|
||||
|
||||
lda #"I"
|
||||
sta $427
|
||||
>PUSHWI MSGSIZE
|
||||
>PUSHW ZPMsgPtr
|
||||
lda hFile
|
||||
>SYSCALL fgets
|
||||
bcs .9
|
||||
|
||||
lda #"O"
|
||||
sta $427
|
||||
|
||||
jsr CS.RUN.REQ
|
||||
bcs .9
|
||||
|
||||
@ -848,7 +853,7 @@ CS.RUN.CHARIN.INS
|
||||
CS.RUN.CHARIN.CTRL
|
||||
cmp #C.CR
|
||||
bne .1
|
||||
|
||||
|
||||
bit bJoin
|
||||
bpl .8
|
||||
|
||||
|
@ -19,8 +19,8 @@ K.PutChar >PUSHA character
|
||||
jsr K.FPutC
|
||||
bcc K.PutChar.RTS
|
||||
|
||||
tay E.NODATA
|
||||
bpl K.PutChar.RTS
|
||||
cmp #E.NODATA
|
||||
bne K.PutChar.RTS
|
||||
|
||||
inc 0 = BLOCKING
|
||||
|
||||
@ -54,8 +54,8 @@ K.FPutC jsr PFT.CheckNodeA
|
||||
>PUSHWI K.IOBuf buf
|
||||
jsr UNISTD.Write
|
||||
bcc K.PutChar.RET1 pop char...
|
||||
tay E.NODATA
|
||||
bpl K.PutChar.RET1
|
||||
cmp #E.NODATA
|
||||
bne K.PutChar.RET1
|
||||
|
||||
inc 0 = BLOCKING
|
||||
* sec
|
||||
@ -106,7 +106,8 @@ K.PutS >STYA ZPPtr2
|
||||
lda (pPS),y
|
||||
jsr K.FPutS
|
||||
bcc K.PutS.RTS
|
||||
tay
|
||||
|
||||
cmp #E.NODATA
|
||||
bne K.PutS.RTS 0 = BLOCKING
|
||||
|
||||
* sec
|
||||
@ -153,8 +154,9 @@ K.FPutS jsr PFT.CheckNodeA set IO.hFD
|
||||
>PUSHW ZPPtr2
|
||||
jsr UNISTD.Write
|
||||
bcc K.PutS.RET2
|
||||
tay
|
||||
bpl K.PutS.RET2 IO Error
|
||||
|
||||
cmp #E.NODATA
|
||||
bne K.PutS.RET2 IO Error
|
||||
inc FF-> 0 = BLOCKING
|
||||
* sec
|
||||
K.FPutS.RTS rts
|
||||
@ -199,11 +201,13 @@ K.FGetS jsr PFT.CheckNodeA
|
||||
|
||||
.1 jsr STDIO.Get.1
|
||||
bcc .2
|
||||
|
||||
cmp #MLI.E.EOF
|
||||
beq .9
|
||||
|
||||
tay
|
||||
bpl .9 IO error
|
||||
cmp #E.NODATA
|
||||
bne .9 IO error
|
||||
|
||||
inc NO DATA -> BLOCKING
|
||||
rts
|
||||
|
||||
@ -235,12 +239,15 @@ K.FGetS jsr PFT.CheckNodeA
|
||||
lda K.IOBuf
|
||||
cmp #C.CR
|
||||
beq .8
|
||||
|
||||
jsr SHARED.PutCharPtr2
|
||||
bra .3
|
||||
|
||||
.5 cmp #MLI.E.EOF
|
||||
beq .8 String terminated by EOF
|
||||
tay
|
||||
bpl .9 I/O error
|
||||
|
||||
cmp #E.NODATA
|
||||
bne .9 I/O error
|
||||
|
||||
lda ZPPtr2 NO DATA, but string not yet terminated
|
||||
sta (pStack) s
|
||||
@ -297,8 +304,9 @@ K.GetC jsr PFT.CheckNodeA
|
||||
|
||||
jsr STDIO.Get.1
|
||||
bcc .8
|
||||
tay
|
||||
bpl K.GetC.RTS I/O error
|
||||
|
||||
cmp #E.NODATA
|
||||
bne K.GetC.RTS I/O error
|
||||
|
||||
inc 0 = BLOCKING
|
||||
rts
|
||||
@ -431,8 +439,8 @@ K.FWrite jsr PFT.CheckNodeA
|
||||
jsr UNISTD.Write
|
||||
bcc K.FWrite.RTS
|
||||
|
||||
K.FWrite.9 tay
|
||||
bpl K.FWrite.RTS IO Error
|
||||
K.FWrite.9 cmp #E.NODATA
|
||||
bne K.FWrite.RTS IO Error
|
||||
|
||||
dec pStack FF = NODATA
|
||||
dec pStack
|
||||
|
@ -77,7 +77,6 @@ A2osX.D1.B .PH $D000
|
||||
.INB usr/src/sys/kernel.s.unistd
|
||||
.INB usr/src/sys/kernel.s.stdio
|
||||
.INB usr/src/sys/kernel.s.stdio2
|
||||
.INB usr/src/sys/kernel.s.dev
|
||||
.EP
|
||||
A2osX.D1.S .EQ *-A2osX.D1.B
|
||||
|
||||
@ -117,6 +116,7 @@ A2osX.E0.B .PH $E000
|
||||
.INB usr/src/sys/kernel.s.mem
|
||||
* go to A2osX.D1
|
||||
.INB usr/src/sys/kernel.s.pipe
|
||||
.INB usr/src/sys/kernel.s.dev
|
||||
|
||||
DevMgr.Timer .BS 1
|
||||
DevMgr.Stat .DA DevMgr.FreeMem
|
||||
|
Loading…
x
Reference in New Issue
Block a user