mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 20:33:13 +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
|
||||
sty STDIO.Exit.Cnt+1 Total bytes to POP
|
||||
|
||||
stz PrintF.Cnt
|
||||
stz PrintF.Cnt+1
|
||||
|
||||
.1 jsr SHARED.GetCharPtr2
|
||||
bne .22
|
||||
|
||||
@ -240,6 +237,7 @@ PrintF.D clc unsigned short (BYTE)
|
||||
|
||||
ldy #1
|
||||
bra PrintF.NUM
|
||||
|
||||
PrintF.II sec signed int
|
||||
.HS 90 BCC
|
||||
PrintF.DD clc unsigned int (WORD)
|
||||
@ -255,6 +253,7 @@ PrintF.U clc unsigned long (DWORD)
|
||||
|
||||
PrintF.NUM ror ACC32.Sign
|
||||
jsr MATH32.ACC32ZERO
|
||||
|
||||
.1 jsr STDIO.GetStackByte
|
||||
bcs PrintF.B.RTS
|
||||
|
||||
@ -453,6 +452,19 @@ K.SScanF ldx #3
|
||||
K.SScanF.1 jsr STDIO.GetParams
|
||||
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?
|
||||
beq .8
|
||||
|
||||
@ -571,24 +583,18 @@ K.SScanF.S ldy #$ff
|
||||
|
||||
K.SScanF.Fwd jmp SHARED.AddYToPtr1 Y=char count parsed
|
||||
*--------------------------------------
|
||||
Scanf.GetC lda PrintF.hFILE
|
||||
beq .7
|
||||
|
||||
|
||||
bra *
|
||||
|
||||
|
||||
.7 lda (pIOBuf)
|
||||
Scanf.GetC phy
|
||||
ldy PrintF.Cnt
|
||||
lda (pIOBuf),y
|
||||
ply
|
||||
inc PrintF.Cnt
|
||||
beq .9
|
||||
|
||||
inc pIOBuf
|
||||
bne .8
|
||||
inc pIOBuf+1
|
||||
|
||||
.8 clc
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 sec
|
||||
|
||||
.9 lda #E.BUF
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
* Y = Bytecount
|
||||
@ -596,7 +602,10 @@ Scanf.GetC lda PrintF.hFILE
|
||||
* X = 2 : get format & hFile
|
||||
* X = 1 : get format only
|
||||
*--------------------------------------
|
||||
STDIO.GetParams lda (pStack) Bytecount
|
||||
STDIO.GetParams stz PrintF.Cnt
|
||||
stz PrintF.Cnt+1
|
||||
|
||||
lda (pStack) Bytecount
|
||||
|
||||
tay
|
||||
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.STDIO
|
||||
.INB USR/SRC/SYS/KERNEL.S.STDIO2
|
||||
.INB USR/SRC/SYS/KERNEL.S.DEV
|
||||
.EP
|
||||
A2osX.D1.S .EQ *-A2osX.D1.B
|
||||
|
||||
@ -112,6 +111,7 @@ A2osX.E0.B .PH $E000
|
||||
* go to A2osX.D1
|
||||
.INB USR/SRC/SYS/KERNEL.S.PIPE
|
||||
.INB USR/SRC/SYS/KERNEL.S.PFT
|
||||
.INB USR/SRC/SYS/KERNEL.S.DEV
|
||||
|
||||
DevMgr.Timer .BS 1
|
||||
DevMgr.Stat .DA DevMgr.FreeMem
|
||||
|
Loading…
Reference in New Issue
Block a user