Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-07-24 08:24:23 +02:00
parent 082f899a56
commit 62efb2d2e0
10 changed files with 48 additions and 31 deletions

View File

@ -558,18 +558,21 @@ Prints C-Style String
**In:**
PrintF : (example is for printing Y,A as integer : format="Y,A= %I", 2 bytes)
`>PUSHYA`
`>PUSHBI 2`
`...`
`>PUSHBI bytecount`
`>LDYAI format`
`>SYSCALL printf`
SPrintF :
`>PUSHYA`
`>PUSHBI 2`
`...`
`>PUSHBI bytecount`
`>PUSHWI format`
`>LDYAI str`
`>SYSCALL sprintf`
FPrintF :
`>PUSHYA`
`>PUSHBI 2`
`...`
`>PUSHBI bytecount`
`>PUSHWI format`
`lda hFILE`
`>SYSCALL fprintf`
@ -635,12 +638,11 @@ Get char from Node
Read formatted data from string
## C
`int sscanf ( const char * s, const char * format, ...);`
`int sscanf ( const char * s, const char * format, ... );`
## ASM
**In:**
`>PUSHBI Argument Byte count`
`>PUSHWI format`
+ %i : short int
+ %d : byte
+ %I : int
@ -650,6 +652,10 @@ Read formatted data from string
+ %h : HEX byte
+ %H : HEX word
`>PUSHW ptr`
`...`
`>PUSHBI bytecount`
`>PUSHWI format`
`>LDYA s`
**Out:**
Y,A = Number of arguments filled.

View File

@ -2,6 +2,11 @@
# GetProDOSCatSize
Compute space needed for ProDOS Catalog
## C
int getprodoscatsize (short int options, short int catsize, int devsize );
## ASM
**In:**
PUSHW = DevSize (in 512b blocks)
PUSHB = Catalog Size (in blocks)

View File

@ -60,13 +60,13 @@
YA = PTR to new S.SOCKET
X = hSocket
# SKT.CloseA
# SKT.Close
Close socket
**In:**
A = hSocket
**Out:**
# SKT.GetA
# SKT.Get
Get Ptr to socket
**In:**
A = hSocket
@ -79,14 +79,14 @@
**Out:**
Y,A = pS.SOCKET
# SKT.AcceptA
# SKT.Accept
Check for an incoming connection
**In:**
A = hListeningSocket
**Out:**
A = hSocket
# SKT.MkNodA
# SKT.MkNod
Create a new file from TCP socket
**In:**
A = hSocket
@ -101,7 +101,7 @@
PUSHW = len
**Out:**
# SKT.ReadA (DGRAM,RAW)
# SKT.ReadFrame (DGRAM,RAW)
**In:**
A = hSocket
**Out:**

Binary file not shown.

Binary file not shown.

View File

@ -128,25 +128,20 @@ CS.RUN >SYSCALL GetChar
clc
rts
.11 ldy #MEM.COUNT
>PUSHB (pData),y
ldy #USED.COUNT
>PUSHB (pData),y
.11 >PUSHB.G MEM.COUNT
>PUSHB.G USED.COUNT
>LDYA L.MSG2
>SYSCALL printf
>LDYA.G MemStat+S.MSTAT.MH
>PUSHYA
>PUSHW.G MemStat+S.MSTAT.MH
>LDYA L.MSG3
>SYSCALL printf
>LDYA.G MemStat+S.MSTAT.MF
>PUSHYA
>PUSHW.G MemStat+S.MSTAT.MF
>LDYA L.MSG4
>SYSCALL printf
>LDYA.G MemStat+S.MSTAT.ML
>PUSHYA
>PUSHW.G MemStat+S.MSTAT.ML
>LDYA L.MSG5
>SYSCALL printf

View File

@ -300,7 +300,7 @@ CS.QUIT ldy #hFrame
.1 ldy #hSocket
lda (pData),y
>DEBUG
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.Close
lda hLIBTCPIP

View File

@ -409,11 +409,17 @@ READ >STYA ZPIOCTL
>STYA ZPBufPtr
stx .8+1
ldy #S.IOCTL.BYTECNT
lda Size
sta (ZPIOCTL),y
eor #$ff
sta Counter
ldy #1
iny
lda Size+1
sta (ZPIOCTL),y
eor #$ff
sta Counter+1

View File

@ -26,7 +26,7 @@ FRM.NewIP stx .8+1
.2 lda #S.IP
bra .4
.4 sta .5+1 save Header len for reset later
.4 sta .5+1 save Header len for reset later
clc
adc ZPDataOutLen
sta ZPFrameOutLen
@ -210,8 +210,7 @@ FRM.SendIP ldx #3 Copy SRC.IP even if IP offload
jsr IP.SetDestMAC
bcs FRM.Queue
.6 >LDYA ZPFrameOutPtr
jsr FRM.Send.Out
.6 jsr FRM.Send.Out
bcs FRM.Queue
@ -253,7 +252,8 @@ FRM.Queue ldy hFrameOut no hFrame, cannot queue for retry
FRM.Retry ldx FRM.QUEUE.Tail
.10 cpx FRM.QUEUE.Head
beq .8 Queue is empty, exit....
beq .8 Queue is empty, exit...
lda FRM.QUEUE.hMem,x
>SYSCALL GetMemPtr
>STYA ZPFrameOutPtr
@ -293,7 +293,9 @@ FRM.Retry ldx FRM.QUEUE.Tail
.8 rts
*--------------------------------------
FRM.Send.Out >LDYA ZPDataOutPtr
FRM.Send.Out >DEBUG
>LDYA ZPDataOutPtr
>STYA IOCTL+S.IOCTL.BUFPTR
>LDYA ZPDataOutLen
>STYA IOCTL+S.IOCTL.BYTECNT
@ -302,7 +304,7 @@ FRM.Send.IOCTL >PUSHW L.IOCTL
>PUSHBI IOCTL.WRITE
lda IPCFG+S.IPCFG.HDEV
>SYSCALL IOCTL try sending again to DRV
>SYSCALL IOCTL
rts
*--------------------------------------
MAN

View File

@ -110,18 +110,21 @@ K.FPutS.I jsr IO.SELECT
* **In:**
* PrintF : (example is for printing Y,A as integer : format="Y,A= %I", 2 bytes)
* `>PUSHYA`
* `>PUSHBI 2`
* `...`
* `>PUSHBI bytecount`
* `>LDYAI format`
* `>SYSCALL printf`
* SPrintF :
* `>PUSHYA`
* `>PUSHBI 2`
* `...`
* `>PUSHBI bytecount`
* `>PUSHWI format`
* `>LDYAI str`
* `>SYSCALL sprintf`
* FPrintF :
* `>PUSHYA`
* `>PUSHBI 2`
* `...`
* `>PUSHBI bytecount`
* `>PUSHWI format`
* `lda hFILE`
* `>SYSCALL fprintf`