mirror of
https://github.com/A2osX/A2osX.git
synced 2024-12-28 10:29:49 +00:00
Kernel 0.9.2
This commit is contained in:
parent
6990622f84
commit
f4a5532052
1635
.Docs/KERNEL.md
1635
.Docs/KERNEL.md
File diff suppressed because it is too large
Load Diff
@ -1,52 +1,49 @@
|
||||
*** Auto generated by docgen.cmd ***
|
||||
# GetProDOSCatSize
|
||||
|
||||
Compute space needed for ProDOS Catalog
|
||||
## In :
|
||||
# GetProDOSCatSize
|
||||
Compute space needed for ProDOS Catalog
|
||||
**In:**
|
||||
PUSHW = DevSize (in 512b blocks)
|
||||
PUSHB = Catalog Size (in blocks)
|
||||
PUSHB = Options
|
||||
**Out:**
|
||||
X=BlockCount (max 22)
|
||||
Y,A=BufSize (max $4400)
|
||||
|
||||
PUSHW = DevSize (in 512b blocks)
|
||||
PUSHB = Catalog Size (in blocks)
|
||||
PUSHB = Options
|
||||
## Out :
|
||||
# BuildProDOSCat
|
||||
**In:**
|
||||
PUSHW = DevSize (in 512b blocks)
|
||||
PUSHB = Catalog Size (in blocks)
|
||||
PUSHB = Options
|
||||
PUSHW = VolName (PSTR)
|
||||
PUSHW = DstBuf (Zero filled)
|
||||
Blk0 : ProDOS.BootBlk
|
||||
Blk1 : SOS.BootBlk
|
||||
Blk2...n : Volume Directory
|
||||
Blkn+1.. : Volume Bitmap (4096/Blk)
|
||||
max devSize = 65535 -> max 16 Bitmap Blk
|
||||
absolute MAX DstBuf size=
|
||||
7 for Disk II(280blk),3.5(1600),3.5HD(2880)
|
||||
22 for 32mb Hardisk...
|
||||
|
||||
X=BlockCount (max 22)
|
||||
Y,A=BufSize (max $4400)
|
||||
# BuildProDOSCat
|
||||
# TrkW16s
|
||||
Write a track (16 sectors)
|
||||
**In:**
|
||||
PUSHW = Ptr to 16*256 buffer
|
||||
PUSHB = TrackNum * 4 : 0->140+
|
||||
PUSHB = DSSS0000
|
||||
**Out:**
|
||||
CC : success
|
||||
CS : A = Error
|
||||
A=0, currently starting/seeking...
|
||||
|
||||
## In :
|
||||
|
||||
PUSHW = DevSize (in 512b blocks)
|
||||
PUSHB = Catalog Size (in blocks)
|
||||
PUSHB = Options
|
||||
PUSHW = VolName (PSTR)
|
||||
PUSHW = DstBuf (Zero filled)
|
||||
Blk0 : ProDOS.BootBlk
|
||||
Blk1 : SOS.BootBlk
|
||||
Blk2...n : Volume Directory
|
||||
Blkn+1.. : Volume Bitmap (4096/Blk)
|
||||
max devSize = 65535 -> max 16 Bitmap Blk
|
||||
absolute MAX DstBuf size=
|
||||
7 for Disk II(280blk),3.5(1600),3.5HD(2880)
|
||||
22 for 32mb Hardisk...
|
||||
# TrkW16s
|
||||
|
||||
Write a track (16 sectors)
|
||||
**In:**
|
||||
PUSHW = Ptr to 16*256 buffer
|
||||
PUSHB = TrackNum * 4 : 0->140+
|
||||
PUSHB = DSSS0000
|
||||
**Out:**
|
||||
CC : success
|
||||
CS : A = Error
|
||||
A=0, currently starting/seeking...
|
||||
# TrkWNIB
|
||||
|
||||
Write a track (NIBBLE)
|
||||
**In:**
|
||||
PUSHW = Ptr to NIBBLE buffer (0 ended)
|
||||
PUSHB = TrackNum * 4 : 0->140+
|
||||
PUSHB = DSSS0000
|
||||
**Out:**
|
||||
CC : success
|
||||
CS : A = Error
|
||||
A=0, currently starting/seeking...
|
||||
# TrkWNIB
|
||||
Write a track (NIBBLE)
|
||||
**In:**
|
||||
PUSHW = Ptr to NIBBLE buffer (0 ended)
|
||||
PUSHB = TrackNum * 4 : 0->140+
|
||||
PUSHB = DSSS0000
|
||||
**Out:**
|
||||
CC : success
|
||||
CS : A = Error
|
||||
A=0, currently starting/seeking...
|
||||
|
@ -1,49 +1,49 @@
|
||||
*** Auto generated by docgen.cmd ***
|
||||
## MD5
|
||||
|
||||
Return MD5 Hash for input String
|
||||
# C
|
||||
## MD5
|
||||
Return MD5 Hash for input String
|
||||
|
||||
`void md5 (const char* str, char* digest);`
|
||||
# ASM
|
||||
# C
|
||||
`void md5 (const char* str, char* digest);`
|
||||
|
||||
**In:**
|
||||
`>PUSHW digest`
|
||||
`>LDYA str`
|
||||
**Out:**
|
||||
CC
|
||||
## MD5Init
|
||||
# ASM
|
||||
**In:**
|
||||
`>PUSHW digest`
|
||||
`>LDYA str`
|
||||
**Out:**
|
||||
CC
|
||||
|
||||
Initialize a MD5 computation
|
||||
# C
|
||||
## MD5Init
|
||||
Initialize a MD5 computation
|
||||
|
||||
`HANDLE md5init ();`
|
||||
# ASM
|
||||
# C
|
||||
`HANDLE md5init ();`
|
||||
|
||||
**In:**
|
||||
**Out:**
|
||||
A = hMem To S.MD5
|
||||
## MD5Update
|
||||
# ASM
|
||||
**In:**
|
||||
**Out:**
|
||||
A = hMem To S.MD5
|
||||
|
||||
Add Data to MD5 computation
|
||||
# C
|
||||
## MD5Update
|
||||
Add Data to MD5 computation
|
||||
|
||||
`int md5update (HANDLE md5, char* data, int len);`
|
||||
# ASM
|
||||
# C
|
||||
`int md5update (HANDLE md5, char* data, int len);`
|
||||
|
||||
**In:**
|
||||
`>PUSHW len`
|
||||
`>PUSHW data`
|
||||
`>LDA.G md5`
|
||||
**Out:**
|
||||
## MD5Finalize
|
||||
# ASM
|
||||
**In:**
|
||||
`>PUSHW len`
|
||||
`>PUSHW data`
|
||||
`>LDA.G md5`
|
||||
**Out:**
|
||||
|
||||
# C
|
||||
## MD5Finalize
|
||||
|
||||
`int md5finalize (HANDLE md5, char* digest);`
|
||||
# ASM
|
||||
# C
|
||||
`int md5finalize (HANDLE md5, char* digest);`
|
||||
|
||||
**In:**
|
||||
`>PUSHW digest`
|
||||
`>LDA.G md5`
|
||||
**Out:**
|
||||
# ASM
|
||||
**In:**
|
||||
`>PUSHW digest`
|
||||
`>LDA.G md5`
|
||||
**Out:**
|
||||
|
@ -1,177 +1,147 @@
|
||||
*** Auto generated by docgen.cmd ***
|
||||
# ARP.Clear
|
||||
|
||||
Clear ARP Cache
|
||||
## In :
|
||||
# ARP.Clear
|
||||
Clear ARP Cache
|
||||
**In:**
|
||||
**Out:**
|
||||
|
||||
## Out :
|
||||
# ARP.Query
|
||||
Query ARP Cache and returns HW address
|
||||
**In:**
|
||||
PUSHW PTR to MAC (to fill)
|
||||
PUSHW PTR to IP
|
||||
**Out:**
|
||||
CC: hit: MAC filled
|
||||
CS: missed
|
||||
|
||||
# ARP.Query
|
||||
# ARP.Add
|
||||
Add a static ARP cache record
|
||||
**In:**
|
||||
PUSHW PTR to MAC
|
||||
PUSHW PTR to IP
|
||||
|
||||
Query ARP Cache and returns HW address
|
||||
**In:**
|
||||
PUSHW PTR to MAC (to fill)
|
||||
PUSHW PTR to IP
|
||||
**Out:**
|
||||
CC: hit: MAC filled
|
||||
CS: missed
|
||||
# ARP.Add
|
||||
# ARP.GetCAche
|
||||
Return a Ptr to ARP Cache Table
|
||||
**In:**
|
||||
**Out:**
|
||||
Y,A = PTR to ARP.CACHE
|
||||
|
||||
Add a static ARP cache record
|
||||
**In:**
|
||||
PUSHW PTR to MAC
|
||||
PUSHW PTR to IP
|
||||
# ARP.GetCAche
|
||||
# DNS.Clear
|
||||
Clear DNS Cache
|
||||
**In:**
|
||||
**Out:**
|
||||
|
||||
Return a Ptr to ARP Cache Table
|
||||
**In:**
|
||||
**Out:**
|
||||
Y,A = PTR to ARP.CACHE
|
||||
# DNS.Clear
|
||||
# DNS.Query
|
||||
Query DNS for specified host
|
||||
**In:**
|
||||
PUSHW = PTR to IP to fill with cached data
|
||||
* PUSHW = hostname PTR to PSTR
|
||||
**Out:**
|
||||
CC: hit: IP filled with address
|
||||
CS: missed
|
||||
|
||||
Clear DNS Cache
|
||||
## In :
|
||||
# DNS.Add
|
||||
Add a static DNS record
|
||||
**In:**
|
||||
PUSHW = PTR to IP
|
||||
PUSHW = hostname CSTR to Add
|
||||
|
||||
## Out :
|
||||
# DNS.GetCAche
|
||||
Return a Ptr to DNS Cache Table
|
||||
**In:**
|
||||
**Out:**
|
||||
Y,A = PTR to DNS.CACHE
|
||||
|
||||
# DNS.Query
|
||||
# SKT.New
|
||||
Create a new socket
|
||||
**In:**
|
||||
PUSHW = PTR to S.SOCKET template
|
||||
**Out:**
|
||||
YA = PTR to new S.SOCKET
|
||||
X = hSocket
|
||||
|
||||
Query DNS for specified host
|
||||
**In:**
|
||||
PUSHW = PTR to IP to fill with cached data
|
||||
* PUSHW = hostname PTR to PSTR
|
||||
**Out:**
|
||||
CC: hit: IP filled with address
|
||||
CS: missed
|
||||
# DNS.Add
|
||||
# SKT.CloseA
|
||||
Close socket
|
||||
**In:**
|
||||
A = hSocket
|
||||
**Out:**
|
||||
|
||||
Add a static DNS record
|
||||
**In:**
|
||||
PUSHW = PTR to IP
|
||||
PUSHW = hostname CSTR to Add
|
||||
# DNS.GetCAche
|
||||
# SKT.GetA
|
||||
Get Ptr to socket
|
||||
**In:**
|
||||
A = hSocket
|
||||
**Out:**
|
||||
Y,A = pS.SOCKET
|
||||
|
||||
Return a Ptr to DNS Cache Table
|
||||
**In:**
|
||||
**Out:**
|
||||
Y,A = PTR to DNS.CACHE
|
||||
# SKT.New
|
||||
# SKT.GetTable
|
||||
Get socket table
|
||||
**In:**
|
||||
**Out:**
|
||||
Y,A = pS.SOCKET
|
||||
|
||||
Create a new socket
|
||||
## In :
|
||||
# SKT.AcceptA
|
||||
Check for an incoming connection
|
||||
**In:**
|
||||
A = hListeningSocket
|
||||
**Out:**
|
||||
A = hSocket
|
||||
|
||||
PUSHW = PTR to S.SOCKET template
|
||||
## Out :
|
||||
# SKT.MkNodA
|
||||
Create a new file from TCP socket
|
||||
**In:**
|
||||
A = hSocket
|
||||
**Out:**
|
||||
A = hFile
|
||||
|
||||
YA = PTR to new S.SOCKET
|
||||
X = hSocket
|
||||
# SKT.CloseA
|
||||
# SKT.Write (DGRAM,STREAM,RAW)
|
||||
Send block of data
|
||||
**In:**
|
||||
PUSHB = hSocket
|
||||
PUSHW = pBuf
|
||||
PUSHW = len
|
||||
**Out:**
|
||||
|
||||
Close socket
|
||||
## In :
|
||||
# SKT.ReadA (DGRAM,RAW)
|
||||
**In:**
|
||||
A = hSocket
|
||||
**Out:**
|
||||
A = hFrame
|
||||
|
||||
A = hSocket
|
||||
## Out :
|
||||
# SKT.PutC (STREAM)
|
||||
Write a Char To Stream
|
||||
**In:**
|
||||
PUSHB = hSocket
|
||||
PUSHB = Char
|
||||
**Out:**
|
||||
|
||||
# SKT.GetA
|
||||
# SKT.PutS (STREAM)
|
||||
Write Line in pBuf
|
||||
**In:**
|
||||
PUSHB = hSocket
|
||||
PUSHW = PSTR
|
||||
**Out:**
|
||||
|
||||
Get Ptr to socket
|
||||
## In :
|
||||
# SKT.GetC.A (STREAM)
|
||||
Read a Char From Stream in A
|
||||
**In:**
|
||||
A = hSocket
|
||||
**Out:**
|
||||
A = char
|
||||
|
||||
A = hSocket
|
||||
## Out :
|
||||
# SKT.GetS (STREAM)
|
||||
Read a CR terminated Line in pBuf
|
||||
**In:**
|
||||
PUSHB = hSocket
|
||||
PUSHW = pBuf
|
||||
PUSHW = len
|
||||
**Out:**
|
||||
Y,A = bytes read
|
||||
|
||||
Y,A = pS.SOCKET
|
||||
# SKT.GetTable
|
||||
|
||||
Get socket table
|
||||
## In :
|
||||
|
||||
## Out :
|
||||
|
||||
Y,A = pS.SOCKET
|
||||
# SKT.AcceptA
|
||||
|
||||
Check for an incoming connection
|
||||
## In :
|
||||
|
||||
A = hListeningSocket
|
||||
## Out :
|
||||
|
||||
A = hSocket
|
||||
# SKT.MkNodA
|
||||
|
||||
Create a new file from TCP socket
|
||||
## In :
|
||||
|
||||
A = hSocket
|
||||
## Out :
|
||||
|
||||
A = hFile
|
||||
# SKT.Write (DGRAM,STREAM,RAW)
|
||||
|
||||
Send block of data
|
||||
## In :
|
||||
|
||||
PUSHB = hSocket
|
||||
PUSHW = pBuf
|
||||
PUSHW = len
|
||||
## Out :
|
||||
|
||||
# SKT.ReadA (DGRAM,RAW)
|
||||
|
||||
## In :
|
||||
|
||||
A = hSocket
|
||||
## Out :
|
||||
|
||||
A = hFrame
|
||||
# SKT.PutC (STREAM)
|
||||
|
||||
Write a Char To Stream
|
||||
## In :
|
||||
|
||||
PUSHB = hSocket
|
||||
PUSHB = Char
|
||||
## Out :
|
||||
|
||||
# SKT.PutS (STREAM)
|
||||
|
||||
Write Line in pBuf
|
||||
## In :
|
||||
|
||||
PUSHB = hSocket
|
||||
PUSHW = PSTR
|
||||
## Out :
|
||||
|
||||
# SKT.GetC.A (STREAM)
|
||||
|
||||
Read a Char From Stream in A
|
||||
## In :
|
||||
|
||||
A = hSocket
|
||||
## Out :
|
||||
|
||||
A = char
|
||||
# SKT.GetS (STREAM)
|
||||
|
||||
Read a CR terminated Line in pBuf
|
||||
## In :
|
||||
|
||||
PUSHB = hSocket
|
||||
PUSHW = pBuf
|
||||
PUSHW = len
|
||||
## Out :
|
||||
|
||||
Y,A = bytes read
|
||||
# SKT.Read (STREAM)
|
||||
|
||||
Read data in pBuf
|
||||
## In :
|
||||
|
||||
PUSHB = hSocket
|
||||
PUSHW = pBuf
|
||||
PUSHW = len
|
||||
## Out :
|
||||
|
||||
Y,A = bytes transfered
|
||||
# SKT.Read (STREAM)
|
||||
Read data in pBuf
|
||||
**In:**
|
||||
PUSHB = hSocket
|
||||
PUSHW = pBuf
|
||||
PUSHW = len
|
||||
**Out:**
|
||||
Y,A = bytes transfered
|
||||
|
@ -79,8 +79,8 @@ for /f %%F in ('dir /b /ogn "%SRCDIR%\%FILTER%"') do (
|
||||
set bInList=0
|
||||
)
|
||||
)
|
||||
(echo !LINE!)>>!DOCFILE!
|
||||
if "!line:~0,1!" EQU "#" echo.>>!DOCFILE!
|
||||
(echo !LINE! )>>!DOCFILE!
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -79,11 +79,11 @@ LIB.UNLOAD clc
|
||||
*/--------------------------------------
|
||||
* # GetProDOSCatSize
|
||||
* Compute space needed for ProDOS Catalog
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHW = DevSize (in 512b blocks)
|
||||
* PUSHB = Catalog Size (in blocks)
|
||||
* PUSHB = Options
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
* X=BlockCount (max 22)
|
||||
* Y,A=BufSize (max $4400)
|
||||
*\--------------------------------------
|
||||
@ -119,7 +119,7 @@ GetProDOSCatSize.I
|
||||
rts
|
||||
*/--------------------------------------
|
||||
* # BuildProDOSCat
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHW = DevSize (in 512b blocks)
|
||||
* PUSHB = Catalog Size (in blocks)
|
||||
* PUSHB = Options
|
||||
|
@ -42,7 +42,7 @@ LIB.UNLOAD clc
|
||||
rts
|
||||
*/--------------------------------------
|
||||
* # Pak
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHW = Src PTR
|
||||
* PUSHW = Src Length
|
||||
* PUSHW = Dst PTR Output Buffer
|
||||
|
@ -5,8 +5,8 @@ AUTO 4,1
|
||||
*/--------------------------------------
|
||||
* # ARP.Clear
|
||||
* Clear ARP Cache
|
||||
* ## In :
|
||||
* ## Out :
|
||||
* **In:**
|
||||
* **Out:**
|
||||
*\--------------------------------------
|
||||
ARP.Clear ldx #K.ARPCACHE.SIZE*S.ARPCACHE
|
||||
.1 stz ARP.CACHE-1,x
|
||||
|
@ -5,8 +5,8 @@ AUTO 4,1
|
||||
*/--------------------------------------
|
||||
* # DNS.Clear
|
||||
* Clear DNS Cache
|
||||
* ## In :
|
||||
* ## Out :
|
||||
* **In:**
|
||||
* **Out:**
|
||||
*\--------------------------------------
|
||||
DNS.Clear ldx #K.DNSCACHE.SIZE*S.DNSCACHE
|
||||
.1 stz DNS.CACHE-1,x
|
||||
|
@ -5,9 +5,9 @@ AUTO 4,1
|
||||
*/--------------------------------------
|
||||
* # SKT.New
|
||||
* Create a new socket
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHW = PTR to S.SOCKET template
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
* YA = PTR to new S.SOCKET
|
||||
* X = hSocket
|
||||
*\--------------------------------------
|
||||
@ -122,9 +122,9 @@ SKT.New.Listen sec
|
||||
*/--------------------------------------
|
||||
* # SKT.CloseA
|
||||
* Close socket
|
||||
* ## In :
|
||||
* **In:**
|
||||
* A = hSocket
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
*\--------------------------------------
|
||||
SKT.CloseA jsr SKT.GetA.I get SKT in ZPPtrSKT, S.SOCKET.SOCK in A
|
||||
bcs .99
|
||||
@ -186,9 +186,9 @@ SKT.CloseA jsr SKT.GetA.I get SKT in ZPPtrSKT, S.SOCKET.SOCK in A
|
||||
*/--------------------------------------
|
||||
* # SKT.GetA
|
||||
* Get Ptr to socket
|
||||
* ## In :
|
||||
* **In:**
|
||||
* A = hSocket
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
* Y,A = pS.SOCKET
|
||||
*\--------------------------------------
|
||||
SKT.GetA jsr SKT.GetA.I
|
||||
@ -243,8 +243,8 @@ SKT.GetA.I and #$7f
|
||||
*/--------------------------------------
|
||||
* # SKT.GetTable
|
||||
* Get socket table
|
||||
* ## In :
|
||||
* ## Out :
|
||||
* **In:**
|
||||
* **Out:**
|
||||
* Y,A = pS.SOCKET
|
||||
*\--------------------------------------
|
||||
SKT.GetTable lda hSocketTable
|
||||
@ -254,9 +254,9 @@ SKT.GetTable lda hSocketTable
|
||||
*/--------------------------------------
|
||||
* # SKT.AcceptA
|
||||
* Check for an incoming connection
|
||||
* ## In :
|
||||
* **In:**
|
||||
* A = hListeningSocket
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
* A = hSocket
|
||||
*\--------------------------------------
|
||||
SKT.AcceptA jsr SKT.GetA.I
|
||||
@ -295,9 +295,9 @@ SKT.AcceptA jsr SKT.GetA.I
|
||||
*/--------------------------------------
|
||||
* # SKT.MkNodA
|
||||
* Create a new file from TCP socket
|
||||
* ## In :
|
||||
* **In:**
|
||||
* A = hSocket
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
* A = hFile
|
||||
*\--------------------------------------
|
||||
SKT.MkNodA sta .1+1
|
||||
@ -338,11 +338,11 @@ SKT.MkNodA sta .1+1
|
||||
*/--------------------------------------
|
||||
* # SKT.Write (DGRAM,STREAM,RAW)
|
||||
* Send block of data
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHB = hSocket
|
||||
* PUSHW = pBuf
|
||||
* PUSHW = len
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
*\--------------------------------------
|
||||
SKT.Write >PULLW ZPDataInLen
|
||||
>PULLW ZPDataInPtr
|
||||
@ -442,9 +442,9 @@ SKT.Write.TCP ldy #S.SOCKET.TCP.STATUS
|
||||
.99 rts
|
||||
*/--------------------------------------
|
||||
* # SKT.ReadA (DGRAM,RAW)
|
||||
* ## In :
|
||||
* **In:**
|
||||
* A = hSocket
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
* A = hFrame
|
||||
*\--------------------------------------
|
||||
SKT.ReadA jsr SKT.GetA.I
|
||||
@ -479,10 +479,10 @@ SKT.ReadA jsr SKT.GetA.I
|
||||
*/--------------------------------------
|
||||
* # SKT.PutC (STREAM)
|
||||
* Write a Char To Stream
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHB = hSocket
|
||||
* PUSHB = Char
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
*\--------------------------------------
|
||||
SKT.PutC >PULLB TmpByte
|
||||
|
||||
@ -499,10 +499,10 @@ SKT.PutC >PULLB TmpByte
|
||||
*/--------------------------------------
|
||||
* # SKT.PutS (STREAM)
|
||||
* Write Line in pBuf
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHB = hSocket
|
||||
* PUSHW = PSTR
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
*\--------------------------------------
|
||||
SKT.PutS >PULLW ZPDataOutPtr
|
||||
lda (ZPDataInPtr)
|
||||
@ -529,9 +529,9 @@ SKT.PutS.1 >PULLA
|
||||
*/--------------------------------------
|
||||
* # SKT.GetC.A (STREAM)
|
||||
* Read a Char From Stream in A
|
||||
* ## In :
|
||||
* **In:**
|
||||
* A = hSocket
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
* A = char
|
||||
*\--------------------------------------
|
||||
SKT.GetC.A stz bTextMode
|
||||
@ -553,11 +553,11 @@ SKT.GetC.A stz bTextMode
|
||||
*/--------------------------------------
|
||||
* # SKT.GetS (STREAM)
|
||||
* Read a CR terminated Line in pBuf
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHB = hSocket
|
||||
* PUSHW = pBuf
|
||||
* PUSHW = len
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
* Y,A = bytes read
|
||||
*\--------------------------------------
|
||||
SKT.GetS sec
|
||||
@ -565,11 +565,11 @@ SKT.GetS sec
|
||||
*/--------------------------------------
|
||||
* # SKT.Read (STREAM)
|
||||
* Read data in pBuf
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHB = hSocket
|
||||
* PUSHW = pBuf
|
||||
* PUSHW = len
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
* Y,A = bytes transfered
|
||||
*\--------------------------------------
|
||||
SKT.Read clc
|
||||
|
@ -4,20 +4,20 @@ AUTO 4,1
|
||||
*--------------------------------------
|
||||
* # FStat
|
||||
* Return information about a hfile
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHW = PTR to S.STAT buffer
|
||||
* PUSHB = hFile
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
*--------------------------------------
|
||||
*jsr PFT.CheckNodeSTK
|
||||
|
||||
*/--------------------------------------
|
||||
* # Stat
|
||||
* Return information about a file
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHW = PTR to S.STAT buffer
|
||||
* PUSHW = PTR to Filename (C-String)
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
*\--------------------------------------
|
||||
K.Stat jsr PFT.CheckPathSTK
|
||||
jsr STDIO.PullMLIPath
|
||||
|
@ -108,23 +108,29 @@ K.FPutS.1 jsr K.GetMemPtr.A
|
||||
* ## C
|
||||
* `int printf ( const char * format, ... );`
|
||||
* `int sprintf ( char * str, const char * format, ... );`
|
||||
* `int fprintf ( FILE * stream, const char * format, ... );`
|
||||
* `int fprintf ( hFILE stream, const char * format, ... );`
|
||||
* ## ASM
|
||||
* **In:**
|
||||
* PrintF :
|
||||
* PUSH ...
|
||||
* Y,A = PTR to CStr
|
||||
* PrintF : (example is for printing Y,A as integer : format="Y,A= %I", 2 bytes)
|
||||
* `>PUSHYA`
|
||||
* `>PUSHBI 2`
|
||||
* `>LDYAI format`
|
||||
* `>SYSCALL printf`
|
||||
* SPrintF :
|
||||
* PUSH ...
|
||||
* PUSHW = PTR to CStr
|
||||
* Y,A = Ptr to Dst Buffer
|
||||
* `>PUSHYA`
|
||||
* `>PUSHBI 2`
|
||||
* `>PUSHWI format`
|
||||
* `>LDYAI str`
|
||||
* `>SYSCALL sprintf`
|
||||
* FPrintF :
|
||||
* PUSH ...
|
||||
* PUSHW = PTR to CStr
|
||||
* A = hFILE
|
||||
* `>PUSHYA`
|
||||
* `>PUSHBI 2`
|
||||
* `>PUSHWI format`
|
||||
* `lda hFILE`
|
||||
* `>SYSCALL fprintf`
|
||||
* **Out:**
|
||||
* CC : success
|
||||
* CS : error code from Output
|
||||
* CC : success, Y,A = bytes sent
|
||||
* CS : error, A = code from Output
|
||||
* Specifiers :
|
||||
* + %b : pull 1 byte to Print BIN
|
||||
* + %B : pull 2 bytes to Print BIN
|
||||
@ -200,11 +206,11 @@ K.PrintF.1 ldy #0
|
||||
cmp #'0' ...a 0...mmm... padding char?
|
||||
bne .4
|
||||
|
||||
ldx K.PrintF.PadL K.PrintF.PadL is not nul, so this 0 is second digit
|
||||
ldx K.PrintF.PadL K.PrintF.PadL is not nul, so this 0 is second digit
|
||||
bne .5
|
||||
|
||||
* lda #'0'
|
||||
sta K.PrintF.PadC no, this is the first 0, so make it K.PrintF.PadC
|
||||
sta K.PrintF.PadC no, this is the first 0, so make it K.PrintF.PadC
|
||||
bra .2
|
||||
|
||||
.4 jsr MEM.IsDigit
|
||||
@ -868,7 +874,7 @@ K.SScanF.GetVAL tya Y=char count parsed
|
||||
*/--------------------------------------
|
||||
* # FOpen
|
||||
* Open a file
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHW = AUXTYPE
|
||||
* PUSHB = TYPE
|
||||
* PUSHB = MODE
|
||||
@ -878,7 +884,7 @@ K.SScanF.GetVAL tya Y=char count parsed
|
||||
* SYS.FOpen.T : Open/Append in Text mode
|
||||
* SYS.FOpen.X : Create if not exists
|
||||
* PUSHW = PATH (PSTR)
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
* CC : A = hFILE
|
||||
* CS : A = EC
|
||||
*\--------------------------------------
|
||||
@ -983,9 +989,9 @@ K.FOpen.AUXTYPE .BS 2
|
||||
*/--------------------------------------
|
||||
* # FClose.A
|
||||
* Close a file
|
||||
* ## In :
|
||||
* **In:**
|
||||
* A = hFILE
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
*\--------------------------------------
|
||||
K.FClose.A jsr PFT.CheckNodeA
|
||||
sta K.FClose.A.8+1
|
||||
@ -1029,11 +1035,11 @@ K.FClose.A.9 rts
|
||||
* # FRead
|
||||
* int fread ( void * ptr, int count, FILE * stream );
|
||||
* Read bytes from file
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHW = Dest Ptr
|
||||
* PUSHW = Bytes To Read
|
||||
* PUSHB = hFILE
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
* Y,A = Bytes Read
|
||||
*\--------------------------------------
|
||||
K.FRead jsr PFT.CheckNodeSTK
|
||||
@ -1218,10 +1224,10 @@ K.Remove.YA jsr PFT.CheckPathYA
|
||||
*/--------------------------------------
|
||||
* # Rename
|
||||
* Rename a file
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHW = New Name
|
||||
* PUSHW = Old Name
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
*\--------------------------------------
|
||||
K.Rename jsr PFT.CheckPathSTK
|
||||
jsr STDIO.PullMLIPath
|
||||
|
@ -274,9 +274,9 @@ STDLIB.32.Clear ldx #3
|
||||
*/--------------------------------------
|
||||
* # RealPath.YA
|
||||
* Return the canonicalized absolute pathname
|
||||
* ## In :
|
||||
* **In:**
|
||||
* Y,A = Ptr to Relative Filename (C-String)
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
* CC : success
|
||||
* Y,A = Ptr to Full Path (C-String)
|
||||
* X = hMem of Full Path
|
||||
|
@ -29,22 +29,19 @@ K.StrLen >STYA ZPPtr1
|
||||
rts
|
||||
*/--------------------------------------
|
||||
* # StrCat
|
||||
* Append SRC to DST
|
||||
* Concatenate strings
|
||||
* ## C
|
||||
* `char * strcat ( char * destination, const char * source );`
|
||||
* ## ASM
|
||||
* **In:**
|
||||
* PUSHW = Ptr to SRC (CSTR)
|
||||
* PUSHW = Ptr to DST (CSTR)
|
||||
* `>PUSHWI source`
|
||||
* `>LDYAI destination`
|
||||
* `>SYSCALL strcat`
|
||||
* **Out:**
|
||||
* DST = DST+SRC
|
||||
* Y,A = destination
|
||||
*\--------------------------------------
|
||||
K.StrCat jsr MEM.PullP1P2
|
||||
|
||||
.1 lda (ZPPtr1)
|
||||
beq K.StrCpy.I
|
||||
|
||||
inc ZPPtr1
|
||||
bne .1
|
||||
inc ZPPtr1+1
|
||||
bra .1
|
||||
K.StrCat sec
|
||||
.HS 90 BCC
|
||||
*/--------------------------------------
|
||||
* # StrCpy
|
||||
* Copy string
|
||||
@ -52,23 +49,36 @@ K.StrCat jsr MEM.PullP1P2
|
||||
* `char * strcpy ( char * destination, const char * source );`
|
||||
* ## ASM
|
||||
* **In:**
|
||||
* PUSHW = Ptr to SRC (CSTR)
|
||||
* PUSHW = Ptr to DST (CSTR)
|
||||
* `>PUSHWI source`
|
||||
* `>LDYAI destination`
|
||||
* `>SYSCALL strcpy`
|
||||
* **Out:**
|
||||
* DST = SRC
|
||||
* Y,A = destination
|
||||
*\--------------------------------------
|
||||
K.StrCpy jsr MEM.PullP1P2
|
||||
K.StrCpy clc
|
||||
>STYA ZPPtr1
|
||||
>PULLW ZPPtr2
|
||||
|
||||
bcc .2
|
||||
|
||||
.1 lda (ZPPtr1)
|
||||
beq .2
|
||||
|
||||
K.StrCpy.I ldy #0
|
||||
inc ZPPtr1
|
||||
bne .1
|
||||
inc ZPPtr1+1
|
||||
bra .1
|
||||
|
||||
.1 lda (ZPPtr2),y
|
||||
.2 ldy #0
|
||||
|
||||
.3 lda (ZPPtr2),y
|
||||
sta (ZPPtr1),y
|
||||
beq .8
|
||||
iny
|
||||
bne .1
|
||||
bne .3
|
||||
inc ZPPtr2+1
|
||||
inc ZPPtr1+1
|
||||
bra .1
|
||||
bra .3
|
||||
|
||||
.8 rts
|
||||
*/--------------------------------------
|
||||
|
@ -11,9 +11,12 @@ DAY0 .EQ 4 day 0 was a thursday
|
||||
*/--------------------------------------
|
||||
* # Time
|
||||
* Get System Time in Buffer
|
||||
* ## In :
|
||||
* ## C
|
||||
* `time_t time (time_t* timer);`
|
||||
* ##ASM
|
||||
* **In:**
|
||||
* Y,A = PTR to S.TIME
|
||||
* ## Out :
|
||||
* **Out:**
|
||||
* S.TIME filled with System date/time
|
||||
*\--------------------------------------
|
||||
K.Time >STYA ZPPtr2
|
||||
@ -24,9 +27,13 @@ K.Time >STYA ZPPtr2
|
||||
*/--------------------------------------
|
||||
* # PTime2Time
|
||||
* Convert ProDOS Time To S.TIME
|
||||
* ## In :
|
||||
* ## C
|
||||
* `time_t time (long ptime, time_t* timer);`
|
||||
* ##ASM
|
||||
* **In :**
|
||||
* PUSHW = Dst PTR To S.TIME
|
||||
* PUSHW = Src PTR to ProDOS DATE/TIME (DWORD)
|
||||
* **Out:**
|
||||
*\--------------------------------------
|
||||
K.PTime2Time jsr MEM.PullP1P2
|
||||
TIME.PTime2TimeP1P2
|
||||
@ -153,7 +160,7 @@ K.ComputeWDAY lda #3 Thursday : 4 (-1 for mod 7)
|
||||
*/--------------------------------------
|
||||
* # CTime2Time
|
||||
* Convert CTIME to S.TIME
|
||||
* ## In :
|
||||
* **In:**
|
||||
* PUSHW = Dst PTR To S.TIME
|
||||
* PUSHW = Src CTIME DWORD
|
||||
*\--------------------------------------
|
||||
@ -381,23 +388,23 @@ K.CTime.Year .BS 1
|
||||
* `size_t strftime (char* ptr, size_t maxsize, const char* format, const struct tm* timeptr );`
|
||||
* ## ASM
|
||||
* **In:**
|
||||
* PUSHW = Dst PTR To CSTR Buf
|
||||
* PUSHW = Src PTR To Format String
|
||||
* %a : Abbreviated weekday name : Thu
|
||||
* %A : Full weekday name : Thursday
|
||||
* %b : Abbreviated month name : Aug
|
||||
* %B : Full month name : August
|
||||
* %d : Day of the month, zero-padded (01-31)
|
||||
* %H : Hour in 24h format (00-23) 14
|
||||
* %I : Hour in 12h format (01-12) 02
|
||||
* %m : Month as a decimal number (01-12) 08
|
||||
* %M : Minute (00-59) 55
|
||||
* %p : AM or PM designation PM
|
||||
* %S : Second (00-61) 02
|
||||
* %w : Weekday as a decimal number with Sunday as 0 (0-6)
|
||||
* %y : Year, last two digits (00-99)
|
||||
* %Y : Year four digits 2001
|
||||
* PUSHW = Src PTR To S.Time
|
||||
* PUSHW = Dst PTR To CSTR Buf
|
||||
* PUSHW = Src PTR To Format String
|
||||
* + %a : Abbreviated weekday name : Thu
|
||||
* + %A : Full weekday name : Thursday
|
||||
* + %b : Abbreviated month name : Aug
|
||||
* + %B : Full month name : August
|
||||
* + %d : Day of the month, zero-padded (01-31)
|
||||
* + %H : Hour in 24h format (00-23) 14
|
||||
* + %I : Hour in 12h format (01-12) 02
|
||||
* + %m : Month as a decimal number (01-12) 08
|
||||
* + %M : Minute (00-59) 55
|
||||
* + %p : AM or PM designation PM
|
||||
* + %S : Second (00-61) 02
|
||||
* + %w : Weekday as a decimal number with Sunday as 0 (0-6)
|
||||
* + %y : Year, last two digits (00-99)
|
||||
* + %Y : Year four digits 2001
|
||||
* PUSHW = Src PTR To S.Time
|
||||
* **Out:**
|
||||
* none. always succeed.
|
||||
*\--------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user