mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-29 17:50:18 +00:00
Kernel 0.94
This commit is contained in:
parent
044e5b5c09
commit
c1371cc7c6
Binary file not shown.
@ -90,9 +90,6 @@ K.SPrintf ldx #3
|
|||||||
K.PrintF.1 jsr STDIO.GetParams
|
K.PrintF.1 jsr STDIO.GetParams
|
||||||
sty STDIO.Exit.Cnt+1 Total bytes to POP
|
sty STDIO.Exit.Cnt+1 Total bytes to POP
|
||||||
|
|
||||||
stz PrintF.Cnt
|
|
||||||
stz PrintF.Cnt+1
|
|
||||||
|
|
||||||
.1 jsr SHARED.GetCharPtr2
|
.1 jsr SHARED.GetCharPtr2
|
||||||
bne .22
|
bne .22
|
||||||
|
|
||||||
@ -240,6 +237,7 @@ PrintF.D clc unsigned short (BYTE)
|
|||||||
|
|
||||||
ldy #1
|
ldy #1
|
||||||
bra PrintF.NUM
|
bra PrintF.NUM
|
||||||
|
|
||||||
PrintF.II sec signed int
|
PrintF.II sec signed int
|
||||||
.HS 90 BCC
|
.HS 90 BCC
|
||||||
PrintF.DD clc unsigned int (WORD)
|
PrintF.DD clc unsigned int (WORD)
|
||||||
@ -255,6 +253,7 @@ PrintF.U clc unsigned long (DWORD)
|
|||||||
|
|
||||||
PrintF.NUM ror ACC32.Sign
|
PrintF.NUM ror ACC32.Sign
|
||||||
jsr MATH32.ACC32ZERO
|
jsr MATH32.ACC32ZERO
|
||||||
|
|
||||||
.1 jsr STDIO.GetStackByte
|
.1 jsr STDIO.GetStackByte
|
||||||
bcs PrintF.B.RTS
|
bcs PrintF.B.RTS
|
||||||
|
|
||||||
@ -453,6 +452,19 @@ K.SScanF ldx #3
|
|||||||
K.SScanF.1 jsr STDIO.GetParams
|
K.SScanF.1 jsr STDIO.GetParams
|
||||||
sty STDIO.Exit.Cnt+1 Total bytes to POP
|
sty STDIO.Exit.Cnt+1 Total bytes to POP
|
||||||
|
|
||||||
|
ldx PrintF.hFILE
|
||||||
|
beq .1
|
||||||
|
|
||||||
|
>PUSHWI 256
|
||||||
|
>PUSHW pIOBuf
|
||||||
|
txa
|
||||||
|
jsr K.FGetS
|
||||||
|
bcc .1
|
||||||
|
|
||||||
|
tax
|
||||||
|
bne PrintF.PutC.RTS
|
||||||
|
>RET 4
|
||||||
|
|
||||||
.1 jsr SHARED.GetCharPtr2 End Of format?
|
.1 jsr SHARED.GetCharPtr2 End Of format?
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
@ -571,24 +583,18 @@ K.SScanF.S ldy #$ff
|
|||||||
|
|
||||||
K.SScanF.Fwd jmp SHARED.AddYToPtr1 Y=char count parsed
|
K.SScanF.Fwd jmp SHARED.AddYToPtr1 Y=char count parsed
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Scanf.GetC lda PrintF.hFILE
|
Scanf.GetC phy
|
||||||
beq .7
|
ldy PrintF.Cnt
|
||||||
|
lda (pIOBuf),y
|
||||||
|
ply
|
||||||
bra *
|
inc PrintF.Cnt
|
||||||
|
|
||||||
|
|
||||||
.7 lda (pIOBuf)
|
|
||||||
beq .9
|
beq .9
|
||||||
|
|
||||||
inc pIOBuf
|
clc
|
||||||
bne .8
|
|
||||||
inc pIOBuf+1
|
|
||||||
|
|
||||||
.8 clc
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.9 sec
|
.9 lda #E.BUF
|
||||||
|
sec
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* Y = Bytecount
|
* Y = Bytecount
|
||||||
@ -596,7 +602,10 @@ Scanf.GetC lda PrintF.hFILE
|
|||||||
* X = 2 : get format & hFile
|
* X = 2 : get format & hFile
|
||||||
* X = 1 : get format only
|
* X = 1 : get format only
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
STDIO.GetParams lda (pStack) Bytecount
|
STDIO.GetParams stz PrintF.Cnt
|
||||||
|
stz PrintF.Cnt+1
|
||||||
|
|
||||||
|
lda (pStack) Bytecount
|
||||||
|
|
||||||
tay
|
tay
|
||||||
sty STDIO.GetStackByte.ptr+1
|
sty STDIO.GetStackByte.ptr+1
|
||||||
|
@ -73,7 +73,6 @@ A2osX.D1.B .PH $D000
|
|||||||
.INB USR/SRC/SYS/KERNEL.S.UNISTD
|
.INB USR/SRC/SYS/KERNEL.S.UNISTD
|
||||||
.INB USR/SRC/SYS/KERNEL.S.STDIO
|
.INB USR/SRC/SYS/KERNEL.S.STDIO
|
||||||
.INB USR/SRC/SYS/KERNEL.S.STDIO2
|
.INB USR/SRC/SYS/KERNEL.S.STDIO2
|
||||||
.INB USR/SRC/SYS/KERNEL.S.DEV
|
|
||||||
.EP
|
.EP
|
||||||
A2osX.D1.S .EQ *-A2osX.D1.B
|
A2osX.D1.S .EQ *-A2osX.D1.B
|
||||||
|
|
||||||
@ -112,6 +111,7 @@ A2osX.E0.B .PH $E000
|
|||||||
* go to A2osX.D1
|
* go to A2osX.D1
|
||||||
.INB USR/SRC/SYS/KERNEL.S.PIPE
|
.INB USR/SRC/SYS/KERNEL.S.PIPE
|
||||||
.INB USR/SRC/SYS/KERNEL.S.PFT
|
.INB USR/SRC/SYS/KERNEL.S.PFT
|
||||||
|
.INB USR/SRC/SYS/KERNEL.S.DEV
|
||||||
|
|
||||||
DevMgr.Timer .BS 1
|
DevMgr.Timer .BS 1
|
||||||
DevMgr.Stat .DA DevMgr.FreeMem
|
DevMgr.Stat .DA DevMgr.FreeMem
|
||||||
|
Loading…
Reference in New Issue
Block a user