mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-20 03:31:42 +00:00
Kernel 0.9.1 : KERNEL, Extending SScanf
This commit is contained in:
parent
2548c4d0d6
commit
9d9e3cda4e
Binary file not shown.
Binary file not shown.
@ -64,7 +64,7 @@ CS.RUN ldy #S.PS.ARGC
|
||||
>PUSHW L.SSCANF.IP
|
||||
lda #1
|
||||
>SYSCALL GetArg.A
|
||||
|
||||
|
||||
>SYSCALL SScanF.YA
|
||||
bcs .9
|
||||
|
||||
@ -117,8 +117,29 @@ CS.RUN.QUERY jsr Init.Timeout
|
||||
.9 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.ADD
|
||||
CS.RUN.ADD >PUSHEA.G DST.MAC+5
|
||||
>PUSHEA.G DST.MAC+4
|
||||
>PUSHEA.G DST.MAC+3
|
||||
>PUSHEA.G DST.MAC+2
|
||||
>PUSHEA.G DST.MAC+1
|
||||
>PUSHEA.G DST.MAC
|
||||
>PUSHW L.SSCANF.MAC
|
||||
lda #2
|
||||
>SYSCALL GetArg.A
|
||||
|
||||
>SYSCALL SScanF.YA
|
||||
bcs .9
|
||||
|
||||
>PUSHEA.G DST.MAC
|
||||
>PUSHEA.G DST.IP
|
||||
>LIBCALL hLIBTCPIP,LIBTCPIP.ARP.ADD
|
||||
bcc CS.RUN.DUMP
|
||||
|
||||
rts
|
||||
|
||||
.9 lda #K.E.SYN
|
||||
.99 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.DUMP >LIBCALL hLIBTCPIP,LIBTCPIP.ARP.GETCACHE
|
||||
>STYA ZPPTR1
|
||||
|
@ -173,8 +173,8 @@ K.GetC.CDEV ldx #DEVMGR.READ
|
||||
.1 jmp $ffff
|
||||
*--------------------------------------
|
||||
K.GetC.SSOCK lda (pDev) #S.NODE.HANDLER
|
||||
jsr K.GetMemPtr.A
|
||||
>STYA .1+1
|
||||
* jsr K.GetMemPtr.A
|
||||
* >STYA .1+1
|
||||
|
||||
* ldy #S.NODE.SSOCK.READ
|
||||
* lda (pDev),y
|
||||
@ -183,7 +183,7 @@ K.GetC.SSOCK lda (pDev) #S.NODE.HANDLER
|
||||
* ldy #S.NODE.SSOCK.HSKT
|
||||
* lda (pDev),y
|
||||
|
||||
.1 jmp $ffff
|
||||
*.1 jmp $ffff
|
||||
*--------------------------------------
|
||||
K.GetC.FIFO
|
||||
*/--------------------------------------
|
||||
@ -719,7 +719,7 @@ K.SScanF.U pha Save VAL size
|
||||
*--------------------------------------
|
||||
K.SScanF.HH
|
||||
K.SScanF.H pha
|
||||
|
||||
|
||||
jsr STDLIB.GetHex
|
||||
|
||||
K.SScanF.GetVAL tya Y=char count parsed
|
||||
|
@ -176,7 +176,10 @@ STDLIB.GetDec jsr STDLIB.32.Clear
|
||||
jsr MEM.IsDigit
|
||||
bcs .8
|
||||
|
||||
phy Save Y, pointing to next char
|
||||
jsr STDLIB.32.T10
|
||||
ply
|
||||
|
||||
bcs .9
|
||||
|
||||
lda (ZPPtr2),y
|
||||
@ -212,8 +215,6 @@ STDLIB.32.T10 ldx #3
|
||||
jsr STDLIB.32.T2 STDLIB.32 * 4 -> STDLIB.32
|
||||
bcs STDLIB.32.9 overflow!!!
|
||||
|
||||
phy Save Y, pointing to next char
|
||||
|
||||
ldx #0
|
||||
ldy #4
|
||||
|
||||
@ -226,8 +227,6 @@ STDLIB.32.T10 ldx #3
|
||||
dey
|
||||
bne .2
|
||||
|
||||
ply
|
||||
|
||||
bcs STDLIB.32.RTS overflow!!!
|
||||
|
||||
* STDLIB.32 * 2 -> STDLIB.32
|
||||
|
Loading…
Reference in New Issue
Block a user