mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 20:33:13 +00:00
Kernel 0.9.2
This commit is contained in:
parent
1672fb04d1
commit
026a9cc3dc
313
.Docs/KERNEL.md
313
.Docs/KERNEL.md
@ -5,7 +5,8 @@
|
|||||||
## ASM
|
## ASM
|
||||||
**In:**
|
**In:**
|
||||||
A = argument index.
|
A = argument index.
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : success
|
CC : success
|
||||||
Y,A = PTR To Arg[A]
|
Y,A = PTR To Arg[A]
|
||||||
CS : Out Of Bound
|
CS : Out Of Bound
|
||||||
@ -15,7 +16,8 @@ CS : Out Of Bound
|
|||||||
## ASM
|
## ASM
|
||||||
**In:**
|
**In:**
|
||||||
Y,A = PTR to "NAME.DRV [PARAM]" C-String
|
Y,A = PTR to "NAME.DRV [PARAM]" C-String
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
none
|
none
|
||||||
|
|
||||||
# InsDrv
|
# InsDrv
|
||||||
@ -30,21 +32,22 @@ none
|
|||||||
`>PUSHW DRV.CS.START`
|
`>PUSHW DRV.CS.START`
|
||||||
`>LDYA L.SRC`
|
`>LDYA L.SRC`
|
||||||
`SYSCALL insdrv`
|
`SYSCALL insdrv`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = Ptr to installed driver
|
Y,A = Ptr to installed driver
|
||||||
|
|
||||||
# GetDevByID
|
# GetDevByID
|
||||||
**In:**
|
|
||||||
A = DevID
|
A = DevID
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC = OK, CS = ERROR
|
CC = OK, CS = ERROR
|
||||||
Y,A = FD
|
Y,A = FD
|
||||||
X = hFD
|
X = hFD
|
||||||
|
|
||||||
# GetDevByName
|
# GetDevByName
|
||||||
**In:**
|
|
||||||
Y,A = Ptr to device name (C-String)
|
Y,A = Ptr to device name (C-String)
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC = OK, CS = ERROR
|
CC = OK, CS = ERROR
|
||||||
Y,A = FD
|
Y,A = FD
|
||||||
X = DevID
|
X = DevID
|
||||||
@ -55,11 +58,11 @@ X = DevID
|
|||||||
`int getdevstatus(short int hFD, S.DIB* dstat);`
|
`int getdevstatus(short int hFD, S.DIB* dstat);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
|
||||||
`>PUSHWI S.DIB`
|
`>PUSHWI S.DIB`
|
||||||
`lda DevID`
|
`lda DevID`
|
||||||
`>SYSCALL GetDevStatus`
|
`>SYSCALL GetDevStatus`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# MKDev
|
# MKDev
|
||||||
Create a hDEV
|
Create a hDEV
|
||||||
@ -68,10 +71,10 @@ Create a hDEV
|
|||||||
`hDEV mkdev (S.FD * fd)`
|
`hDEV mkdev (S.FD * fd)`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
|
||||||
`>LDYA FD.DEV`
|
`>LDYA FD.DEV`
|
||||||
`>SYSCALL mkdev
|
`>SYSCALL mkdev
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
A = hDEV
|
A = hDEV
|
||||||
|
|
||||||
# OpenDir
|
# OpenDir
|
||||||
@ -80,10 +83,10 @@ Create a hDEV
|
|||||||
`int hDIR opendir (const char * dirpath);`
|
`int hDIR opendir (const char * dirpath);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
|
||||||
`>LDYA dirpath`
|
`>LDYA dirpath`
|
||||||
`>SYSCALL opendir`
|
`>SYSCALL opendir`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : success
|
CC : success
|
||||||
A = hDIR
|
A = hDIR
|
||||||
CS : error
|
CS : error
|
||||||
@ -95,11 +98,11 @@ Create a hDEV
|
|||||||
`int readdir (int hDIR, S.DIRENT * dirent);`
|
`int readdir (int hDIR, S.DIRENT * dirent);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
|
||||||
`>PUSHW dirent`
|
`>PUSHW dirent`
|
||||||
`lda hDIR`
|
`lda hDIR`
|
||||||
`>SYSCALL readdir`
|
`>SYSCALL readdir`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : success
|
CC : success
|
||||||
X = hDIRENT
|
X = hDIRENT
|
||||||
Y,A = PTR to S.DIRENT
|
Y,A = PTR to S.DIRENT
|
||||||
@ -113,16 +116,17 @@ Create a hDEV
|
|||||||
`void closedir(hDIR);`
|
`void closedir(hDIR);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
|
||||||
`lda hDIR`
|
`lda hDIR`
|
||||||
`>SYSCALL closedir`
|
`>SYSCALL closedir`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
none, always succeed.
|
none, always succeed.
|
||||||
|
|
||||||
# ExpandStr
|
# ExpandStr
|
||||||
**In:**
|
**In:**
|
||||||
Y,A = PTR to String to Expand (C-String)
|
Y,A = PTR to String to Expand (C-String)
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
X = hMem to Expanded String (C-String)
|
X = hMem to Expanded String (C-String)
|
||||||
Y,A = PTR to Expanded String
|
Y,A = PTR to Expanded String
|
||||||
|
|
||||||
@ -139,7 +143,8 @@ And return, if found, the full path to it.
|
|||||||
`>PUSHWI fullpath`
|
`>PUSHWI fullpath`
|
||||||
`>PUSHWI searchpath`
|
`>PUSHWI searchpath`
|
||||||
`>LDYAI filename`
|
`>LDYAI filename`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : success
|
CC : success
|
||||||
DstBuf = FilePath
|
DstBuf = FilePath
|
||||||
DstStat = S.STAT
|
DstStat = S.STAT
|
||||||
@ -155,7 +160,8 @@ Change or add an environment variable, string is 'NAME=VALUE'
|
|||||||
**In:**
|
**In:**
|
||||||
`>LDYA string`
|
`>LDYA string`
|
||||||
`>SYSCALL putenv`
|
`>SYSCALL putenv`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# SetEnv
|
# SetEnv
|
||||||
Change or add an environment variable
|
Change or add an environment variable
|
||||||
@ -168,7 +174,8 @@ Change or add an environment variable
|
|||||||
`>PUSHW value`
|
`>PUSHW value`
|
||||||
`>LDYA name`
|
`>LDYA name`
|
||||||
`>SYSCALL setenv`
|
`>SYSCALL setenv`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# GetEnv
|
# GetEnv
|
||||||
searches the environment list to find the environment variable name,
|
searches the environment list to find the environment variable name,
|
||||||
@ -180,8 +187,9 @@ and returns a pointer to the corresponding value string.
|
|||||||
## ASM
|
## ASM
|
||||||
**In:**
|
**In:**
|
||||||
`>LDYA name`
|
`>LDYA name`
|
||||||
`>SYSCALL gerenv`
|
`>SYSCALL getenv`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : Y,A = PTR to VALUE (C-String)
|
CC : Y,A = PTR to VALUE (C-String)
|
||||||
CS : not found
|
CS : not found
|
||||||
|
|
||||||
@ -195,13 +203,15 @@ Remove an environment variable
|
|||||||
**In:**
|
**In:**
|
||||||
`>LDYA name`
|
`>LDYA name`
|
||||||
`>SYSCALL unsetenv`
|
`>SYSCALL unsetenv`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# LoadTxtFile
|
# LoadTxtFile
|
||||||
Load TXT a file in memory (with ending 0)
|
Load TXT a file in memory (with ending 0)
|
||||||
**In:**
|
**In:**
|
||||||
Y,A = File Path
|
Y,A = File Path
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = File Length (without ending 0)
|
Y,A = File Length (without ending 0)
|
||||||
X = hMem of Loaded File
|
X = hMem of Loaded File
|
||||||
|
|
||||||
@ -212,7 +222,8 @@ Load a file in memory
|
|||||||
PUSHB = TYPE ...
|
PUSHB = TYPE ...
|
||||||
PUSHB = MODE ...
|
PUSHB = MODE ...
|
||||||
LDYA = PATH ...FOpen)
|
LDYA = PATH ...FOpen)
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = File Length
|
Y,A = File Length
|
||||||
X = hMem of Loaded File
|
X = hMem of Loaded File
|
||||||
|
|
||||||
@ -227,7 +238,8 @@ Change The type of a ProDOS File
|
|||||||
`>PUSHBI filetype`
|
`>PUSHBI filetype`
|
||||||
`>LDYA filepath`
|
`>LDYA filepath`
|
||||||
`>SYSCALL chtyp`
|
`>SYSCALL chtyp`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# ChMod
|
# ChMod
|
||||||
**In:**
|
**In:**
|
||||||
@ -254,7 +266,8 @@ Change The type of a ProDOS File
|
|||||||
`>PUSHB flags`
|
`>PUSHB flags`
|
||||||
`>LDYA pathname`
|
`>LDYA pathname`
|
||||||
`>SYSCALL open`
|
`>SYSCALL open`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
A = hFD
|
A = hFD
|
||||||
REG File created on ProDOS : T=TXT,X=$0000
|
REG File created on ProDOS : T=TXT,X=$0000
|
||||||
|
|
||||||
@ -279,7 +292,8 @@ REG File created on ProDOS : T=TXT,X=$0000
|
|||||||
`>PUSHW buf`
|
`>PUSHW buf`
|
||||||
`lda fd`
|
`lda fd`
|
||||||
`>SYSCALL read`
|
`>SYSCALL read`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC: Y,A = bytes read
|
CC: Y,A = bytes read
|
||||||
CS: A = EC
|
CS: A = EC
|
||||||
|
|
||||||
@ -294,7 +308,8 @@ CS: A = EC
|
|||||||
`>PUSHW buf`
|
`>PUSHW buf`
|
||||||
`lda fd`
|
`lda fd`
|
||||||
`>SYSCALL write`
|
`>SYSCALL write`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC: Y,A = bytes written
|
CC: Y,A = bytes written
|
||||||
CS: A = EC
|
CS: A = EC
|
||||||
|
|
||||||
@ -304,12 +319,12 @@ CS: A = EC
|
|||||||
`int ioctl(short int hFD, int request, void * param );`
|
`int ioctl(short int hFD, int request, void * param );`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
|
||||||
`PUSHWI param`
|
`PUSHWI param`
|
||||||
`PUSHBI request`
|
`PUSHBI request`
|
||||||
`lda hFD`
|
`lda hFD`
|
||||||
`>SYSCALL IOCTL`
|
`>SYSCALL IOCTL`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = ...
|
Y,A = ...
|
||||||
|
|
||||||
# pipe
|
# pipe
|
||||||
@ -318,7 +333,6 @@ CS: A = EC
|
|||||||
`int pipe(int pipefd[2]);`
|
`int pipe(int pipefd[2]);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
|
||||||
|
|
||||||
# FAdd,FSub,FMult,FDiv,FPwr
|
# FAdd,FSub,FMult,FDiv,FPwr
|
||||||
Return X+Y, X-Y, X*Y, X/Y, X^Y
|
Return X+Y, X-Y, X*Y, X/Y, X^Y
|
||||||
@ -332,7 +346,8 @@ Return X+Y, X-Y, X*Y, X/Y, X^Y
|
|||||||
`>SYSCALL fmult`
|
`>SYSCALL fmult`
|
||||||
`>SYSCALL fdiv`
|
`>SYSCALL fdiv`
|
||||||
`>SYSCALL fpwr`
|
`>SYSCALL fpwr`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
On stack (float)
|
On stack (float)
|
||||||
|
|
||||||
# Log,Sqr,Exp,Cos,Sin,Tan,ATan
|
# Log,Sqr,Exp,Cos,Sin,Tan,ATan
|
||||||
@ -351,7 +366,8 @@ Return Log(x), Sqr(x), E^X, Cos(x), Sin(X), Tan(x), ATan(x)
|
|||||||
**In:**
|
**In:**
|
||||||
`>PUSHF x (Float)`
|
`>PUSHF x (Float)`
|
||||||
`>SYSCALL log`
|
`>SYSCALL log`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
On stack (Float)
|
On stack (Float)
|
||||||
|
|
||||||
# float
|
# float
|
||||||
@ -363,7 +379,8 @@ Return 'floated' long
|
|||||||
## ASM
|
## ASM
|
||||||
**In:**
|
**In:**
|
||||||
`>PUSHL X` (long)
|
`>PUSHL X` (long)
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
On stack (float)
|
On stack (float)
|
||||||
|
|
||||||
# lrintf
|
# lrintf
|
||||||
@ -376,13 +393,14 @@ Return float rounded into a long
|
|||||||
**In:**
|
**In:**
|
||||||
`>PUSHF x`
|
`>PUSHF x`
|
||||||
`>SYSCALL lrintf`
|
`>SYSCALL lrintf`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
On stack (long)
|
On stack (long)
|
||||||
|
|
||||||
# GetMem0
|
# GetMem0
|
||||||
**In:**
|
|
||||||
Y,A = Size Requested
|
Y,A = Size Requested
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : success
|
CC : success
|
||||||
YA = PTR to Mem (ZERO Initialised)
|
YA = PTR to Mem (ZERO Initialised)
|
||||||
* X = hMem
|
* X = hMem
|
||||||
@ -390,9 +408,9 @@ Return float rounded into a long
|
|||||||
A = EC
|
A = EC
|
||||||
|
|
||||||
# GetMem
|
# GetMem
|
||||||
**In:**
|
|
||||||
Y,A = Size Requested
|
Y,A = Size Requested
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : success
|
CC : success
|
||||||
YA = PTR to Mem (Uninitialised)
|
YA = PTR to Mem (Uninitialised)
|
||||||
* X = hMem
|
* X = hMem
|
||||||
@ -400,31 +418,31 @@ Return float rounded into a long
|
|||||||
A = EC
|
A = EC
|
||||||
|
|
||||||
# FreeMem
|
# FreeMem
|
||||||
**In:**
|
|
||||||
A = hMem To Free
|
A = hMem To Free
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
none.
|
none.
|
||||||
(X unmodified)
|
(X unmodified)
|
||||||
|
|
||||||
# GetMemPtr
|
# GetMemPtr
|
||||||
**In:**
|
|
||||||
A = hMem
|
A = hMem
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = PTR to MemBlock
|
Y,A = PTR to MemBlock
|
||||||
(X unmodified)
|
(X unmodified)
|
||||||
|
|
||||||
# GetMemByID
|
# GetMemByID
|
||||||
**In:**
|
|
||||||
A = hMem
|
A = hMem
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = ZPMemMgrSPtr = PTR to S.MEM
|
Y,A = ZPMemMgrSPtr = PTR to S.MEM
|
||||||
(X unmodified)
|
(X unmodified)
|
||||||
|
|
||||||
# NewStr
|
# NewStr
|
||||||
Create a new copy of this C-String
|
Create a new copy of this C-String
|
||||||
**In:**
|
|
||||||
Y,A = Ptr to source C-String
|
Y,A = Ptr to source C-String
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : success
|
CC : success
|
||||||
Y,A = PTR to String
|
Y,A = PTR to String
|
||||||
X = hMem (PSTR)
|
X = hMem (PSTR)
|
||||||
@ -432,62 +450,62 @@ CS : error
|
|||||||
A = SYS error code
|
A = SYS error code
|
||||||
|
|
||||||
# SListGetByID
|
# SListGetByID
|
||||||
**In:**
|
|
||||||
PUSHB = hSList
|
PUSHB = hSList
|
||||||
PUSHW = KeyID
|
PUSHW = KeyID
|
||||||
PUSHW = Data Ptr
|
PUSHW = Data Ptr
|
||||||
PUSHW = Key Ptr
|
PUSHW = Key Ptr
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
X,Y = Next KeyID
|
X,Y = Next KeyID
|
||||||
|
|
||||||
# SListUpdateByID
|
# SListUpdateByID
|
||||||
**In:**
|
|
||||||
PUSHB = hSList
|
PUSHB = hSList
|
||||||
PUSHW = KeyID
|
PUSHW = KeyID
|
||||||
PUSHW = Data Ptr
|
PUSHW = Data Ptr
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
A = Key Length
|
A = Key Length
|
||||||
X,Y = KeyID
|
X,Y = KeyID
|
||||||
|
|
||||||
# SListAdd
|
# SListAdd
|
||||||
**In:**
|
|
||||||
PUSHB = hSList
|
PUSHB = hSList
|
||||||
PUSHW = Key Ptr
|
PUSHW = Key Ptr
|
||||||
PUSHW = Data Ptr
|
PUSHW = Data Ptr
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
A = Key Length
|
A = Key Length
|
||||||
X,Y = KeyID
|
X,Y = KeyID
|
||||||
|
|
||||||
# SListLookup
|
# SListLookup
|
||||||
**In:**
|
|
||||||
PUSHB = hSList
|
PUSHB = hSList
|
||||||
PUSHW = Key Ptr
|
PUSHW = Key Ptr
|
||||||
PUSHW = Data Ptr
|
PUSHW = Data Ptr
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
A = Key Length
|
A = Key Length
|
||||||
X,Y = KeyID
|
X,Y = KeyID
|
||||||
|
|
||||||
# SListNew
|
# SListNew
|
||||||
**In:**
|
|
||||||
**Out:**
|
## RETURN VALUE
|
||||||
A=hSList
|
A=hSList
|
||||||
|
|
||||||
# SListFree
|
# SListFree
|
||||||
**In:**
|
|
||||||
A=hSList
|
A=hSList
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# GetStkObjProp
|
# GetStkObjProp
|
||||||
**In:**
|
|
||||||
A = hObject (AUX Memory)
|
A = hObject (AUX Memory)
|
||||||
Y = Property Index
|
Y = Property Index
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = Property Value
|
Y,A = Property Value
|
||||||
|
|
||||||
# NewStkObj
|
# NewStkObj
|
||||||
**In:**
|
|
||||||
Y,A = Size Requested
|
Y,A = Size Requested
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : success
|
CC : success
|
||||||
YA = PTR to Mem (Uninitialised)
|
YA = PTR to Mem (Uninitialised)
|
||||||
* X = hMem
|
* X = hMem
|
||||||
@ -495,20 +513,20 @@ CS : error
|
|||||||
A = EC
|
A = EC
|
||||||
|
|
||||||
# FreeStkObj
|
# FreeStkObj
|
||||||
**In:**
|
|
||||||
A = hMem To Free (AUX Memory)
|
A = hMem To Free (AUX Memory)
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
none.
|
none.
|
||||||
(X,Y unmodified)
|
(X,Y unmodified)
|
||||||
|
|
||||||
# LoadStkObj
|
# LoadStkObj
|
||||||
Load a file in AUX memory (Stock Objects)
|
Load a file in AUX memory (Stock Objects)
|
||||||
**In:**
|
|
||||||
PUSHW = AUXTYPE (Handled by....
|
PUSHW = AUXTYPE (Handled by....
|
||||||
PUSHB = TYPE ...
|
PUSHB = TYPE ...
|
||||||
PUSHB = MODE ...
|
PUSHB = MODE ...
|
||||||
PUSHW = PATH ...FOpen)
|
PUSHW = PATH ...FOpen)
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = File Length
|
Y,A = File Length
|
||||||
X = hMem of Loaded Object in AUX mem
|
X = hMem of Loaded Object in AUX mem
|
||||||
|
|
||||||
@ -521,25 +539,43 @@ Load a file in AUX memory (Stock Objects)
|
|||||||
# CreatePS (Non Blocking)
|
# CreatePS (Non Blocking)
|
||||||
**In:**
|
**In:**
|
||||||
Y,A = PTR To Cmd Line
|
Y,A = PTR To Cmd Line
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
A = Child PSID
|
||||||
|
|
||||||
|
# Exec
|
||||||
|
|
||||||
|
## C
|
||||||
|
`int exec(const char *path, char *const argv[], short int flage);`
|
||||||
|
|
||||||
|
## ASM
|
||||||
|
`>PUSHB flags`
|
||||||
|
`>PUSHW argv`
|
||||||
|
`>LDYAI path`
|
||||||
|
`>SYSCALL exec`
|
||||||
|
|
||||||
|
## RETURN VALUE
|
||||||
A = Child PSID
|
A = Child PSID
|
||||||
|
|
||||||
# GetMemStat
|
# GetMemStat
|
||||||
**In:**
|
**In:**
|
||||||
Y,A = Ptr to 24 bytes buffer
|
Y,A = Ptr to 24 bytes buffer
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Buffer filled with memory stats
|
Buffer filled with memory stats
|
||||||
|
|
||||||
# GetPSStatus
|
# GetPSStatus
|
||||||
**In:**
|
**In:**
|
||||||
A = PID
|
A = PID
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
A = Status Byte
|
A = Status Byte
|
||||||
|
|
||||||
# GetPSStat
|
# GetPSStat
|
||||||
**In:**
|
**In:**
|
||||||
Y,A = Ptr to 24 bytes buffer
|
Y,A = Ptr to 24 bytes buffer
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Buffer filled with PS stats
|
Buffer filled with PS stats
|
||||||
|
|
||||||
# Stat
|
# Stat
|
||||||
@ -553,7 +589,8 @@ Return information about a file
|
|||||||
`>PUSHW statbuf`
|
`>PUSHW statbuf`
|
||||||
`>LDYA pathname`
|
`>LDYA pathname`
|
||||||
`>SYSCALL stat`
|
`>SYSCALL stat`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# MKDir
|
# MKDir
|
||||||
create a directory
|
create a directory
|
||||||
@ -566,7 +603,8 @@ create a directory
|
|||||||
`>PUSHW mode`
|
`>PUSHW mode`
|
||||||
`>LDYA pathname`
|
`>LDYA pathname`
|
||||||
`>SYSCALL mkdir`
|
`>SYSCALL mkdir`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : success
|
CC : success
|
||||||
CS : error
|
CS : error
|
||||||
A = EC
|
A = EC
|
||||||
@ -584,7 +622,8 @@ Create a special or ordinary file.
|
|||||||
`>PUSHW mode`
|
`>PUSHW mode`
|
||||||
`>LDYA pathname`
|
`>LDYA pathname`
|
||||||
`>SYSCALL mknod`
|
`>SYSCALL mknod`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC = OK, CS = ERROR
|
CC = OK, CS = ERROR
|
||||||
A = hFILE
|
A = hFILE
|
||||||
|
|
||||||
@ -599,7 +638,8 @@ return a hFILE to a new FIFO
|
|||||||
`>PUSHW mode`
|
`>PUSHW mode`
|
||||||
`>LDYA pathname`
|
`>LDYA pathname`
|
||||||
`>SYSCALL mkfifo`
|
`>SYSCALL mkfifo`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC = OK, CS = ERROR
|
CC = OK, CS = ERROR
|
||||||
A = hFILE
|
A = hFILE
|
||||||
|
|
||||||
@ -614,7 +654,8 @@ Print A (char) to hFILE
|
|||||||
`>PUSHB character`
|
`>PUSHB character`
|
||||||
`lda stream`
|
`lda stream`
|
||||||
`>SYSCALL fputc`
|
`>SYSCALL fputc`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC = success
|
CC = success
|
||||||
|
|
||||||
# PutChar
|
# PutChar
|
||||||
@ -627,7 +668,8 @@ Print A (char) to StdOut
|
|||||||
**In:**
|
**In:**
|
||||||
`lda caracter`
|
`lda caracter`
|
||||||
`>SYSCALL putchar`
|
`>SYSCALL putchar`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC = success
|
CC = success
|
||||||
|
|
||||||
# PutS
|
# PutS
|
||||||
@ -640,7 +682,8 @@ Write Str to StdOut, appends '\r\n'
|
|||||||
## ASM
|
## ASM
|
||||||
`>LDYAI str`
|
`>LDYAI str`
|
||||||
`>SYSCALL puts`
|
`>SYSCALL puts`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC = success
|
CC = success
|
||||||
|
|
||||||
# FPutS
|
# FPutS
|
||||||
@ -654,7 +697,8 @@ Write Str to FILE
|
|||||||
`>PUSHW str`
|
`>PUSHW str`
|
||||||
`lda stream`
|
`lda stream`
|
||||||
`>SYSCALL fputs`
|
`>SYSCALL fputs`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC = success
|
CC = success
|
||||||
|
|
||||||
# PrintF/SPrintF/FPrintF
|
# PrintF/SPrintF/FPrintF
|
||||||
@ -687,7 +731,8 @@ FPrintF :
|
|||||||
`>PUSHWI format`
|
`>PUSHWI format`
|
||||||
`lda hFILE`
|
`lda hFILE`
|
||||||
`>SYSCALL fprintf`
|
`>SYSCALL fprintf`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : success, Y,A = bytes sent
|
CC : success, Y,A = bytes sent
|
||||||
CS : error, A = code from Output
|
CS : error, A = code from Output
|
||||||
Specifiers :
|
Specifiers :
|
||||||
@ -739,7 +784,8 @@ string is then terminated with a null byte.
|
|||||||
`>PUSHW s`
|
`>PUSHW s`
|
||||||
`lda hFILE`
|
`lda hFILE`
|
||||||
`>SYSCALL fgets`
|
`>SYSCALL fgets`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A: s
|
Y,A: s
|
||||||
CC = success
|
CC = success
|
||||||
|
|
||||||
@ -752,7 +798,8 @@ Get char from StdIn
|
|||||||
## ASM
|
## ASM
|
||||||
**In:**
|
**In:**
|
||||||
`>SYSCALL getchar`
|
`>SYSCALL getchar`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC = success
|
CC = success
|
||||||
A = char
|
A = char
|
||||||
|
|
||||||
@ -766,7 +813,8 @@ Get char from Node
|
|||||||
**In:**
|
**In:**
|
||||||
`lda stream`
|
`lda stream`
|
||||||
`>SYSCALL getc`
|
`>SYSCALL getc`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC = success
|
CC = success
|
||||||
A = char
|
A = char
|
||||||
|
|
||||||
@ -795,7 +843,8 @@ Read formatted data from string
|
|||||||
TODO : %10s
|
TODO : %10s
|
||||||
`>LDYA s`
|
`>LDYA s`
|
||||||
`>SYSCALL sscanf`
|
`>SYSCALL sscanf`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
A = Number of arguments filled.
|
A = Number of arguments filled.
|
||||||
|
|
||||||
# FOpen
|
# FOpen
|
||||||
@ -825,7 +874,8 @@ TODO: replace flags/ftype/auxtype with mode="w+,t=TYP,x=AUXTYPE"
|
|||||||
+ ,t=123 or t=$ff or t=TXT
|
+ ,t=123 or t=$ff or t=TXT
|
||||||
+ ,x=12345 or x=$ffff
|
+ ,x=12345 or x=$ffff
|
||||||
`>LDYAI filename`
|
`>LDYAI filename`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : A = hFILE
|
CC : A = hFILE
|
||||||
CS : A = EC
|
CS : A = EC
|
||||||
|
|
||||||
@ -839,7 +889,8 @@ int fclose ( hFILE stream );
|
|||||||
**In:**
|
**In:**
|
||||||
`lda stream`
|
`lda stream`
|
||||||
`>SYSCALL fclose`
|
`>SYSCALL fclose`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# FRead
|
# FRead
|
||||||
Read bytes from file
|
Read bytes from file
|
||||||
@ -853,7 +904,8 @@ int fread (hFILE stream, void * ptr, int count );
|
|||||||
`>PUSHW ptr`
|
`>PUSHW ptr`
|
||||||
`lda stream`
|
`lda stream`
|
||||||
`>SYSCALL fread`
|
`>SYSCALL fread`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = Bytes Read
|
Y,A = Bytes Read
|
||||||
|
|
||||||
# FWrite
|
# FWrite
|
||||||
@ -868,7 +920,8 @@ Write bytes to file
|
|||||||
`>PUSHW ptr`
|
`>PUSHW ptr`
|
||||||
`lda stream`
|
`lda stream`
|
||||||
`>SYSCALL fwrite`
|
`>SYSCALL fwrite`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = Bytes Written
|
Y,A = Bytes Written
|
||||||
|
|
||||||
# FFlush
|
# FFlush
|
||||||
@ -904,7 +957,8 @@ Test the end-of-file indicator for hFILE
|
|||||||
**In:**
|
**In:**
|
||||||
`lda stream`
|
`lda stream`
|
||||||
`>SYSCALL feof`
|
`>SYSCALL feof`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC :
|
CC :
|
||||||
A=0 EOF
|
A=0 EOF
|
||||||
A =0 NOT EOF
|
A =0 NOT EOF
|
||||||
@ -920,7 +974,8 @@ Return the current value of the file-position indicator
|
|||||||
**In:**
|
**In:**
|
||||||
`lda stream`
|
`lda stream`
|
||||||
`>SYSCALL ftell`
|
`>SYSCALL ftell`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
On stack (long)
|
On stack (long)
|
||||||
|
|
||||||
# Remove
|
# Remove
|
||||||
@ -933,7 +988,8 @@ int remove(const char *pathname);
|
|||||||
**In:**
|
**In:**
|
||||||
`>LDYA pathname`
|
`>LDYA pathname`
|
||||||
`>SYSCALL remove`
|
`>SYSCALL remove`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# Rename
|
# Rename
|
||||||
Rename a file
|
Rename a file
|
||||||
@ -946,7 +1002,8 @@ Rename a file
|
|||||||
`>PUSHW newpath`
|
`>PUSHW newpath`
|
||||||
`>LDYA oldpath`
|
`>LDYA oldpath`
|
||||||
`>SYSCALL rename`
|
`>SYSCALL rename`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# strtof
|
# strtof
|
||||||
Convert String to 40 bits Float
|
Convert String to 40 bits Float
|
||||||
@ -959,7 +1016,8 @@ Convert String to 40 bits Float
|
|||||||
`>PUSHWI EndPtr`
|
`>PUSHWI EndPtr`
|
||||||
`>LDYA str`
|
`>LDYA str`
|
||||||
`>SYSCALL strtof`
|
`>SYSCALL strtof`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
On stack (float)
|
On stack (float)
|
||||||
|
|
||||||
# AToF
|
# AToF
|
||||||
@ -972,7 +1030,8 @@ Convert String to 40 bits Float
|
|||||||
**In:**
|
**In:**
|
||||||
`>LDYA str`
|
`>LDYA str`
|
||||||
`>SYSCALL atof`
|
`>SYSCALL atof`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
On stack (float)
|
On stack (float)
|
||||||
|
|
||||||
# StrToL/StrToUL
|
# StrToL/StrToUL
|
||||||
@ -988,7 +1047,8 @@ Convert String to 32 bits (unsigned) int
|
|||||||
`>PUSHWI EndPtr`
|
`>PUSHWI EndPtr`
|
||||||
`>LDYAI str`
|
`>LDYAI str`
|
||||||
`>SYSCALL strtol`
|
`>SYSCALL strtol`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
On stack (long)
|
On stack (long)
|
||||||
|
|
||||||
# atol
|
# atol
|
||||||
@ -1001,7 +1061,8 @@ Convert String to 32 bits long
|
|||||||
**In:**
|
**In:**
|
||||||
`>LDYA str`
|
`>LDYA str`
|
||||||
`>SYSCALL atol`
|
`>SYSCALL atol`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
On stack (long)
|
On stack (long)
|
||||||
|
|
||||||
# atoi
|
# atoi
|
||||||
@ -1014,7 +1075,8 @@ Convert String to 16 bits int
|
|||||||
**In:**
|
**In:**
|
||||||
`>LDYAI str`
|
`>LDYAI str`
|
||||||
`>SYSCALL atoi`
|
`>SYSCALL atoi`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = int
|
Y,A = int
|
||||||
|
|
||||||
# RealPath
|
# RealPath
|
||||||
@ -1027,7 +1089,8 @@ Return the canonicalized absolute pathname
|
|||||||
**In:**
|
**In:**
|
||||||
`>LDYA str`
|
`>LDYA str`
|
||||||
`>SYSCALL realpath`
|
`>SYSCALL realpath`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : success
|
CC : success
|
||||||
Y,A = Ptr to Full Path (C-String)
|
Y,A = Ptr to Full Path (C-String)
|
||||||
X = hMem of Full Path
|
X = hMem of Full Path
|
||||||
@ -1040,10 +1103,10 @@ Returns Length of C-String
|
|||||||
`int strlen ( char * str);`
|
`int strlen ( char * str);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
|
||||||
`>LDYAI str`
|
`>LDYAI str`
|
||||||
`>SYSCALL strlen`
|
`>SYSCALL strlen`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = String length
|
Y,A = String length
|
||||||
|
|
||||||
# StrCat
|
# StrCat
|
||||||
@ -1057,7 +1120,8 @@ Concatenate strings
|
|||||||
`>PUSHWI source`
|
`>PUSHWI source`
|
||||||
`>LDYAI destination`
|
`>LDYAI destination`
|
||||||
`>SYSCALL strcat`
|
`>SYSCALL strcat`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = destination
|
Y,A = destination
|
||||||
|
|
||||||
# StrCpy
|
# StrCpy
|
||||||
@ -1071,7 +1135,8 @@ Copy string
|
|||||||
`>PUSHWI source`
|
`>PUSHWI source`
|
||||||
`>LDYAI destination`
|
`>LDYAI destination`
|
||||||
`>SYSCALL strcpy`
|
`>SYSCALL strcpy`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = destination
|
Y,A = destination
|
||||||
|
|
||||||
# StrMatch
|
# StrMatch
|
||||||
@ -1085,7 +1150,8 @@ Compare a String against pattern (e.g. '*test?.txt')
|
|||||||
`>PUSHWI pattern`
|
`>PUSHWI pattern`
|
||||||
`>LDYAI s`
|
`>LDYAI s`
|
||||||
`>SYSCALL strmatch`
|
`>SYSCALL strmatch`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : match
|
CC : match
|
||||||
CS : no match
|
CS : no match
|
||||||
|
|
||||||
@ -1101,7 +1167,8 @@ Convert string to UPPERCASE/lowercase
|
|||||||
`>LDYAI str`
|
`>LDYAI str`
|
||||||
`>SYSCALL strupr`
|
`>SYSCALL strupr`
|
||||||
`>SYSCALL strlwr`
|
`>SYSCALL strlwr`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Uppercased/lowercased String in Buffer
|
Uppercased/lowercased String in Buffer
|
||||||
Y,A = str
|
Y,A = str
|
||||||
|
|
||||||
@ -1116,7 +1183,8 @@ Compare 2 strings
|
|||||||
`>PUSHWI s2`
|
`>PUSHWI s2`
|
||||||
`>LDYAI s1`
|
`>LDYAI s1`
|
||||||
`>SYSCALL strcmp`
|
`>SYSCALL strcmp`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : match
|
CC : match
|
||||||
CS : no match
|
CS : no match
|
||||||
CC, Y,A=0
|
CC, Y,A=0
|
||||||
@ -1133,7 +1201,8 @@ Compare 2 strings, ignoring case
|
|||||||
`>PUSHWI s2`
|
`>PUSHWI s2`
|
||||||
`>LDYAI s1`
|
`>LDYAI s1`
|
||||||
`>SYSCALL strcasecmp`
|
`>SYSCALL strcasecmp`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : match
|
CC : match
|
||||||
CS : no match
|
CS : no match
|
||||||
CC, Y,A=0
|
CC, Y,A=0
|
||||||
@ -1146,9 +1215,10 @@ Get System Time in Buffer
|
|||||||
`time_t time (S.TIME* timer);`
|
`time_t time (S.TIME* timer);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
`>LDYA timer`
|
||||||
Y,A = PTR to S.TIME
|
`>SYSCALL time`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
S.TIME filled with System date/time
|
S.TIME filled with System date/time
|
||||||
|
|
||||||
# PTime2Time
|
# PTime2Time
|
||||||
@ -1158,11 +1228,11 @@ S.TIME filled with System date/time
|
|||||||
`int PTime2Time (long* ptime, S.TIME* timer);`
|
`int PTime2Time (long* ptime, S.TIME* timer);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In :**
|
|
||||||
`>PUSHW timer`
|
`>PUSHW timer`
|
||||||
`>LDYA ptime`
|
`>LDYA ptime`
|
||||||
`>SYSCALL PTime2Time`
|
`>SYSCALL PTime2Time`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# CTime2Time
|
# CTime2Time
|
||||||
Convert CTime Time To S.TIME
|
Convert CTime Time To S.TIME
|
||||||
@ -1171,22 +1241,21 @@ S.TIME filled with System date/time
|
|||||||
`int CTime2Time (long* ctime, S.TIME* timer);`
|
`int CTime2Time (long* ctime, S.TIME* timer);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In :**
|
|
||||||
`>PUSHW timer`
|
`>PUSHW timer`
|
||||||
`>LDYA ctime`
|
`>LDYA ctime`
|
||||||
`>SYSCALL CTime2Time`
|
`>SYSCALL CTime2Time`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# StrFTime
|
# StrFTime
|
||||||
|
|
||||||
## C
|
## C
|
||||||
Convert S.TIME struct to CSTR
|
Convert S.TIME struct to CSTR
|
||||||
`size_t strftime (char* ptr, size_t maxsize, const char* format, const struct tm* timeptr );`
|
`size_t strftime (char* ptr, const char* format, const struct S.TIME* timeptr );`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
`PUSHW timeptr`
|
||||||
PUSHW = Dst PTR To CSTR Buf
|
`PUSHW format`
|
||||||
PUSHW = Src PTR To Format String
|
|
||||||
+ %a : Abbreviated weekday name : Thu
|
+ %a : Abbreviated weekday name : Thu
|
||||||
+ %A : Full weekday name : Thursday
|
+ %A : Full weekday name : Thursday
|
||||||
+ %b : Abbreviated month name : Aug
|
+ %b : Abbreviated month name : Aug
|
||||||
@ -1202,6 +1271,8 @@ PUSHW = Src PTR To Format String
|
|||||||
+ %y : Year, last two digits (00-99)
|
+ %y : Year, last two digits (00-99)
|
||||||
+ %Y : Year four digits 2001
|
+ %Y : Year four digits 2001
|
||||||
|
|
||||||
PUSHW = Src PTR To S.Time
|
`>LDYA ptr`
|
||||||
**Out:**
|
`>SYSCALL strftime`
|
||||||
|
|
||||||
|
## RETURN VALUE
|
||||||
none. always succeed.
|
none. always succeed.
|
||||||
|
@ -11,7 +11,8 @@ int getprodoscatsize (short int options, short int catsize, int devsize );
|
|||||||
PUSHW = DevSize (in 512b blocks)
|
PUSHW = DevSize (in 512b blocks)
|
||||||
PUSHB = Catalog Size (in blocks)
|
PUSHB = Catalog Size (in blocks)
|
||||||
PUSHB = Options
|
PUSHB = Options
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
X=BlockCount (max 22)
|
X=BlockCount (max 22)
|
||||||
Y,A=BufSize (max $4400)
|
Y,A=BufSize (max $4400)
|
||||||
|
|
||||||
@ -37,7 +38,8 @@ Write a track (16 sectors)
|
|||||||
PUSHW = Ptr to 16*256 buffer
|
PUSHW = Ptr to 16*256 buffer
|
||||||
PUSHB = TrackNum * 4 : 0->140+
|
PUSHB = TrackNum * 4 : 0->140+
|
||||||
PUSHB = DSSS0000
|
PUSHB = DSSS0000
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : success
|
CC : success
|
||||||
CS : A = Error
|
CS : A = Error
|
||||||
A=0, currently starting/seeking...
|
A=0, currently starting/seeking...
|
||||||
@ -48,7 +50,8 @@ Write a track (NIBBLE)
|
|||||||
PUSHW = Ptr to NIBBLE buffer (0 ended)
|
PUSHW = Ptr to NIBBLE buffer (0 ended)
|
||||||
PUSHB = TrackNum * 4 : 0->140+
|
PUSHB = TrackNum * 4 : 0->140+
|
||||||
PUSHB = DSSS0000
|
PUSHB = DSSS0000
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC : success
|
CC : success
|
||||||
CS : A = Error
|
CS : A = Error
|
||||||
A=0, currently starting/seeking...
|
A=0, currently starting/seeking...
|
||||||
|
@ -10,7 +10,8 @@ Return MD5 Hash for input String
|
|||||||
**In:**
|
**In:**
|
||||||
`>PUSHW digest`
|
`>PUSHW digest`
|
||||||
`>LDYA str`
|
`>LDYA str`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC
|
CC
|
||||||
|
|
||||||
## MD5Init
|
## MD5Init
|
||||||
@ -21,7 +22,8 @@ Initialize a MD5 computation
|
|||||||
|
|
||||||
# ASM
|
# ASM
|
||||||
**In:**
|
**In:**
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
A = hMem To S.MD5
|
A = hMem To S.MD5
|
||||||
|
|
||||||
## MD5Update
|
## MD5Update
|
||||||
@ -35,7 +37,8 @@ Add Data to MD5 computation
|
|||||||
`>PUSHW len`
|
`>PUSHW len`
|
||||||
`>PUSHW data`
|
`>PUSHW data`
|
||||||
`>LDA.G md5`
|
`>LDA.G md5`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
## MD5Finalize
|
## MD5Finalize
|
||||||
|
|
||||||
@ -46,4 +49,5 @@ Add Data to MD5 computation
|
|||||||
**In:**
|
**In:**
|
||||||
`>PUSHW digest`
|
`>PUSHW digest`
|
||||||
`>LDA.G md5`
|
`>LDA.G md5`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
@ -3,14 +3,16 @@
|
|||||||
# ARP.Clear
|
# ARP.Clear
|
||||||
Clear ARP Cache
|
Clear ARP Cache
|
||||||
**In:**
|
**In:**
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# ARP.Query
|
# ARP.Query
|
||||||
Query ARP Cache and returns HW address
|
Query ARP Cache and returns HW address
|
||||||
**In:**
|
**In:**
|
||||||
PUSHW PTR to MAC (to fill)
|
PUSHW PTR to MAC (to fill)
|
||||||
PUSHW PTR to IP
|
PUSHW PTR to IP
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC: hit: MAC filled
|
CC: hit: MAC filled
|
||||||
CS: missed
|
CS: missed
|
||||||
|
|
||||||
@ -23,20 +25,23 @@
|
|||||||
# ARP.GetCache
|
# ARP.GetCache
|
||||||
Return a Ptr to ARP Cache Table
|
Return a Ptr to ARP Cache Table
|
||||||
**In:**
|
**In:**
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = PTR to ARP.CACHE
|
Y,A = PTR to ARP.CACHE
|
||||||
|
|
||||||
# DNS.Clear
|
# DNS.Clear
|
||||||
Clear DNS Cache
|
Clear DNS Cache
|
||||||
**In:**
|
**In:**
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# DNS.Query
|
# DNS.Query
|
||||||
Query DNS for specified host
|
Query DNS for specified host
|
||||||
**In:**
|
**In:**
|
||||||
PUSHW = PTR to IP to fill with cached data
|
PUSHW = PTR to IP to fill with cached data
|
||||||
* PUSHW = hostname PTR to PSTR
|
* PUSHW = hostname PTR to PSTR
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC: hit: IP filled with address
|
CC: hit: IP filled with address
|
||||||
CS: missed
|
CS: missed
|
||||||
|
|
||||||
@ -49,7 +54,8 @@
|
|||||||
# DNS.GetCAche
|
# DNS.GetCAche
|
||||||
Return a Ptr to DNS Cache Table
|
Return a Ptr to DNS Cache Table
|
||||||
**In:**
|
**In:**
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
Y,A = PTR to DNS.CACHE
|
Y,A = PTR to DNS.CACHE
|
||||||
|
|
||||||
# Socket
|
# Socket
|
||||||
@ -63,7 +69,8 @@ Create a new socket
|
|||||||
`>PUSHB protocol`
|
`>PUSHB protocol`
|
||||||
`lda type`
|
`lda type`
|
||||||
`>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
|
`>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC: A = hSOCKET
|
CC: A = hSOCKET
|
||||||
CS: A = EC
|
CS: A = EC
|
||||||
|
|
||||||
@ -78,7 +85,8 @@ bind a name to a socket
|
|||||||
`>PUSHW addr`
|
`>PUSHW addr`
|
||||||
`lda fd`
|
`lda fd`
|
||||||
`>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
|
`>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC: A = hSOCKET
|
CC: A = hSOCKET
|
||||||
CS: A = EC
|
CS: A = EC
|
||||||
|
|
||||||
@ -93,7 +101,8 @@ Iinitiate a connection on a socket
|
|||||||
`>PUSHW addr`
|
`>PUSHW addr`
|
||||||
`lda fd`
|
`lda fd`
|
||||||
`>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
|
`>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC: A = hSOCKET
|
CC: A = hSOCKET
|
||||||
CS: A = EC
|
CS: A = EC
|
||||||
|
|
||||||
@ -107,7 +116,8 @@ Listen for connections on a socket
|
|||||||
**In:**
|
**In:**
|
||||||
`lda fd`
|
`lda fd`
|
||||||
`>LIBCALL hLIBTCPIP,LIBTCPIP.listen`
|
`>LIBCALL hLIBTCPIP,LIBTCPIP.listen`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CS: A = EC
|
CS: A = EC
|
||||||
|
|
||||||
# Accept
|
# Accept
|
||||||
@ -120,7 +130,8 @@ Accept a connection on a socket
|
|||||||
**In:**
|
**In:**
|
||||||
`lda fd`
|
`lda fd`
|
||||||
`>LIBCALL hLIBTCPIP,LIBTCPIP.accept`
|
`>LIBCALL hLIBTCPIP,LIBTCPIP.accept`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
A = hSocket
|
A = hSocket
|
||||||
|
|
||||||
# Shutdown
|
# Shutdown
|
||||||
@ -133,7 +144,8 @@ Close socket
|
|||||||
**In:**
|
**In:**
|
||||||
`lda fd`
|
`lda fd`
|
||||||
`>LIBCALL hLIBTCPIP,LIBTCPIP.shutdown`
|
`>LIBCALL hLIBTCPIP,LIBTCPIP.shutdown`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
|
||||||
# Read (STREAM)
|
# Read (STREAM)
|
||||||
|
|
||||||
@ -146,7 +158,8 @@ Close socket
|
|||||||
`>PUSHW buf`
|
`>PUSHW buf`
|
||||||
`lda fd`
|
`lda fd`
|
||||||
`>LIBCALL hLIBTCPIP,LIBTCPIP.skt.read`
|
`>LIBCALL hLIBTCPIP,LIBTCPIP.skt.read`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC: Y,A = bytes read
|
CC: Y,A = bytes read
|
||||||
CS: A = EC
|
CS: A = EC
|
||||||
|
|
||||||
@ -161,7 +174,8 @@ CS: A = EC
|
|||||||
`>PUSHW buf`
|
`>PUSHW buf`
|
||||||
`lda fd`
|
`lda fd`
|
||||||
`>LIBCALL hLIBTCPIP,LIBTCPIP.skt.write`
|
`>LIBCALL hLIBTCPIP,LIBTCPIP.skt.write`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC: Y,A = bytes written
|
CC: Y,A = bytes written
|
||||||
CS: A = EC
|
CS: A = EC
|
||||||
|
|
||||||
@ -178,7 +192,8 @@ CS: A = EC
|
|||||||
`>PUSHW addr` (RecvFrom)
|
`>PUSHW addr` (RecvFrom)
|
||||||
`lda fd`
|
`lda fd`
|
||||||
`>LIBCALL hLIBTCPIP,LIBTCPIP.skt.Recv`
|
`>LIBCALL hLIBTCPIP,LIBTCPIP.skt.Recv`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC: A = hMem
|
CC: A = hMem
|
||||||
CS: A = EC
|
CS: A = EC
|
||||||
|
|
||||||
@ -197,7 +212,8 @@ CS: A = EC
|
|||||||
`>PUSHW buf`
|
`>PUSHW buf`
|
||||||
`lda fd`
|
`lda fd`
|
||||||
`>LIBCALL hLIBTCPIP,LIBTCPIP.skt.send`
|
`>LIBCALL hLIBTCPIP,LIBTCPIP.skt.send`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
CC: Y,A = bytes written
|
CC: Y,A = bytes written
|
||||||
CS: A = EC
|
CS: A = EC
|
||||||
|
|
||||||
@ -210,4 +226,5 @@ Get socket table
|
|||||||
## ASM
|
## ASM
|
||||||
**In:**
|
**In:**
|
||||||
`>LIBCALL hLIBTCPIP,LIBTCPIP.skt.GetTable`
|
`>LIBCALL hLIBTCPIP,LIBTCPIP.skt.GetTable`
|
||||||
**Out:**
|
|
||||||
|
## RETURN VALUE
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -343,8 +343,6 @@ CS.RUN.PUSHDATES
|
|||||||
lda (ZPFileStat),y
|
lda (ZPFileStat),y
|
||||||
beq .1 Month=0.....invalid date/time
|
beq .1 Month=0.....invalid date/time
|
||||||
|
|
||||||
>PUSHEA.G TIME.Mod
|
|
||||||
>PUSHW L.FMT.DateTime
|
|
||||||
lda ZPFileStat
|
lda ZPFileStat
|
||||||
clc
|
clc
|
||||||
adc #S.STAT.MTIME
|
adc #S.STAT.MTIME
|
||||||
@ -352,14 +350,14 @@ CS.RUN.PUSHDATES
|
|||||||
lda ZPFileStat+1
|
lda ZPFileStat+1
|
||||||
adc #0
|
adc #0
|
||||||
>PUSHYA
|
>PUSHYA
|
||||||
|
>PUSHW L.FMT.DateTime
|
||||||
|
>LEA.G TIME.Mod
|
||||||
>SYSCALL StrFTime
|
>SYSCALL StrFTime
|
||||||
|
|
||||||
.1 ldy #S.STAT.CTIME+S.TIME.MONTH
|
.1 ldy #S.STAT.CTIME+S.TIME.MONTH
|
||||||
lda (ZPFileStat),y
|
lda (ZPFileStat),y
|
||||||
beq .2 Month=0.....invalid date/time
|
beq .2 Month=0.....invalid date/time
|
||||||
|
|
||||||
>PUSHEA.G TIME.Create
|
|
||||||
>PUSHW L.FMT.DateTime
|
|
||||||
lda ZPFileStat
|
lda ZPFileStat
|
||||||
clc
|
clc
|
||||||
adc #S.STAT.CTIME
|
adc #S.STAT.CTIME
|
||||||
@ -367,6 +365,8 @@ CS.RUN.PUSHDATES
|
|||||||
lda ZPFileStat+1
|
lda ZPFileStat+1
|
||||||
adc #0
|
adc #0
|
||||||
>PUSHYA
|
>PUSHYA
|
||||||
|
>PUSHW L.FMT.DateTime
|
||||||
|
>LEA.G TIME.Create
|
||||||
>SYSCALL StrFTime
|
>SYSCALL StrFTime
|
||||||
|
|
||||||
.2 >PUSHEA.G TIME.Mod
|
.2 >PUSHEA.G TIME.Mod
|
||||||
|
@ -5,11 +5,13 @@ AUTO 4,1
|
|||||||
K.VER .EQ $5C00 92.0
|
K.VER .EQ $5C00 92.0
|
||||||
K.ENV.SIZE .EQ 256
|
K.ENV.SIZE .EQ 256
|
||||||
K.PIPE.SIZE .EQ 256
|
K.PIPE.SIZE .EQ 256
|
||||||
|
*--------------------------------------
|
||||||
|
K.IRQDEV.MAX .EQ 4
|
||||||
|
K.DEV.MAX .EQ 32
|
||||||
|
K.NOD.MAX .EQ 32
|
||||||
|
K.PS.MAX .EQ 32
|
||||||
K.FLT.MAX .EQ 4
|
K.FLT.MAX .EQ 4
|
||||||
K.EVT.MAX .EQ 4
|
K.EVT.MAX .EQ 4
|
||||||
K.DEV.MAX .EQ 32
|
|
||||||
K.NOD.MAX .EQ 64
|
|
||||||
K.PS.MAX .EQ 32
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ZPDRV .EQ $20 32 bytes
|
ZPDRV .EQ $20 32 bytes
|
||||||
ZPLIB .EQ $40 32 bytes
|
ZPLIB .EQ $40 32 bytes
|
||||||
|
@ -99,19 +99,15 @@ K.STACKTOP .EQ $03ED XFer !!! down to $3E0
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* free $0C00->$17FF = $C00 (3072) Aux
|
* free $0C00->$17FF = $C00 (3072) Aux
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Dev.Table.hFD .EQ $0C00 K.Dev.MAX
|
Dev.Table.hPath .EQ $0C00 K.Dev.MAX
|
||||||
Dev.Table.F .EQ $0C20 K.Dev.MAX
|
Dev.Table.hFD .EQ $0C20 K.Dev.MAX
|
||||||
Dev.Table.pFDLO .EQ $0C40 K.Dev.MAX
|
|
||||||
Dev.Table.pFDHI .EQ $0C60 K.Dev.MAX
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* Nod (Opened files)
|
Nod.Table.hPath .EQ $0C40 K.NOD.MAX
|
||||||
|
Nod.Table.hFD .EQ $0C60 K.NOD.MAX
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Nod.Table.hPath .EQ $0C80 K.NOD.MAX
|
PS.Table.hMem .EQ $0C80 K.PS.MAX
|
||||||
Nod.Table.hFD .EQ $0CC0 K.NOD.MAX
|
PS.Table.PID .EQ $0CA0 K.PS.MAX
|
||||||
*--------------------------------------
|
PS.Table.Stat .EQ $0CC0 K.PS.MAX*2
|
||||||
PS.Table.hMem .EQ $0D00 K.PS.MAX
|
|
||||||
PS.Table.PID .EQ $0D20 K.PS.MAX
|
|
||||||
PS.Table.Stat .EQ $0D40 K.PS.MAX
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Evt.Table .EQ $0D60 K.EVT.MAX*S.EVT.SIZE=4*8=32b
|
Evt.Table .EQ $0D60 K.EVT.MAX*S.EVT.SIZE=4*8=32b
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -86,7 +86,7 @@ LIB.UNLOAD clc
|
|||||||
* PUSHW = DevSize (in 512b blocks)
|
* PUSHW = DevSize (in 512b blocks)
|
||||||
* PUSHB = Catalog Size (in blocks)
|
* PUSHB = Catalog Size (in blocks)
|
||||||
* PUSHB = Options
|
* PUSHB = Options
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* X=BlockCount (max 22)
|
* X=BlockCount (max 22)
|
||||||
* Y,A=BufSize (max $4400)
|
* Y,A=BufSize (max $4400)
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -298,7 +298,7 @@ D2TrkR16s
|
|||||||
* PUSHW = Ptr to 16*256 buffer
|
* PUSHW = Ptr to 16*256 buffer
|
||||||
* PUSHB = TrackNum * 4 : 0->140+
|
* PUSHB = TrackNum * 4 : 0->140+
|
||||||
* PUSHB = DSSS0000
|
* PUSHB = DSSS0000
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : success
|
* CC : success
|
||||||
* CS : A = Error
|
* CS : A = Error
|
||||||
* A=0, currently starting/seeking...
|
* A=0, currently starting/seeking...
|
||||||
@ -314,7 +314,7 @@ D2TrkW16s
|
|||||||
* PUSHW = Ptr to NIBBLE buffer (0 ended)
|
* PUSHW = Ptr to NIBBLE buffer (0 ended)
|
||||||
* PUSHB = TrackNum * 4 : 0->140+
|
* PUSHB = TrackNum * 4 : 0->140+
|
||||||
* PUSHB = DSSS0000
|
* PUSHB = DSSS0000
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : success
|
* CC : success
|
||||||
* CS : A = Error
|
* CS : A = Error
|
||||||
* A=0, currently starting/seeking...
|
* A=0, currently starting/seeking...
|
||||||
|
@ -119,7 +119,7 @@ LIB.UNLOAD clc
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `>PUSHW digest`
|
* `>PUSHW digest`
|
||||||
* `>LDYA str`
|
* `>LDYA str`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC
|
* CC
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
MD5 >STYA ZPDataPtr
|
MD5 >STYA ZPDataPtr
|
||||||
@ -149,7 +149,7 @@ MD5 >STYA ZPDataPtr
|
|||||||
* `HANDLE md5init ();`
|
* `HANDLE md5init ();`
|
||||||
* # ASM
|
* # ASM
|
||||||
* **In:**
|
* **In:**
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* A = hMem To S.MD5
|
* A = hMem To S.MD5
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
MD5Init >LDYAI S.MD5
|
MD5Init >LDYAI S.MD5
|
||||||
@ -186,7 +186,7 @@ MD5Init >LDYAI S.MD5
|
|||||||
* `>PUSHW len`
|
* `>PUSHW len`
|
||||||
* `>PUSHW data`
|
* `>PUSHW data`
|
||||||
* `>LDA.G md5`
|
* `>LDA.G md5`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
MD5Update >SYSCALL GetMemPtr get MD5 Context
|
MD5Update >SYSCALL GetMemPtr get MD5 Context
|
||||||
>STYA ZPCtxPtr
|
>STYA ZPCtxPtr
|
||||||
@ -272,7 +272,7 @@ MD5Update.I ldy #S.MD5.FINALIZED
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `>PUSHW digest`
|
* `>PUSHW digest`
|
||||||
* `>LDA.G md5`
|
* `>LDA.G md5`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
MD5Finalize >PULLA
|
MD5Finalize >PULLA
|
||||||
pha
|
pha
|
||||||
|
@ -6,7 +6,7 @@ AUTO 4,1
|
|||||||
* # ARP.Clear
|
* # ARP.Clear
|
||||||
* Clear ARP Cache
|
* Clear ARP Cache
|
||||||
* **In:**
|
* **In:**
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
ARP.Clear ldx #K.ARPCACHE.SIZE*S.ARPCACHE
|
ARP.Clear ldx #K.ARPCACHE.SIZE*S.ARPCACHE
|
||||||
.1 stz ARP.CACHE-1,x
|
.1 stz ARP.CACHE-1,x
|
||||||
@ -20,7 +20,7 @@ ARP.Clear ldx #K.ARPCACHE.SIZE*S.ARPCACHE
|
|||||||
* **In:**
|
* **In:**
|
||||||
* PUSHW PTR to MAC (to fill)
|
* PUSHW PTR to MAC (to fill)
|
||||||
* PUSHW PTR to IP
|
* PUSHW PTR to IP
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC: hit: MAC filled
|
* CC: hit: MAC filled
|
||||||
* CS: missed
|
* CS: missed
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -90,7 +90,7 @@ ARP.ADD.I sta ARP.TmpCache
|
|||||||
* # ARP.GetCache
|
* # ARP.GetCache
|
||||||
* Return a Ptr to ARP Cache Table
|
* Return a Ptr to ARP Cache Table
|
||||||
* **In:**
|
* **In:**
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = PTR to ARP.CACHE
|
* Y,A = PTR to ARP.CACHE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
ARP.GetCache >LDYA L.ARP.CACHE
|
ARP.GetCache >LDYA L.ARP.CACHE
|
||||||
|
@ -6,7 +6,7 @@ AUTO 4,1
|
|||||||
* # DNS.Clear
|
* # DNS.Clear
|
||||||
* Clear DNS Cache
|
* Clear DNS Cache
|
||||||
* **In:**
|
* **In:**
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
DNS.Clear ldx #K.DNSCACHE.SIZE*S.DNSCACHE
|
DNS.Clear ldx #K.DNSCACHE.SIZE*S.DNSCACHE
|
||||||
.1 stz DNS.CACHE-1,x
|
.1 stz DNS.CACHE-1,x
|
||||||
@ -20,7 +20,7 @@ DNS.Clear ldx #K.DNSCACHE.SIZE*S.DNSCACHE
|
|||||||
* **In:**
|
* **In:**
|
||||||
* PUSHW = PTR to IP to fill with cached data
|
* PUSHW = PTR to IP to fill with cached data
|
||||||
* PUSHW = hostname PTR to PSTR
|
* PUSHW = hostname PTR to PSTR
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC: hit: IP filled with address
|
* CC: hit: IP filled with address
|
||||||
* CS: missed
|
* CS: missed
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -221,7 +221,7 @@ DNS.ADD.I sta DNS.TmpCache
|
|||||||
* # DNS.GetCAche
|
* # DNS.GetCAche
|
||||||
* Return a Ptr to DNS Cache Table
|
* Return a Ptr to DNS Cache Table
|
||||||
* **In:**
|
* **In:**
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = PTR to DNS.CACHE
|
* Y,A = PTR to DNS.CACHE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
DNS.GetCAche >LDYA L.DNS.CACHE
|
DNS.GetCAche >LDYA L.DNS.CACHE
|
||||||
|
@ -12,7 +12,7 @@ AUTO 4,1
|
|||||||
* `>PUSHB protocol`
|
* `>PUSHB protocol`
|
||||||
* `lda type`
|
* `lda type`
|
||||||
* `>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
|
* `>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC: A = hSOCKET
|
* CC: A = hSOCKET
|
||||||
* CS: A = EC
|
* CS: A = EC
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -110,7 +110,7 @@ SKT.Socket.FindFree
|
|||||||
* `>PUSHW addr`
|
* `>PUSHW addr`
|
||||||
* `lda fd`
|
* `lda fd`
|
||||||
* `>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
|
* `>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC: A = hSOCKET
|
* CC: A = hSOCKET
|
||||||
* CS: A = EC
|
* CS: A = EC
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -150,7 +150,7 @@ SKT.bind >SYSCALL GetMemPtr
|
|||||||
* `>PUSHW addr`
|
* `>PUSHW addr`
|
||||||
* `lda fd`
|
* `lda fd`
|
||||||
* `>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
|
* `>LIBCALL hLIBTCPIP,LIBTCPIP.socket`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC: A = hSOCKET
|
* CC: A = hSOCKET
|
||||||
* CS: A = EC
|
* CS: A = EC
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -239,7 +239,7 @@ SKT.connect.99 rts
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `lda fd`
|
* `lda fd`
|
||||||
* `>LIBCALL hLIBTCPIP,LIBTCPIP.listen`
|
* `>LIBCALL hLIBTCPIP,LIBTCPIP.listen`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CS: A = EC
|
* CS: A = EC
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
SKT.listen >SYSCALL GetMemPtr
|
SKT.listen >SYSCALL GetMemPtr
|
||||||
@ -276,7 +276,7 @@ SKT.listen >SYSCALL GetMemPtr
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `lda fd`
|
* `lda fd`
|
||||||
* `>LIBCALL hLIBTCPIP,LIBTCPIP.accept`
|
* `>LIBCALL hLIBTCPIP,LIBTCPIP.accept`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* A = hSocket
|
* A = hSocket
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
SKT.Accept >SYSCALL GetMemPtr
|
SKT.Accept >SYSCALL GetMemPtr
|
||||||
@ -322,7 +322,7 @@ SKT.Accept >SYSCALL GetMemPtr
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `lda fd`
|
* `lda fd`
|
||||||
* `>LIBCALL hLIBTCPIP,LIBTCPIP.shutdown`
|
* `>LIBCALL hLIBTCPIP,LIBTCPIP.shutdown`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
SKT.shutdown >SYSCALL GetMemPtr
|
SKT.shutdown >SYSCALL GetMemPtr
|
||||||
>STYA ZPPtrSKT
|
>STYA ZPPtrSKT
|
||||||
@ -400,7 +400,7 @@ SKT.shutdown >SYSCALL GetMemPtr
|
|||||||
* `>PUSHW buf`
|
* `>PUSHW buf`
|
||||||
* `lda fd`
|
* `lda fd`
|
||||||
* `>LIBCALL hLIBTCPIP,LIBTCPIP.skt.read`
|
* `>LIBCALL hLIBTCPIP,LIBTCPIP.skt.read`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC: Y,A = bytes read
|
* CC: Y,A = bytes read
|
||||||
* CS: A = EC
|
* CS: A = EC
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -451,7 +451,7 @@ SKT.Read >SYSCALL GetMemPtr
|
|||||||
* `>PUSHW buf`
|
* `>PUSHW buf`
|
||||||
* `lda fd`
|
* `lda fd`
|
||||||
* `>LIBCALL hLIBTCPIP,LIBTCPIP.skt.write`
|
* `>LIBCALL hLIBTCPIP,LIBTCPIP.skt.write`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC: Y,A = bytes written
|
* CC: Y,A = bytes written
|
||||||
* CS: A = EC
|
* CS: A = EC
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -505,7 +505,7 @@ SKT.Write >SYSCALL GetMemPtr
|
|||||||
* `>PUSHW addr` (RecvFrom)
|
* `>PUSHW addr` (RecvFrom)
|
||||||
* `lda fd`
|
* `lda fd`
|
||||||
* `>LIBCALL hLIBTCPIP,LIBTCPIP.skt.Recv`
|
* `>LIBCALL hLIBTCPIP,LIBTCPIP.skt.Recv`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC: A = hMem
|
* CC: A = hMem
|
||||||
* CS: A = EC
|
* CS: A = EC
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -613,7 +613,7 @@ SKT.Recv clc
|
|||||||
* `>PUSHW buf`
|
* `>PUSHW buf`
|
||||||
* `lda fd`
|
* `lda fd`
|
||||||
* `>LIBCALL hLIBTCPIP,LIBTCPIP.skt.send`
|
* `>LIBCALL hLIBTCPIP,LIBTCPIP.skt.send`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC: Y,A = bytes written
|
* CC: Y,A = bytes written
|
||||||
* CS: A = EC
|
* CS: A = EC
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -676,7 +676,7 @@ SKT.Send.SEQPACKET
|
|||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
* **In:**
|
||||||
* `>LIBCALL hLIBTCPIP,LIBTCPIP.skt.GetTable`
|
* `>LIBCALL hLIBTCPIP,LIBTCPIP.skt.GetTable`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
SKT.GetTable >LDYA L.SKT.Table
|
SKT.GetTable >LDYA L.SKT.Table
|
||||||
clc
|
clc
|
||||||
|
@ -467,14 +467,15 @@ Cmd.Exec.TIME clc
|
|||||||
>LEA.G CMD.Time
|
>LEA.G CMD.Time
|
||||||
>SYSCALL Time
|
>SYSCALL Time
|
||||||
|
|
||||||
>PUSHW ZPCMDBuf
|
>PUSHEA.G CMD.Time
|
||||||
|
|
||||||
plp
|
plp
|
||||||
bcc .1
|
bcc .1
|
||||||
>PUSHW L.FMT.DATE
|
>PUSHW L.FMT.DATE
|
||||||
bra .2
|
bra .2
|
||||||
.1 >PUSHW L.FMT.TIME
|
.1 >PUSHW L.FMT.TIME
|
||||||
|
|
||||||
.2 >PUSHEA.G CMD.Time
|
.2 >LDYA ZPCMDBuf
|
||||||
>SYSCALL StrFTime
|
>SYSCALL StrFTime
|
||||||
|
|
||||||
>LDYA ZPCMDBuf
|
>LDYA ZPCMDBuf
|
||||||
|
@ -6,7 +6,7 @@ AUTO 4,1
|
|||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
* **In:**
|
||||||
* A = argument index.
|
* A = argument index.
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : success
|
* CC : success
|
||||||
* Y,A = PTR To Arg[A]
|
* Y,A = PTR To Arg[A]
|
||||||
* CS : Out Of Bound
|
* CS : Out Of Bound
|
||||||
|
@ -69,7 +69,7 @@ K.UnloadLib pha
|
|||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
* **In:**
|
||||||
* Y,A = PTR to "NAME.DRV [PARAM]" C-String
|
* Y,A = PTR to "NAME.DRV [PARAM]" C-String
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* none
|
* none
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.LoadDrv >STYA .2+1 Save "BIN\0ARGS\0\0"
|
K.LoadDrv >STYA .2+1 Save "BIN\0ARGS\0\0"
|
||||||
@ -295,7 +295,7 @@ BIN.hMem .BS 1
|
|||||||
* `>PUSHW DRV.CS.START`
|
* `>PUSHW DRV.CS.START`
|
||||||
* `>LDYA L.SRC`
|
* `>LDYA L.SRC`
|
||||||
* `SYSCALL insdrv`
|
* `SYSCALL insdrv`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = Ptr to installed driver
|
* Y,A = Ptr to installed driver
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.InsDrv >STYA ZPPtr1
|
K.InsDrv >STYA ZPPtr1
|
||||||
|
@ -3,9 +3,8 @@ PREFIX /A2OSX.BUILD
|
|||||||
AUTO 4,1
|
AUTO 4,1
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # GetDevByID
|
* # GetDevByID
|
||||||
* **In:**
|
|
||||||
* A = DevID
|
* A = DevID
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC = OK, CS = ERROR
|
* CC = OK, CS = ERROR
|
||||||
* Y,A = FD
|
* Y,A = FD
|
||||||
* X = hFD
|
* X = hFD
|
||||||
@ -15,19 +14,15 @@ K.GetDevByID cmp DevMgr.DevCnt
|
|||||||
tax
|
tax
|
||||||
|
|
||||||
lda Dev.Table.hFD,x
|
lda Dev.Table.hFD,x
|
||||||
|
beq K.GetDev.NODEV
|
||||||
pha
|
pha
|
||||||
ldy Dev.Table.pFDLO,x
|
jsr K.GetMemPtr
|
||||||
lda Dev.Table.pFDHI,x
|
|
||||||
plx
|
plx
|
||||||
|
rts
|
||||||
* clc
|
|
||||||
|
|
||||||
.9 rts CC
|
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # GetDevByName
|
* # GetDevByName
|
||||||
* **In:**
|
|
||||||
* Y,A = Ptr to device name (C-String)
|
* Y,A = Ptr to device name (C-String)
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC = OK, CS = ERROR
|
* CC = OK, CS = ERROR
|
||||||
* Y,A = FD
|
* Y,A = FD
|
||||||
* X = DevID
|
* X = DevID
|
||||||
@ -36,8 +31,9 @@ K.GetDevByName >STYA ZPPtr1
|
|||||||
|
|
||||||
ldx #0
|
ldx #0
|
||||||
|
|
||||||
.1 ldy Dev.Table.pFDLO,x
|
.1 lda Dev.Table.hFD,x
|
||||||
lda Dev.Table.pFDHI,x
|
beq K.GetDev.NODEV
|
||||||
|
jsr K.GetMemPtr
|
||||||
|
|
||||||
>STYA ZPPtr2
|
>STYA ZPPtr2
|
||||||
|
|
||||||
@ -47,7 +43,7 @@ K.GetDevByName >STYA ZPPtr1
|
|||||||
sta ZPPtr3
|
sta ZPPtr3
|
||||||
|
|
||||||
lda ZPPtr2+1
|
lda ZPPtr2+1
|
||||||
adc #0
|
adc /S.FD.DEV.NAME
|
||||||
sta ZPPtr3+1
|
sta ZPPtr3+1
|
||||||
|
|
||||||
ldy #$ff
|
ldy #$ff
|
||||||
@ -77,11 +73,10 @@ K.GetDev.9 rts
|
|||||||
* ## C
|
* ## C
|
||||||
* `int getdevstatus(short int hFD, S.DIB* dstat);`
|
* `int getdevstatus(short int hFD, S.DIB* dstat);`
|
||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
|
||||||
* `>PUSHWI S.DIB`
|
* `>PUSHWI S.DIB`
|
||||||
* `lda DevID`
|
* `lda DevID`
|
||||||
* `>SYSCALL GetDevStatus`
|
* `>SYSCALL GetDevStatus`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.GetDevStatus jsr K.GetMemPtr
|
K.GetDevStatus jsr K.GetMemPtr
|
||||||
>STYA pFD
|
>STYA pFD
|
||||||
@ -104,10 +99,9 @@ K.GetDevStatus.I
|
|||||||
* ## C
|
* ## C
|
||||||
* `hDEV mkdev (S.FD * fd)`
|
* `hDEV mkdev (S.FD * fd)`
|
||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
|
||||||
* `>LDYA FD.DEV`
|
* `>LDYA FD.DEV`
|
||||||
* `>SYSCALL mkdev
|
* `>SYSCALL mkdev
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* A = hDEV
|
* A = hDEV
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.MKDev >STYA .1+1
|
K.MKDev >STYA .1+1
|
||||||
@ -121,13 +115,9 @@ K.MKDev >STYA .1+1
|
|||||||
jsr MEM.GetMem.YAX
|
jsr MEM.GetMem.YAX
|
||||||
bcs .99
|
bcs .99
|
||||||
>STYA pFD
|
>STYA pFD
|
||||||
phx
|
txa
|
||||||
|
|
||||||
ldx DevMgr.DevCnt
|
ldx DevMgr.DevCnt
|
||||||
sta Dev.Table.pFDHI,x
|
|
||||||
tya
|
|
||||||
sta Dev.Table.pFDLO,x
|
|
||||||
pla
|
|
||||||
sta Dev.Table.hFD,x
|
sta Dev.Table.hFD,x
|
||||||
|
|
||||||
ldy #S.FD.DEV-1
|
ldy #S.FD.DEV-1
|
||||||
@ -145,17 +135,33 @@ K.MKDev >STYA .1+1
|
|||||||
jsr K.GetDevStatus.I
|
jsr K.GetDevStatus.I
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
lda K.IOBuf
|
lda K.IOBuf Get Status byte
|
||||||
ldx DevMgr.DevCnt
|
bit #S.DIB.S.IRQ
|
||||||
sta Dev.Table.F,x
|
beq .8
|
||||||
|
|
||||||
txa
|
ldx #0
|
||||||
inc DevMgr.DevCnt
|
|
||||||
rts
|
.2 lda IRQ.Vectors+1,x
|
||||||
|
beq .3
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
cpx #K.IRQDEV.MAX*2
|
||||||
|
bne .2
|
||||||
|
|
||||||
.9 lda #K.E.OOH
|
.9 lda #K.E.OOH
|
||||||
* sec
|
* sec
|
||||||
.99 rts
|
.99 rts
|
||||||
|
|
||||||
|
.3 lda pFD
|
||||||
|
sta IRQ.Vectors,x
|
||||||
|
lda pFD+1
|
||||||
|
sta IRQ.Vectors+1,x
|
||||||
|
|
||||||
|
.8 lda DevMgr.DevCnt
|
||||||
|
inc DevMgr.DevCnt
|
||||||
|
clc
|
||||||
|
rts
|
||||||
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
SAVE /A2OSX.SRC/SYS/KERNEL.S.DEV
|
SAVE /A2OSX.SRC/SYS/KERNEL.S.DEV
|
||||||
|
@ -6,10 +6,9 @@ AUTO 4,1
|
|||||||
* ## C
|
* ## C
|
||||||
* `int hDIR opendir (const char * dirpath);`
|
* `int hDIR opendir (const char * dirpath);`
|
||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
|
||||||
* `>LDYA dirpath`
|
* `>LDYA dirpath`
|
||||||
* `>SYSCALL opendir`
|
* `>SYSCALL opendir`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : success
|
* CC : success
|
||||||
* A = hDIR
|
* A = hDIR
|
||||||
* CS : error
|
* CS : error
|
||||||
@ -68,11 +67,10 @@ K.OpenDir jsr PFT.CheckPathYA
|
|||||||
* ## C
|
* ## C
|
||||||
* `int readdir (int hDIR, S.DIRENT * dirent);`
|
* `int readdir (int hDIR, S.DIRENT * dirent);`
|
||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
|
||||||
* `>PUSHW dirent`
|
* `>PUSHW dirent`
|
||||||
* `lda hDIR`
|
* `lda hDIR`
|
||||||
* `>SYSCALL readdir`
|
* `>SYSCALL readdir`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : success
|
* CC : success
|
||||||
* X = hDIRENT
|
* X = hDIRENT
|
||||||
* Y,A = PTR to S.DIRENT
|
* Y,A = PTR to S.DIRENT
|
||||||
@ -605,10 +603,9 @@ K.ReadDir.ConvertTime
|
|||||||
* ## C
|
* ## C
|
||||||
* `void closedir(hDIR);`
|
* `void closedir(hDIR);`
|
||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
|
||||||
* `lda hDIR`
|
* `lda hDIR`
|
||||||
* `>SYSCALL closedir`
|
* `>SYSCALL closedir`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* none, always succeed.
|
* none, always succeed.
|
||||||
*\-------------------------------------
|
*\-------------------------------------
|
||||||
*K.CloseDir .EQ K.FClose
|
*K.CloseDir .EQ K.FClose
|
||||||
|
@ -5,7 +5,7 @@ AUTO 4,1
|
|||||||
* # ExpandStr
|
* # ExpandStr
|
||||||
* **In:**
|
* **In:**
|
||||||
* Y,A = PTR to String to Expand (C-String)
|
* Y,A = PTR to String to Expand (C-String)
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* X = hMem to Expanded String (C-String)
|
* X = hMem to Expanded String (C-String)
|
||||||
* Y,A = PTR to Expanded String
|
* Y,A = PTR to Expanded String
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -133,7 +133,7 @@ K.ExpandStr stz .88+1 Reset Intermediate string...
|
|||||||
* `>PUSHWI fullpath`
|
* `>PUSHWI fullpath`
|
||||||
* `>PUSHWI searchpath`
|
* `>PUSHWI searchpath`
|
||||||
* `>LDYAI filename`
|
* `>LDYAI filename`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : success
|
* CC : success
|
||||||
* DstBuf = FilePath
|
* DstBuf = FilePath
|
||||||
* DstStat = S.STAT
|
* DstStat = S.STAT
|
||||||
@ -232,7 +232,7 @@ K.FileSearch.SearchPath .BS 2
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `>LDYA string`
|
* `>LDYA string`
|
||||||
* `>SYSCALL putenv`
|
* `>SYSCALL putenv`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.PutEnv >STYA ZPPtr1 NAME=VALUE
|
K.PutEnv >STYA ZPPtr1 NAME=VALUE
|
||||||
|
|
||||||
@ -275,10 +275,9 @@ K.PutEnv >STYA ZPPtr1 NAME=VALUE
|
|||||||
* `>PUSHW value`
|
* `>PUSHW value`
|
||||||
* `>LDYA name`
|
* `>LDYA name`
|
||||||
* `>SYSCALL setenv`
|
* `>SYSCALL setenv`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.SetEnv >STYA ZPPtr1 name
|
K.SetEnv jsr MEM.SPtr1PPtr2
|
||||||
>PULLW ZPPtr2 value
|
|
||||||
|
|
||||||
K.SetEnv.I jsr K.UnsetEnv.I
|
K.SetEnv.I jsr K.UnsetEnv.I
|
||||||
|
|
||||||
@ -385,8 +384,8 @@ K.SetEnv.I jsr K.UnsetEnv.I
|
|||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
* **In:**
|
||||||
* `>LDYA name`
|
* `>LDYA name`
|
||||||
* `>SYSCALL gerenv`
|
* `>SYSCALL getenv`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : Y,A = PTR to VALUE (C-String)
|
* CC : Y,A = PTR to VALUE (C-String)
|
||||||
* CS : not found
|
* CS : not found
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -408,7 +407,7 @@ K.GetEnv >STYA ZPPtr1
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `>LDYA name`
|
* `>LDYA name`
|
||||||
* `>SYSCALL unsetenv`
|
* `>SYSCALL unsetenv`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.UnsetEnv >STYA ZPPtr1 Store VAR Name
|
K.UnsetEnv >STYA ZPPtr1 Store VAR Name
|
||||||
K.UnsetEnv.I jsr ENV.FindVarP1
|
K.UnsetEnv.I jsr ENV.FindVarP1
|
||||||
|
@ -6,7 +6,7 @@ AUTO 4,1
|
|||||||
* Load TXT a file in memory (with ending 0)
|
* Load TXT a file in memory (with ending 0)
|
||||||
* **In:**
|
* **In:**
|
||||||
* Y,A = File Path
|
* Y,A = File Path
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = File Length (without ending 0)
|
* Y,A = File Length (without ending 0)
|
||||||
* X = hMem of Loaded File
|
* X = hMem of Loaded File
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -25,7 +25,7 @@ K.LoadTxtFile pha
|
|||||||
* PUSHB = TYPE ...
|
* PUSHB = TYPE ...
|
||||||
* PUSHB = MODE ...
|
* PUSHB = MODE ...
|
||||||
* LDYA = PATH ...FOpen)
|
* LDYA = PATH ...FOpen)
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = File Length
|
* Y,A = File Length
|
||||||
* X = hMem of Loaded File
|
* X = hMem of Loaded File
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -121,7 +121,7 @@ FIO.Mem .BS 2
|
|||||||
* `>PUSHBI filetype`
|
* `>PUSHBI filetype`
|
||||||
* `>LDYA filepath`
|
* `>LDYA filepath`
|
||||||
* `>SYSCALL chtyp`
|
* `>SYSCALL chtyp`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.ChTyp jsr PFT.CheckPathYA
|
K.ChTyp jsr PFT.CheckPathYA
|
||||||
jsr STDIO.SetMLIPathYA
|
jsr STDIO.SetMLIPathYA
|
||||||
|
@ -10,7 +10,7 @@ AUTO 4,1
|
|||||||
* `>PUSHB flags`
|
* `>PUSHB flags`
|
||||||
* `>LDYA pathname`
|
* `>LDYA pathname`
|
||||||
* `>SYSCALL open`
|
* `>SYSCALL open`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* A = hFD
|
* A = hFD
|
||||||
* REG File created on ProDOS : T=TXT,X=$0000
|
* REG File created on ProDOS : T=TXT,X=$0000
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -238,7 +238,7 @@ IO.CLOSE.PIPE clc
|
|||||||
* `>PUSHW buf`
|
* `>PUSHW buf`
|
||||||
* `lda fd`
|
* `lda fd`
|
||||||
* `>SYSCALL read`
|
* `>SYSCALL read`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC: Y,A = bytes read
|
* CC: Y,A = bytes read
|
||||||
* CS: A = EC
|
* CS: A = EC
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -267,7 +267,7 @@ IO.Read.I lda (pFD) #S.FD.T
|
|||||||
* `>PUSHW buf`
|
* `>PUSHW buf`
|
||||||
* `lda fd`
|
* `lda fd`
|
||||||
* `>SYSCALL write`
|
* `>SYSCALL write`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC: Y,A = bytes written
|
* CC: Y,A = bytes written
|
||||||
* CS: A = EC
|
* CS: A = EC
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -402,12 +402,11 @@ IO.WRITE.PIPE >PULLW K.S.IOCTL+S.IOCTL.BUFPTR
|
|||||||
* ## C
|
* ## C
|
||||||
* `int ioctl(short int hFD, int request, void * param );`
|
* `int ioctl(short int hFD, int request, void * param );`
|
||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
|
||||||
* `PUSHWI param`
|
* `PUSHWI param`
|
||||||
* `PUSHBI request`
|
* `PUSHBI request`
|
||||||
* `lda hFD`
|
* `lda hFD`
|
||||||
* `>SYSCALL IOCTL`
|
* `>SYSCALL IOCTL`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = ...
|
* Y,A = ...
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.IOCTL jsr K.GetMemPtr
|
K.IOCTL jsr K.GetMemPtr
|
||||||
@ -440,7 +439,6 @@ K.IOCTL.pDrvJmp jmp (pDrv)
|
|||||||
* ## C
|
* ## C
|
||||||
* `int pipe(int pipefd[2]);`
|
* `int pipe(int pipefd[2]);`
|
||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.Pipe
|
K.Pipe
|
||||||
.9 sec
|
.9 sec
|
||||||
|
@ -190,14 +190,12 @@ K.IrqH.Switch inc IRQ.Tick
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
K.IrqH.DEV ldx #0
|
K.IrqH.DEV ldx #0
|
||||||
|
|
||||||
.1 lda Dev.Table.F,x
|
.1 lda IRQ.Vectors+1,x
|
||||||
and #S.DIB.S.IRQ
|
beq .9
|
||||||
beq .2
|
|
||||||
|
|
||||||
lda Dev.Table.pFDLO,x
|
|
||||||
sta $fe
|
|
||||||
lda Dev.Table.pFDHI,x
|
|
||||||
sta $ff
|
sta $ff
|
||||||
|
lda IRQ.Vectors,x
|
||||||
|
sta $fe
|
||||||
|
|
||||||
ldy #S.FD.DEV.DRVPTR
|
ldy #S.FD.DEV.DRVPTR
|
||||||
lda ($fe),y
|
lda ($fe),y
|
||||||
@ -215,15 +213,18 @@ K.IrqH.DEV ldx #0
|
|||||||
bcc .8 CC, IRQ cleared by device
|
bcc .8 CC, IRQ cleared by device
|
||||||
|
|
||||||
.2 inx
|
.2 inx
|
||||||
|
inx
|
||||||
|
|
||||||
.3 cpx DevMgr.DevCnt
|
.3 cpx #K.IRQDEV.MAX*2
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
sec
|
.9 sec
|
||||||
|
|
||||||
.8 clv clear V (no task switching)
|
.8 clv clear V (no task switching)
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
IRQ.Vectors .BS K.IRQDEV.MAX*2
|
||||||
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
SAVE /A2OSX.SRC/SYS/KERNEL.S.IRQ
|
SAVE /A2OSX.SRC/SYS/KERNEL.S.IRQ
|
||||||
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
||||||
|
@ -13,7 +13,7 @@ AUTO 4,1
|
|||||||
* `>SYSCALL fmult`
|
* `>SYSCALL fmult`
|
||||||
* `>SYSCALL fdiv`
|
* `>SYSCALL fdiv`
|
||||||
* `>SYSCALL fpwr`
|
* `>SYSCALL fpwr`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* On stack (float)
|
* On stack (float)
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.FAdd ldx #ROM.FADD
|
K.FAdd ldx #ROM.FADD
|
||||||
@ -47,7 +47,7 @@ K.FPwr ldx #ROM.PWR
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `>PUSHF x (Float)`
|
* `>PUSHF x (Float)`
|
||||||
* `>SYSCALL log`
|
* `>SYSCALL log`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* On stack (Float)
|
* On stack (Float)
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.Log ldx #ROM.LOG
|
K.Log ldx #ROM.LOG
|
||||||
@ -77,7 +77,7 @@ K.ATan ldx #ROM.ATAN
|
|||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
* **In:**
|
||||||
* `>PUSHL X` (long)
|
* `>PUSHL X` (long)
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* On stack (float)
|
* On stack (float)
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.Float ldx #4
|
K.Float ldx #4
|
||||||
@ -116,7 +116,7 @@ MATH.Go jsr GP.ROMCALL
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `>PUSHF x`
|
* `>PUSHF x`
|
||||||
* `>SYSCALL lrintf`
|
* `>SYSCALL lrintf`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* On stack (long)
|
* On stack (long)
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.lrintf jsr MATH.PullFAC
|
K.lrintf jsr MATH.PullFAC
|
||||||
|
@ -12,9 +12,8 @@ ZPSListKeyPtr .EQ ZPMEMMGR+12
|
|||||||
ZPSListDataPtr .EQ ZPMEMMGR+14
|
ZPSListDataPtr .EQ ZPMEMMGR+14
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # GetMem0
|
* # GetMem0
|
||||||
* **In:**
|
|
||||||
* Y,A = Size Requested
|
* Y,A = Size Requested
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : success
|
* CC : success
|
||||||
* YA = PTR to Mem (ZERO Initialised)
|
* YA = PTR to Mem (ZERO Initialised)
|
||||||
* X = hMem
|
* X = hMem
|
||||||
@ -25,9 +24,8 @@ K.GetMem0 ldx #S.MEM.F.INIT0
|
|||||||
.HS 2C bit abs
|
.HS 2C bit abs
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # GetMem
|
* # GetMem
|
||||||
* **In:**
|
|
||||||
* Y,A = Size Requested
|
* Y,A = Size Requested
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : success
|
* CC : success
|
||||||
* YA = PTR to Mem (Uninitialised)
|
* YA = PTR to Mem (Uninitialised)
|
||||||
* X = hMem
|
* X = hMem
|
||||||
@ -233,9 +231,8 @@ Mem.NextSlot lda ZPMemMgrSPtr
|
|||||||
.8 rts
|
.8 rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # FreeMem
|
* # FreeMem
|
||||||
* **In:**
|
|
||||||
* A = hMem To Free
|
* A = hMem To Free
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* none.
|
* none.
|
||||||
* (X unmodified)
|
* (X unmodified)
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -331,9 +328,8 @@ K.FreeMem tay
|
|||||||
K.FreeMem.ERR .AZ "FreeMem:%H:hMem already freed."
|
K.FreeMem.ERR .AZ "FreeMem:%H:hMem already freed."
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # GetMemPtr
|
* # GetMemPtr
|
||||||
* **In:**
|
|
||||||
* A = hMem
|
* A = hMem
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = PTR to MemBlock
|
* Y,A = PTR to MemBlock
|
||||||
* (X unmodified)
|
* (X unmodified)
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -369,9 +365,8 @@ K.GetMemPtr sta ZPMemMgrSPtr
|
|||||||
rts
|
rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # GetMemByID
|
* # GetMemByID
|
||||||
* **In:**
|
|
||||||
* A = hMem
|
* A = hMem
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = ZPMemMgrSPtr = PTR to S.MEM
|
* Y,A = ZPMemMgrSPtr = PTR to S.MEM
|
||||||
* (X unmodified)
|
* (X unmodified)
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -389,9 +384,8 @@ K.GetMemByID sta ZPMemMgrSPtr
|
|||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # NewStr
|
* # NewStr
|
||||||
* Create a new copy of this C-String
|
* Create a new copy of this C-String
|
||||||
* **In:**
|
|
||||||
* Y,A = Ptr to source C-String
|
* Y,A = Ptr to source C-String
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : success
|
* CC : success
|
||||||
* Y,A = PTR to String
|
* Y,A = PTR to String
|
||||||
* X = hMem (PSTR)
|
* X = hMem (PSTR)
|
||||||
@ -441,22 +435,20 @@ K.NewStr >STYA .1+1
|
|||||||
.9 rts
|
.9 rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # SListGetByID
|
* # SListGetByID
|
||||||
* **In:**
|
|
||||||
* PUSHB = hSList
|
* PUSHB = hSList
|
||||||
* PUSHW = KeyID
|
* PUSHW = KeyID
|
||||||
* PUSHW = Data Ptr
|
* PUSHW = Data Ptr
|
||||||
* PUSHW = Key Ptr
|
* PUSHW = Key Ptr
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* X,Y = Next KeyID
|
* X,Y = Next KeyID
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.SListGetByID >PULLW ZPSListKeyPtr
|
K.SListGetByID >PULLW ZPSListKeyPtr
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # SListUpdateByID
|
* # SListUpdateByID
|
||||||
* **In:**
|
|
||||||
* PUSHB = hSList
|
* PUSHB = hSList
|
||||||
* PUSHW = KeyID
|
* PUSHW = KeyID
|
||||||
* PUSHW = Data Ptr
|
* PUSHW = Data Ptr
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* A = Key Length
|
* A = Key Length
|
||||||
* X,Y = KeyID
|
* X,Y = KeyID
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -466,22 +458,20 @@ K.SListUpdateByID
|
|||||||
bra K.SListPullH
|
bra K.SListPullH
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # SListAdd
|
* # SListAdd
|
||||||
* **In:**
|
|
||||||
* PUSHB = hSList
|
* PUSHB = hSList
|
||||||
* PUSHW = Key Ptr
|
* PUSHW = Key Ptr
|
||||||
* PUSHW = Data Ptr
|
* PUSHW = Data Ptr
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* A = Key Length
|
* A = Key Length
|
||||||
* X,Y = KeyID
|
* X,Y = KeyID
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.SListAdd
|
K.SListAdd
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # SListLookup
|
* # SListLookup
|
||||||
* **In:**
|
|
||||||
* PUSHB = hSList
|
* PUSHB = hSList
|
||||||
* PUSHW = Key Ptr
|
* PUSHW = Key Ptr
|
||||||
* PUSHW = Data Ptr
|
* PUSHW = Data Ptr
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* A = Key Length
|
* A = Key Length
|
||||||
* X,Y = KeyID
|
* X,Y = KeyID
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -492,16 +482,14 @@ K.SListLookup
|
|||||||
K.SListPullH >PULLA
|
K.SListPullH >PULLA
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # SListNew
|
* # SListNew
|
||||||
* **In:**
|
* ## RETURN VALUE
|
||||||
* **Out:**
|
|
||||||
* A=hSList
|
* A=hSList
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.SListNew
|
K.SListNew
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # SListFree
|
* # SListFree
|
||||||
* **In:**
|
|
||||||
* A=hSList
|
* A=hSList
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.SListFree
|
K.SListFree
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
@ -513,10 +501,9 @@ K.SListFree
|
|||||||
rts
|
rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # GetStkObjProp
|
* # GetStkObjProp
|
||||||
* **In:**
|
|
||||||
* A = hObject (AUX Memory)
|
* A = hObject (AUX Memory)
|
||||||
* Y = Property Index
|
* Y = Property Index
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = Property Value
|
* Y,A = Property Value
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.GetStkObjProp phy
|
K.GetStkObjProp phy
|
||||||
@ -534,9 +521,8 @@ K.GetStkObjProp phy
|
|||||||
rts
|
rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # NewStkObj
|
* # NewStkObj
|
||||||
* **In:**
|
|
||||||
* Y,A = Size Requested
|
* Y,A = Size Requested
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : success
|
* CC : success
|
||||||
* YA = PTR to Mem (Uninitialised)
|
* YA = PTR to Mem (Uninitialised)
|
||||||
* X = hMem
|
* X = hMem
|
||||||
@ -547,9 +533,8 @@ K.NewStkObj ldx #SYS.GetMem
|
|||||||
.HS 2C BIT ABS
|
.HS 2C BIT ABS
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # FreeStkObj
|
* # FreeStkObj
|
||||||
* **In:**
|
|
||||||
* A = hMem To Free (AUX Memory)
|
* A = hMem To Free (AUX Memory)
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* none.
|
* none.
|
||||||
* (X,Y unmodified)
|
* (X,Y unmodified)
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -568,12 +553,11 @@ MEM.GoStkObj sta SETREADAUX
|
|||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # LoadStkObj
|
* # LoadStkObj
|
||||||
* Load a file in AUX memory (Stock Objects)
|
* Load a file in AUX memory (Stock Objects)
|
||||||
* **In:**
|
|
||||||
* PUSHW = AUXTYPE (Handled by....
|
* PUSHW = AUXTYPE (Handled by....
|
||||||
* PUSHB = TYPE ...
|
* PUSHB = TYPE ...
|
||||||
* PUSHB = MODE ...
|
* PUSHB = MODE ...
|
||||||
* PUSHW = PATH ...FOpen)
|
* PUSHW = PATH ...FOpen)
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = File Length
|
* Y,A = File Length
|
||||||
* X = hMem of Loaded Object in AUX mem
|
* X = hMem of Loaded Object in AUX mem
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -701,15 +685,6 @@ MEM.TXTPTR.GetNext
|
|||||||
inc TXTPTR+1
|
inc TXTPTR+1
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MEM.PullP1P2P3 sec
|
|
||||||
.HS 90 bcc
|
|
||||||
MEM.PullP1P2 clc
|
|
||||||
>PULLW ZPPtr1
|
|
||||||
>PULLW ZPPtr2
|
|
||||||
bcc .9
|
|
||||||
>PULLW ZPPtr3
|
|
||||||
.9 rts
|
|
||||||
*--------------------------------------
|
|
||||||
MEM.SPtr1PPtr2 >STYA ZPPtr1
|
MEM.SPtr1PPtr2 >STYA ZPPtr1
|
||||||
>PULLW ZPPtr2
|
>PULLW ZPPtr2
|
||||||
rts
|
rts
|
||||||
|
@ -8,7 +8,7 @@ AUTO 4,1
|
|||||||
* # CreatePS (Non Blocking)
|
* # CreatePS (Non Blocking)
|
||||||
* **In:**
|
* **In:**
|
||||||
* Y,A = PTR To Cmd Line
|
* Y,A = PTR To Cmd Line
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* A = Child PSID
|
* A = Child PSID
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.ExecPSNewEnv ldx #S.PS.F.DUPENV+S.PS.F.HOLD
|
K.ExecPSNewEnv ldx #S.PS.F.DUPENV+S.PS.F.HOLD
|
||||||
@ -46,13 +46,26 @@ K.CreatePS ldx #0
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
PS.Flags .BS 1
|
PS.Flags .BS 1
|
||||||
PS.CL .BS 2
|
PS.CL .BS 2
|
||||||
|
*/--------------------------------------
|
||||||
|
* # Exec
|
||||||
|
* ## C
|
||||||
|
* `int exec(const char *path, char *const argv[], short int flage);`
|
||||||
|
* ## ASM
|
||||||
|
* `>PUSHB flags`
|
||||||
|
* `>PUSHW argv`
|
||||||
|
* `>LDYAI path`
|
||||||
|
* `>SYSCALL exec`
|
||||||
|
* ## RETURN VALUE
|
||||||
|
* A = Child PSID
|
||||||
|
*\--------------------------------------
|
||||||
|
Exec
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* PS.CreateChild
|
* PS.CreateChild
|
||||||
* in :
|
* in :
|
||||||
* out :
|
* out :
|
||||||
* A = PSID
|
* A = PSID
|
||||||
* we cannot use ZPPtrs1 & 2
|
* we cannot use ZPPtrs1 & 2
|
||||||
* because of calling K.NewStr.YA & S.DupEnv.A
|
* because of calling K.NewStr.YA & PS.Dup
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
PS.CreateChild ldx #0
|
PS.CreateChild ldx #0
|
||||||
|
|
||||||
@ -180,7 +193,7 @@ PS.CmdLine2Args >STYA ZPPtr1
|
|||||||
iny
|
iny
|
||||||
bne .1 max 255
|
bne .1 max 255
|
||||||
|
|
||||||
.2 tya +2 for ending 0 for last string, and endig 0 for array
|
.2 tya +2 for ending 0 for last string, and ending 0 for array
|
||||||
clc
|
clc
|
||||||
adc #2
|
adc #2
|
||||||
tay
|
tay
|
||||||
@ -349,6 +362,14 @@ PS.Load jsr BIN.Load Y,A=filename full path
|
|||||||
* Out:
|
* Out:
|
||||||
* A = hMem to new ENV
|
* A = hMem to new ENV
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
PS.DupArgs
|
||||||
|
*--------------------------------------
|
||||||
|
* PS.DupEnv
|
||||||
|
* In:
|
||||||
|
* A = ENV hMem To Duplicate
|
||||||
|
* Out:
|
||||||
|
* A = hMem to new ENV
|
||||||
|
*--------------------------------------
|
||||||
PS.DupEnv jsr K.GetMemPtr
|
PS.DupEnv jsr K.GetMemPtr
|
||||||
>STYA ZPPtr1
|
>STYA ZPPtr1
|
||||||
|
|
||||||
@ -394,7 +415,7 @@ PS.SetMemOwner lda CORE.LastPSID
|
|||||||
* # GetMemStat
|
* # GetMemStat
|
||||||
* **In:**
|
* **In:**
|
||||||
* Y,A = Ptr to 24 bytes buffer
|
* Y,A = Ptr to 24 bytes buffer
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Buffer filled with memory stats
|
* Buffer filled with memory stats
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.GetMemStat >STYA ZPMemMgrTmp1
|
K.GetMemStat >STYA ZPMemMgrTmp1
|
||||||
@ -429,7 +450,7 @@ K.GetMemStat >STYA ZPMemMgrTmp1
|
|||||||
* # GetPSStatus
|
* # GetPSStatus
|
||||||
* **In:**
|
* **In:**
|
||||||
* A = PID
|
* A = PID
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* A = Status Byte
|
* A = Status Byte
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.GetPSStatus jsr CORE.GetPSByID
|
K.GetPSStatus jsr CORE.GetPSByID
|
||||||
@ -441,7 +462,7 @@ K.GetPSStatus jsr CORE.GetPSByID
|
|||||||
* # GetPSStat
|
* # GetPSStat
|
||||||
* **In:**
|
* **In:**
|
||||||
* Y,A = Ptr to 24 bytes buffer
|
* Y,A = Ptr to 24 bytes buffer
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Buffer filled with PS stats
|
* Buffer filled with PS stats
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.GetPSStat >STYA ZPPtr1
|
K.GetPSStat >STYA ZPPtr1
|
||||||
|
@ -11,7 +11,7 @@ AUTO 4,1
|
|||||||
* `>PUSHW statbuf`
|
* `>PUSHW statbuf`
|
||||||
* `lda hFILE`
|
* `lda hFILE`
|
||||||
* `>SYSCALL fstat`
|
* `>SYSCALL fstat`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
K.FStat jsr PFT.CheckNodeA
|
K.FStat jsr PFT.CheckNodeA
|
||||||
jsr STDIO.GetHFile
|
jsr STDIO.GetHFile
|
||||||
@ -32,7 +32,7 @@ K.FStat jsr PFT.CheckNodeA
|
|||||||
* `>PUSHW statbuf`
|
* `>PUSHW statbuf`
|
||||||
* `>LDYA pathname`
|
* `>LDYA pathname`
|
||||||
* `>SYSCALL stat`
|
* `>SYSCALL stat`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.Stat jsr PFT.CheckPathYA
|
K.Stat jsr PFT.CheckPathYA
|
||||||
K.Stat.I jsr STDIO.SetMLIPathYA
|
K.Stat.I jsr STDIO.SetMLIPathYA
|
||||||
@ -107,7 +107,7 @@ K.Stat.DST .DA #S.STAT.P.TYPE
|
|||||||
* `>PUSHW mode`
|
* `>PUSHW mode`
|
||||||
* `>LDYA pathname`
|
* `>LDYA pathname`
|
||||||
* `>SYSCALL mkdir`
|
* `>SYSCALL mkdir`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : success
|
* CC : success
|
||||||
* CS : error
|
* CS : error
|
||||||
* A = EC
|
* A = EC
|
||||||
@ -144,7 +144,7 @@ K.MKDir.RTS rts
|
|||||||
* `>PUSHW mode`
|
* `>PUSHW mode`
|
||||||
* `>LDYA pathname`
|
* `>LDYA pathname`
|
||||||
* `>SYSCALL mknod`
|
* `>SYSCALL mknod`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC = OK, CS = ERROR
|
* CC = OK, CS = ERROR
|
||||||
* A = hFILE
|
* A = hFILE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -194,7 +194,7 @@ STAT.MKNOD.PIPE
|
|||||||
* `>PUSHW mode`
|
* `>PUSHW mode`
|
||||||
* `>LDYA pathname`
|
* `>LDYA pathname`
|
||||||
* `>SYSCALL mkfifo`
|
* `>SYSCALL mkfifo`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC = OK, CS = ERROR
|
* CC = OK, CS = ERROR
|
||||||
* A = hFILE
|
* A = hFILE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
|
@ -21,7 +21,7 @@ BCDBUF .EQ ARG
|
|||||||
* `>PUSHB character`
|
* `>PUSHB character`
|
||||||
* `lda stream`
|
* `lda stream`
|
||||||
* `>SYSCALL fputc`
|
* `>SYSCALL fputc`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC = success
|
* CC = success
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.FPutC pha
|
K.FPutC pha
|
||||||
@ -37,7 +37,7 @@ K.FPutC pha
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `lda caracter`
|
* `lda caracter`
|
||||||
* `>SYSCALL putchar`
|
* `>SYSCALL putchar`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC = success
|
* CC = success
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.PutChar sta K.IOBuf
|
K.PutChar sta K.IOBuf
|
||||||
@ -63,7 +63,7 @@ K.PutChar.Y lda #0
|
|||||||
* ## ASM
|
* ## ASM
|
||||||
* `>LDYAI str`
|
* `>LDYAI str`
|
||||||
* `>SYSCALL puts`
|
* `>SYSCALL puts`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC = success
|
* CC = success
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.PutS >PUSHYA
|
K.PutS >PUSHYA
|
||||||
@ -92,7 +92,7 @@ K.PutS.RTS rts
|
|||||||
* `>PUSHW str`
|
* `>PUSHW str`
|
||||||
* `lda stream`
|
* `lda stream`
|
||||||
* `>SYSCALL fputs`
|
* `>SYSCALL fputs`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC = success
|
* CC = success
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.FPutS jsr STDIO.GetHFile
|
K.FPutS jsr STDIO.GetHFile
|
||||||
@ -133,7 +133,7 @@ K.FPutS jsr STDIO.GetHFile
|
|||||||
* `>PUSHWI format`
|
* `>PUSHWI format`
|
||||||
* `lda hFILE`
|
* `lda hFILE`
|
||||||
* `>SYSCALL fprintf`
|
* `>SYSCALL fprintf`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : success, Y,A = bytes sent
|
* CC : success, Y,A = bytes sent
|
||||||
* CS : error, A = code from Output
|
* CS : error, A = code from Output
|
||||||
* Specifiers :
|
* Specifiers :
|
||||||
@ -683,7 +683,7 @@ PrintF.Cnt .BS 2
|
|||||||
* `>PUSHW s`
|
* `>PUSHW s`
|
||||||
* `lda hFILE`
|
* `lda hFILE`
|
||||||
* `>SYSCALL fgets`
|
* `>SYSCALL fgets`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A: s
|
* Y,A: s
|
||||||
* CC = success
|
* CC = success
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -740,7 +740,7 @@ K.FGetS pha save hFILE
|
|||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
* **In:**
|
||||||
* `>SYSCALL getchar`
|
* `>SYSCALL getchar`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC = success
|
* CC = success
|
||||||
* A = char
|
* A = char
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -755,7 +755,7 @@ K.GetChar ldy #S.PS.hStdIn
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `lda stream`
|
* `lda stream`
|
||||||
* `>SYSCALL getc`
|
* `>SYSCALL getc`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC = success
|
* CC = success
|
||||||
* A = char
|
* A = char
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -792,7 +792,7 @@ K.GetC.9 rts
|
|||||||
* TODO : %10s
|
* TODO : %10s
|
||||||
* `>LDYA s`
|
* `>LDYA s`
|
||||||
* `>SYSCALL sscanf`
|
* `>SYSCALL sscanf`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* A = Number of arguments filled.
|
* A = Number of arguments filled.
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.SScanF >STYA ZPPtr2 String to Scan
|
K.SScanF >STYA ZPPtr2 String to Scan
|
||||||
@ -966,7 +966,7 @@ K.SScanF.Fwd tya Y=char count parsed
|
|||||||
* + ,t=123 or t=$ff or t=TXT
|
* + ,t=123 or t=$ff or t=TXT
|
||||||
* + ,x=12345 or x=$ffff
|
* + ,x=12345 or x=$ffff
|
||||||
* `>LDYAI filename`
|
* `>LDYAI filename`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : A = hFILE
|
* CC : A = hFILE
|
||||||
* CS : A = EC
|
* CS : A = EC
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -1007,7 +1007,7 @@ K.FOpen.RTS rts
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `lda stream`
|
* `lda stream`
|
||||||
* `>SYSCALL fclose`
|
* `>SYSCALL fclose`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.FClose jsr PFT.CheckNodeA
|
K.FClose jsr PFT.CheckNodeA
|
||||||
tax
|
tax
|
||||||
@ -1036,7 +1036,7 @@ K.FClose.RTS rts
|
|||||||
* `>PUSHW ptr`
|
* `>PUSHW ptr`
|
||||||
* `lda stream`
|
* `lda stream`
|
||||||
* `>SYSCALL fread`
|
* `>SYSCALL fread`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = Bytes Read
|
* Y,A = Bytes Read
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.FRead jsr PFT.CheckNodeA
|
K.FRead jsr PFT.CheckNodeA
|
||||||
@ -1055,7 +1055,7 @@ K.FRead jsr PFT.CheckNodeA
|
|||||||
* `>PUSHW ptr`
|
* `>PUSHW ptr`
|
||||||
* `lda stream`
|
* `lda stream`
|
||||||
* `>SYSCALL fwrite`
|
* `>SYSCALL fwrite`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = Bytes Written
|
* Y,A = Bytes Written
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.FWrite jsr PFT.CheckNodeA
|
K.FWrite jsr PFT.CheckNodeA
|
||||||
@ -1158,7 +1158,7 @@ K.FSeek jsr PFT.CheckNodeA
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `lda stream`
|
* `lda stream`
|
||||||
* `>SYSCALL feof`
|
* `>SYSCALL feof`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC :
|
* CC :
|
||||||
* A=0 EOF
|
* A=0 EOF
|
||||||
* A !=0 NOT EOF
|
* A !=0 NOT EOF
|
||||||
@ -1202,7 +1202,7 @@ K.FEOF.MARK .BS 3
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `lda stream`
|
* `lda stream`
|
||||||
* `>SYSCALL ftell`
|
* `>SYSCALL ftell`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* On stack (long)
|
* On stack (long)
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.FTell jsr PFT.CheckNodeA
|
K.FTell jsr PFT.CheckNodeA
|
||||||
@ -1230,7 +1230,7 @@ K.FTell jsr PFT.CheckNodeA
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `>LDYA pathname`
|
* `>LDYA pathname`
|
||||||
* `>SYSCALL remove`
|
* `>SYSCALL remove`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.Remove jsr PFT.CheckPathYA
|
K.Remove jsr PFT.CheckPathYA
|
||||||
jsr STDIO.SetMLIPathYA
|
jsr STDIO.SetMLIPathYA
|
||||||
@ -1246,7 +1246,7 @@ K.Remove jsr PFT.CheckPathYA
|
|||||||
* `>PUSHW newpath`
|
* `>PUSHW newpath`
|
||||||
* `>LDYA oldpath`
|
* `>LDYA oldpath`
|
||||||
* `>SYSCALL rename`
|
* `>SYSCALL rename`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.Rename jsr PFT.CheckPathYA
|
K.Rename jsr PFT.CheckPathYA
|
||||||
jsr STDIO.SetMLIPathYA
|
jsr STDIO.SetMLIPathYA
|
||||||
|
@ -11,7 +11,7 @@ AUTO 4,1
|
|||||||
* `>PUSHWI EndPtr`
|
* `>PUSHWI EndPtr`
|
||||||
* `>LDYA str`
|
* `>LDYA str`
|
||||||
* `>SYSCALL strtof`
|
* `>SYSCALL strtof`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* On stack (float)
|
* On stack (float)
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.strtof >STYA TXTPTR Ptr to source string
|
K.strtof >STYA TXTPTR Ptr to source string
|
||||||
@ -34,7 +34,7 @@ K.strtof >STYA TXTPTR Ptr to source string
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `>LDYA str`
|
* `>LDYA str`
|
||||||
* `>SYSCALL atof`
|
* `>SYSCALL atof`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* On stack (float)
|
* On stack (float)
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.AToF >STYA TXTPTR Ptr to source string
|
K.AToF >STYA TXTPTR Ptr to source string
|
||||||
@ -70,7 +70,7 @@ K.AToF.I jsr CHARGOT
|
|||||||
* `>PUSHWI EndPtr`
|
* `>PUSHWI EndPtr`
|
||||||
* `>LDYAI str`
|
* `>LDYAI str`
|
||||||
* `>SYSCALL strtol`
|
* `>SYSCALL strtol`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* On stack (long)
|
* On stack (long)
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.StrToL sec Signed
|
K.StrToL sec Signed
|
||||||
@ -101,7 +101,7 @@ K.StrToUL.rts rts
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `>LDYA str`
|
* `>LDYA str`
|
||||||
* `>SYSCALL atol`
|
* `>SYSCALL atol`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* On stack (long)
|
* On stack (long)
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
*STDLIB.32 .BS 4 32 bits max
|
*STDLIB.32 .BS 4 32 bits max
|
||||||
@ -136,7 +136,7 @@ K.AToL.I jsr STDLIB.GetDec
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `>LDYAI str`
|
* `>LDYAI str`
|
||||||
* `>SYSCALL atoi`
|
* `>SYSCALL atoi`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = int
|
* Y,A = int
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.atoi >STYA ZPPtr2
|
K.atoi >STYA ZPPtr2
|
||||||
@ -286,7 +286,7 @@ STDLIB.32.Clear ldx #3
|
|||||||
* **In:**
|
* **In:**
|
||||||
* `>LDYA str`
|
* `>LDYA str`
|
||||||
* `>SYSCALL realpath`
|
* `>SYSCALL realpath`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : success
|
* CC : success
|
||||||
* Y,A = Ptr to Full Path (C-String)
|
* Y,A = Ptr to Full Path (C-String)
|
||||||
* X = hMem of Full Path
|
* X = hMem of Full Path
|
||||||
|
@ -7,10 +7,9 @@ AUTO 4,1
|
|||||||
* ## C
|
* ## C
|
||||||
* `int strlen ( char * str);`
|
* `int strlen ( char * str);`
|
||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
|
||||||
* `>LDYAI str`
|
* `>LDYAI str`
|
||||||
* `>SYSCALL strlen`
|
* `>SYSCALL strlen`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = String length
|
* Y,A = String length
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.StrLen >STYA ZPPtr1
|
K.StrLen >STYA ZPPtr1
|
||||||
@ -38,7 +37,7 @@ K.StrLen >STYA ZPPtr1
|
|||||||
* `>PUSHWI source`
|
* `>PUSHWI source`
|
||||||
* `>LDYAI destination`
|
* `>LDYAI destination`
|
||||||
* `>SYSCALL strcat`
|
* `>SYSCALL strcat`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = destination
|
* Y,A = destination
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.StrCat sec
|
K.StrCat sec
|
||||||
@ -53,12 +52,11 @@ K.StrCat sec
|
|||||||
* `>PUSHWI source`
|
* `>PUSHWI source`
|
||||||
* `>LDYAI destination`
|
* `>LDYAI destination`
|
||||||
* `>SYSCALL strcpy`
|
* `>SYSCALL strcpy`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Y,A = destination
|
* Y,A = destination
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.StrCpy clc
|
K.StrCpy clc
|
||||||
>STYA ZPPtr1
|
jsr MEM.SPtr1PPtr2
|
||||||
>PULLW ZPPtr2
|
|
||||||
|
|
||||||
bcc .2
|
bcc .2
|
||||||
|
|
||||||
@ -92,12 +90,11 @@ K.StrCpy clc
|
|||||||
* `>PUSHWI pattern`
|
* `>PUSHWI pattern`
|
||||||
* `>LDYAI s`
|
* `>LDYAI s`
|
||||||
* `>SYSCALL strmatch`
|
* `>SYSCALL strmatch`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : match
|
* CC : match
|
||||||
* CS : no match
|
* CS : no match
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.StrMatch >STYA ZPPtr1 s
|
K.StrMatch jsr MEM.SPtr1PPtr2
|
||||||
>PULLW ZPPtr2 pattern
|
|
||||||
|
|
||||||
lda (ZPPtr2) Get pattern 1st byte
|
lda (ZPPtr2) Get pattern 1st byte
|
||||||
beq .8 Match always if empty
|
beq .8 Match always if empty
|
||||||
@ -172,7 +169,7 @@ K.StrMatch >STYA ZPPtr1 s
|
|||||||
* `>LDYAI str`
|
* `>LDYAI str`
|
||||||
* `>SYSCALL strupr`
|
* `>SYSCALL strupr`
|
||||||
* `>SYSCALL strlwr`
|
* `>SYSCALL strlwr`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* Uppercased/lowercased String in Buffer
|
* Uppercased/lowercased String in Buffer
|
||||||
* Y,A = str
|
* Y,A = str
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
@ -215,7 +212,7 @@ K.StrLwr ldx #2
|
|||||||
* `>PUSHWI s2`
|
* `>PUSHWI s2`
|
||||||
* `>LDYAI s1`
|
* `>LDYAI s1`
|
||||||
* `>SYSCALL strcmp`
|
* `>SYSCALL strcmp`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : match
|
* CC : match
|
||||||
* CS : no match
|
* CS : no match
|
||||||
* CC, Y,A=0
|
* CC, Y,A=0
|
||||||
@ -233,15 +230,14 @@ K.StrCmp sec
|
|||||||
* `>PUSHWI s2`
|
* `>PUSHWI s2`
|
||||||
* `>LDYAI s1`
|
* `>LDYAI s1`
|
||||||
* `>SYSCALL strcasecmp`
|
* `>SYSCALL strcasecmp`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* CC : match
|
* CC : match
|
||||||
* CS : no match
|
* CS : no match
|
||||||
* CC, Y,A=0
|
* CC, Y,A=0
|
||||||
* CS, Y,A > 0 or < 0
|
* CS, Y,A > 0 or < 0
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.StrCaseCmp clc
|
K.StrCaseCmp clc
|
||||||
>STYA ZPPtr1 s1
|
jsr MEM.SPtr1PPtr2
|
||||||
>PULLW ZPPtr2 s2
|
|
||||||
|
|
||||||
ldy #0
|
ldy #0
|
||||||
|
|
||||||
|
@ -14,9 +14,9 @@ DAY0 .EQ 4 day 0 was a thursday
|
|||||||
* ## C
|
* ## C
|
||||||
* `time_t time (S.TIME* timer);`
|
* `time_t time (S.TIME* timer);`
|
||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
* `>LDYA timer`
|
||||||
* Y,A = PTR to S.TIME
|
* `>SYSCALL time`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
* S.TIME filled with System date/time
|
* S.TIME filled with System date/time
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.Time >STYA ZPPtr2
|
K.Time >STYA ZPPtr2
|
||||||
@ -30,14 +30,12 @@ K.Time >STYA ZPPtr2
|
|||||||
* ## C
|
* ## C
|
||||||
* `int PTime2Time (long* ptime, S.TIME* timer);`
|
* `int PTime2Time (long* ptime, S.TIME* timer);`
|
||||||
* ## ASM
|
* ## ASM
|
||||||
* **In :**
|
|
||||||
* `>PUSHW timer`
|
* `>PUSHW timer`
|
||||||
* `>LDYA ptime`
|
* `>LDYA ptime`
|
||||||
* `>SYSCALL PTime2Time`
|
* `>SYSCALL PTime2Time`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.PTime2Time >STYA ZPPtr1
|
K.PTime2Time jsr MEM.SPtr1PPtr2
|
||||||
>PULLW ZPPtr2
|
|
||||||
TIME.PTime2TimeP1P2
|
TIME.PTime2TimeP1P2
|
||||||
ldy #1
|
ldy #1
|
||||||
lda (ZPPtr1),y Get Year
|
lda (ZPPtr1),y Get Year
|
||||||
@ -165,14 +163,12 @@ K.ComputeWDAY lda #3 Thursday : 4 (-1 for mod 7)
|
|||||||
* ## C
|
* ## C
|
||||||
* `int CTime2Time (long* ctime, S.TIME* timer);`
|
* `int CTime2Time (long* ctime, S.TIME* timer);`
|
||||||
* ## ASM
|
* ## ASM
|
||||||
* **In :**
|
|
||||||
* `>PUSHW timer`
|
* `>PUSHW timer`
|
||||||
* `>LDYA ctime`
|
* `>LDYA ctime`
|
||||||
* `>SYSCALL CTime2Time`
|
* `>SYSCALL CTime2Time`
|
||||||
* **Out:**
|
* ## RETURN VALUE
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.CTime2Time >STYA ZPPtr1
|
K.CTime2Time jsr MEM.SPtr1PPtr2
|
||||||
>PULLW ZPPtr2
|
|
||||||
|
|
||||||
ldy #3
|
ldy #3
|
||||||
|
|
||||||
@ -393,11 +389,10 @@ K.CTime.Year .BS 1
|
|||||||
* # StrFTime
|
* # StrFTime
|
||||||
* ## C
|
* ## C
|
||||||
* Convert S.TIME struct to CSTR
|
* Convert S.TIME struct to CSTR
|
||||||
* `size_t strftime (char* ptr, size_t maxsize, const char* format, const struct tm* timeptr );`
|
* `size_t strftime (char* ptr, const char* format, const struct S.TIME* timeptr );`
|
||||||
* ## ASM
|
* ## ASM
|
||||||
* **In:**
|
* `PUSHW timeptr`
|
||||||
* PUSHW = Dst PTR To CSTR Buf
|
* `PUSHW format`
|
||||||
* PUSHW = Src PTR To Format String
|
|
||||||
* + %a : Abbreviated weekday name : Thu
|
* + %a : Abbreviated weekday name : Thu
|
||||||
* + %A : Full weekday name : Thursday
|
* + %A : Full weekday name : Thursday
|
||||||
* + %b : Abbreviated month name : Aug
|
* + %b : Abbreviated month name : Aug
|
||||||
@ -412,11 +407,13 @@ K.CTime.Year .BS 1
|
|||||||
* + %w : Weekday as a decimal number with Sunday as 0 (0-6)
|
* + %w : Weekday as a decimal number with Sunday as 0 (0-6)
|
||||||
* + %y : Year, last two digits (00-99)
|
* + %y : Year, last two digits (00-99)
|
||||||
* + %Y : Year four digits 2001
|
* + %Y : Year four digits 2001
|
||||||
* PUSHW = Src PTR To S.Time
|
* `>LDYA ptr`
|
||||||
* **Out:**
|
* `>SYSCALL strftime`
|
||||||
|
* ## RETURN VALUE
|
||||||
* none. always succeed.
|
* none. always succeed.
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.StrFTime jsr MEM.PullP1P2P3
|
K.StrFTime jsr MEM.SPtr1PPtr2
|
||||||
|
>PULLW ZPPtr3 timeptr
|
||||||
|
|
||||||
ldy #0
|
ldy #0
|
||||||
|
|
||||||
@ -453,7 +450,7 @@ K.StrFTime jsr MEM.PullP1P2P3
|
|||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.8 lda #0 Terminate C string
|
.8 lda #0 Terminate C string
|
||||||
sta (ZPPtr3)
|
sta (ZPPtr1)
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
K.StrFTime.TBL .AS "aAbBdHImMpSwyY"
|
K.StrFTime.TBL .AS "aAbBdHImMpSwyY"
|
||||||
@ -504,7 +501,7 @@ K.StrFTime.BB ldx #15 full Month....
|
|||||||
>STYA ZPPtr4
|
>STYA ZPPtr4
|
||||||
ldy #S.Time.MONTH
|
ldy #S.Time.MONTH
|
||||||
|
|
||||||
K.StrFTime.STR lda (ZPPtr1),y get required S.Time field value
|
K.StrFTime.STR lda (ZPPtr3),y get required S.Time field value
|
||||||
tay
|
tay
|
||||||
beq .9 Illegal value
|
beq .9 Illegal value
|
||||||
|
|
||||||
@ -544,7 +541,7 @@ K.StrFTime.D ldy #S.Time.DAY
|
|||||||
K.StrFTime.HH ldy #S.Time.HOUR
|
K.StrFTime.HH ldy #S.Time.HOUR
|
||||||
bra K.StrFTime.addDecPtr1Y
|
bra K.StrFTime.addDecPtr1Y
|
||||||
K.StrFTime.II ldy #S.Time.HOUR
|
K.StrFTime.II ldy #S.Time.HOUR
|
||||||
lda (ZPPtr1),y
|
lda (ZPPtr3),y
|
||||||
cmp #12
|
cmp #12
|
||||||
bcc .1
|
bcc .1
|
||||||
sbc #12
|
sbc #12
|
||||||
@ -554,7 +551,7 @@ K.StrFTime.M ldy #S.Time.MONTH
|
|||||||
K.StrFTime.MM ldy #S.Time.MINUTE
|
K.StrFTime.MM ldy #S.Time.MINUTE
|
||||||
bra K.StrFTime.addDecPtr1Y
|
bra K.StrFTime.addDecPtr1Y
|
||||||
K.StrFTime.P ldy #S.Time.HOUR
|
K.StrFTime.P ldy #S.Time.HOUR
|
||||||
lda (ZPPtr1),y
|
lda (ZPPtr3),y
|
||||||
cmp #12
|
cmp #12
|
||||||
bcc .1
|
bcc .1
|
||||||
lda #'p'
|
lda #'p'
|
||||||
@ -572,7 +569,7 @@ K.StrFTime.YY ldy #S.Time.CENTURY
|
|||||||
K.StrFTime.Y ldy #S.Time.YEAR
|
K.StrFTime.Y ldy #S.Time.YEAR
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
K.StrFTime.addDecPtr1Y
|
K.StrFTime.addDecPtr1Y
|
||||||
lda (ZPPtr1),y
|
lda (ZPPtr3),y
|
||||||
K.StrFTime.addDecA
|
K.StrFTime.addDecA
|
||||||
|
|
||||||
stz .2+1
|
stz .2+1
|
||||||
@ -606,10 +603,10 @@ K.StrFTime.addDecA
|
|||||||
ora #$30
|
ora #$30
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
K.StrFTime.addChar
|
K.StrFTime.addChar
|
||||||
sta (ZPPtr3)
|
sta (ZPPtr1)
|
||||||
inc ZPPtr3
|
inc ZPPtr1
|
||||||
bne .8
|
bne .8
|
||||||
inc ZPPtr3+1
|
inc ZPPtr1+1
|
||||||
.8 rts
|
.8 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
K.StrFTime.DAY >PSTR "Monday"
|
K.StrFTime.DAY >PSTR "Monday"
|
||||||
|
Loading…
Reference in New Issue
Block a user