mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-22 16:31:07 +00:00
510 lines
9.3 KiB
Plaintext
510 lines
9.3 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
*--------------------------------------
|
||
* $E000-E1FF System calls Jump Table
|
||
*--------------------------------------
|
||
* Bank 1
|
||
*--------------------------------------
|
||
K.SYSCALL .DA 0 $00
|
||
.DA K.ChMod
|
||
.DA K.FStat
|
||
.DA K.Stat
|
||
.DA K.MKDir
|
||
.DA K.MKNod
|
||
.DA K.MKFIFO
|
||
.DA K.Pipe
|
||
|
||
.DA K.OpenDir $10
|
||
.DA K.ReadDir
|
||
.DA K.FClose
|
||
.DA K.Open
|
||
.DA K.Close
|
||
.DA K.Read
|
||
.DA K.Write
|
||
.DA K.IOCTL
|
||
|
||
.DA K.FPutC $20
|
||
.DA K.PutChar
|
||
.DA K.GetC
|
||
.DA K.GetChar
|
||
.DA K.FPutS
|
||
.DA K.PutS
|
||
.DA K.FGetS
|
||
.DA 0
|
||
|
||
.DA K.FOpen $30
|
||
.DA K.FClose
|
||
.DA K.FRead
|
||
.DA K.FWrite
|
||
.DA K.FFlush
|
||
.DA K.FSeek
|
||
.DA K.FTell
|
||
.DA K.FEOF
|
||
|
||
.DA K.Remove $40
|
||
.DA K.Rename
|
||
.DA 0
|
||
.DA 0
|
||
.DA 0
|
||
.DA K.GetDevByName
|
||
.DA K.GetDevStatus
|
||
.DA K.MKDev
|
||
|
||
.DA 0 $50
|
||
.DA K.SScanF
|
||
.DA 0
|
||
.DA K.PrintF2
|
||
.DA K.PrintF
|
||
.DA K.SPrintF
|
||
.DA K.FPrintF
|
||
.DA 0
|
||
|
||
.DA 0 $60
|
||
.DA K.ChTyp
|
||
.DA 0
|
||
.DA 0
|
||
.DA 0
|
||
.DA 0
|
||
.DA K.ChOwn
|
||
.DA K.ChGrp
|
||
|
||
.DA K.AToF $70
|
||
.DA K.AToI
|
||
.DA K.AToL
|
||
.DA K.StrToF
|
||
.DA K.StrToL
|
||
.DA K.StrToUL
|
||
.DA K.RealPath
|
||
.DA 0
|
||
*--------------------------------------
|
||
* Bank 2
|
||
*--------------------------------------
|
||
.DA K.StrLen $80
|
||
.DA K.StrCpy
|
||
.DA K.StrCat
|
||
.DA K.StrDup
|
||
.DA K.StrUpr
|
||
.DA K.StrLwr
|
||
.DA K.StrCmp
|
||
.DA K.StrCaseCmp
|
||
|
||
.DA 0 $90
|
||
.DA 0
|
||
.DA 0
|
||
.DA 0
|
||
.DA K.LoadLib
|
||
.DA K.UnloadLib
|
||
.DA K.LoadDrv
|
||
.DA K.InsDrv
|
||
|
||
.DA K.ExecL $A0
|
||
.DA K.ExecV
|
||
.DA K.Fork
|
||
.DA K.Kill
|
||
.DA K.LoadFile
|
||
.DA K.LoadTxtFile
|
||
.DA K.FileSearch
|
||
.DA K.GetMemStat
|
||
|
||
.DA K.Shift $B0
|
||
.DA K.ArgV
|
||
.DA K.Expand
|
||
.DA K.ArgVDup
|
||
.DA K.PutEnv
|
||
.DA K.SetEnv
|
||
.DA K.GetEnv
|
||
.DA K.UnsetEnv
|
||
|
||
.DA K.Time $C0
|
||
.DA K.StrFTime
|
||
.DA K.PTime2Time
|
||
.DA K.CTime2Time
|
||
.DA K.MD5
|
||
.DA K.MD5Init
|
||
.DA K.MD5Update
|
||
.DA K.MD5Finalize
|
||
|
||
.DA K.GetPWUID $D0
|
||
.DA K.GetPWName
|
||
.DA K.PutPW
|
||
.DA K.FlushEtcPasswd
|
||
.DA K.StrVShift
|
||
.DA K.StrVGet
|
||
.DA K.StrVAdd
|
||
.DA 0
|
||
*--------------------------------------
|
||
* $E000
|
||
*--------------------------------------
|
||
.DA K.GetMem $E0
|
||
.DA K.Realloc
|
||
.DA K.GetMemPtr
|
||
.DA K.FreeMem
|
||
|
||
.DA K.GetMem K.NewStkObj
|
||
.DA K.LoadStkObj
|
||
.DA K.GetMemPtr K.GetStkObjPtr
|
||
.DA K.FreeMem K.FreeStkObj
|
||
*--------------------------------------
|
||
.DA K.SListGetData $F0
|
||
.DA K.SListAddData
|
||
.DA K.SListSetData
|
||
.DA K.SListGetByID
|
||
|
||
.DA K.SListNewKey
|
||
.DA K.SListLookup
|
||
.DA K.SListNew
|
||
.DA K.SListFree
|
||
*--------------------------------------
|
||
* LO Byte :
|
||
* #RRAMWRAMBNK1,#RRAMWRAMBNK2
|
||
* HI Byte :
|
||
* Flags (ROOT....)
|
||
*--------------------------------------
|
||
K.SYSCALL.BANK .DA #RRAMWRAMBNK1 $00
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
|
||
.DA #RRAMWRAMBNK1 $10
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
|
||
.DA #RRAMWRAMBNK1 $20
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
|
||
.DA #RRAMWRAMBNK1 $30
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
|
||
.DA #RRAMWRAMBNK1 $40
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
|
||
.DA #RRAMWRAMBNK1 $50
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
|
||
.DA #RRAMWRAMBNK1 $60
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
|
||
.DA #RRAMWRAMBNK1 $70
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK1
|
||
.DA #$80
|
||
*--------------------------------------
|
||
.DA #RRAMWRAMBNK2 $80
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
|
||
.DA #RRAMWRAMBNK2 $90
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
|
||
.DA #RRAMWRAMBNK2 $A0
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
|
||
.DA #RRAMWRAMBNK2 $B0
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #RRAMWRAMBNK2
|
||
.DA #$80
|
||
.DA #0 $B8 : ENV
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
|
||
.DA #0 $C0 : TIME
|
||
.DA #$80
|
||
.DA #0
|
||
.DA #$80
|
||
.DA #0
|
||
.DA #$80
|
||
.DA #0
|
||
.DA #$80
|
||
.DA #0 $C8 : MD5
|
||
.DA #$80
|
||
.DA #0
|
||
.DA #$80
|
||
.DA #0
|
||
.DA #$80
|
||
.DA #0
|
||
.DA #$80
|
||
|
||
.DA #$C0 $D0 : PWDX
|
||
.DA #$80
|
||
.DA #$C0 PWDX
|
||
.DA #$80
|
||
.DA #$C0 PWDX
|
||
.DA #$80
|
||
.DA #0 PWD
|
||
.DA #$80
|
||
|
||
.DA #0 $D8 : StrV
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
*--------------------------------------
|
||
.DA #0 $E0 : MemMgr at $E000
|
||
.DA #$80
|
||
.DA #0
|
||
.DA #$80
|
||
.DA #0
|
||
.DA #$80
|
||
.DA #0
|
||
.DA #$80
|
||
.DA #$C0 NewStkObj
|
||
.DA #$80
|
||
.DA #0
|
||
.DA #$80
|
||
.DA #$C0 GetStkObjPtr
|
||
.DA #$80
|
||
.DA #$C0 FreeStkObj
|
||
.DA #$80
|
||
*--------------------------------------
|
||
.DA #$C0 $F0 : SLIST
|
||
.DA #$80
|
||
.DA #$C0
|
||
.DA #$80
|
||
.DA #$C0
|
||
.DA #$80
|
||
.DA #$C0
|
||
.DA #$80
|
||
.DA #$C0
|
||
.DA #$80
|
||
.DA #$C0
|
||
.DA #$80
|
||
.DA #$C0
|
||
.DA #$80
|
||
.DA #$C0
|
||
.DA #$80
|
||
*--------------------------------------
|
||
* K.SYSCALL2 : From KERNEL (MAIN,AUX), LIB
|
||
*--------------------------------------
|
||
K.SYSCALL2 bit K.SYSCALL.BANK,x Get Target BNK
|
||
bvc K.SYSCALL2.BANK
|
||
|
||
K.SYSCALL2.AUX sta SETREADAUX MAIN to AUX Mem API
|
||
sta SETWRITEAUX
|
||
jsr K.SYSCALL.JMP
|
||
sta CLRREADAUX
|
||
sta CLRWRITEAUX
|
||
rts
|
||
|
||
K.SYSCALL2.MAIN sta CLRREADAUX Coming from KERNEL in AUX...
|
||
sta CLRWRITEAUX
|
||
jsr .1
|
||
sta SETREADAUX
|
||
sta SETWRITEAUX
|
||
rts
|
||
.1 bit K.SYSCALL.BANK,x Get Target LC BNK
|
||
|
||
K.SYSCALL2.BANK bpl K.SYSCALL.JMP 0, E000, no BNK change
|
||
sta .7+1
|
||
lda $D000 #RRAMWRAMBNK1 or #RRAMWRAMBNK2
|
||
cmp K.SYSCALL.BANK,x
|
||
beq .7
|
||
pha remember source BNK
|
||
stx .6+1
|
||
lda K.SYSCALL.BANK,x
|
||
tax get Target BNK in x
|
||
bit $C000,x switch to Target BNK
|
||
bit $C000,x
|
||
|
||
jsr .6
|
||
|
||
stx .5+1 Save X
|
||
plx get back Source BNK
|
||
bit $C000,x switch to Target BNK
|
||
bit $C000,x
|
||
|
||
.5 ldx #$ff SELF MODIFIED
|
||
rts
|
||
.6 ldx #$ff SELF MODIFIED
|
||
.7 lda #$ff SELF MODIFIED
|
||
|
||
K.SYSCALL.JMP jmp (K.SYSCALL,x)
|
||
*--------------------------------------
|
||
K.SYSCALL.JMPX sta SETREADAUX
|
||
sta SETWRITEAUX
|
||
jsr .1
|
||
sta CLRREADAUX
|
||
sta CLRWRITEAUX
|
||
rts
|
||
|
||
.1 jmp (.2-SYS.PutEnv,x)
|
||
|
||
.2 .DA ENVX.PutEnv
|
||
.DA ENVX.SetEnv
|
||
.DA ENVX.GetEnv
|
||
.DA ENVX.UnsetEnv
|
||
|
||
.DA 0 Time
|
||
.DA TIMEX.StrFTime
|
||
.DA TIMEX.PTime2Time
|
||
.DA TIMEX.CTime2Time
|
||
|
||
.DA MD5X.MD5
|
||
.DA MD5X.Init
|
||
.DA MD5X.Update
|
||
.DA MD5X.Finalize
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE USR/SRC/SYS/KERNEL.S.JMP
|
||
LOAD USR/SRC/SYS/KERNEL.S
|
||
ASM
|