A2osX/SYS/KERNEL.S.JMP.txt

536 lines
9.8 KiB
Plaintext
Raw Normal View History

2017-12-22 21:24:30 +00:00
NEW
2019-05-25 19:24:07 +00:00
AUTO 3,1
2016-06-07 06:10:18 +00:00
*--------------------------------------
2019-05-04 21:13:50 +00:00
* $E000-E1FF System calls Jump Table
*--------------------------------------
* Bank 1
*--------------------------------------
2020-02-14 16:32:52 +00:00
K.SYSCALL .DA K.ChTyp $00 : STAT
2019-05-04 21:13:50 +00:00
.DA K.ChMod
2018-10-04 15:30:14 +00:00
.DA K.FStat
.DA K.Stat
2018-06-18 06:22:50 +00:00
.DA K.MKDir
.DA K.MKNod
.DA K.MKFIFO
2019-02-04 16:37:15 +00:00
.DA K.Pipe
2019-12-02 16:47:53 +00:00
2020-02-14 07:21:56 +00:00
.DA K.OpenDir $10 : DIRENT
2018-06-18 06:22:50 +00:00
.DA K.ReadDir
2018-09-06 15:36:44 +00:00
.DA K.FClose
2020-02-14 07:21:56 +00:00
.DA K.Open UNISTD
2018-07-11 15:13:29 +00:00
.DA K.Close
.DA K.Read
.DA K.Write
2020-03-11 06:40:01 +00:00
.DA K.ChOwn
2020-02-14 07:21:56 +00:00
.DA K.FPutC $20 : STDIO
2018-06-18 06:22:50 +00:00
.DA K.PutChar
.DA K.GetC
.DA K.GetChar
.DA K.FPutS
2018-06-18 06:22:50 +00:00
.DA K.PutS
2018-07-27 13:34:34 +00:00
.DA K.FGetS
2018-01-15 06:50:44 +00:00
.DA 0
2019-12-02 16:47:53 +00:00
.DA K.FOpen $30
2018-06-18 06:22:50 +00:00
.DA K.FClose
2017-01-12 17:43:45 +00:00
.DA K.FRead
.DA K.FWrite
2018-06-18 06:22:50 +00:00
.DA K.FFlush
2017-01-12 17:43:45 +00:00
.DA K.FSeek
.DA K.FTell
2018-06-18 06:22:50 +00:00
.DA K.FEOF
2018-06-18 06:22:50 +00:00
.DA K.Remove $40
2017-01-12 17:43:45 +00:00
.DA K.Rename
.DA 0
.DA 0
2020-02-16 20:45:16 +00:00
.DA K.PrintF
.DA K.FPrintF
.DA K.SPrintF
2020-03-23 07:08:27 +00:00
.DA K.ScanF
2019-12-02 16:47:53 +00:00
2020-03-23 07:08:27 +00:00
.DA K.FScanF $50
2018-06-18 06:22:50 +00:00
.DA K.SScanF
.DA 0
2020-02-14 16:32:52 +00:00
.DA 0
2020-02-16 20:45:16 +00:00
.DA 0
.DA 0
.DA 0
2020-03-23 07:08:27 +00:00
.DA 0
2020-02-17 16:55:02 +00:00
*--------------------------------------
* Bank 2
*--------------------------------------
2020-05-17 17:34:32 +00:00
.DA K.Mount $60
.DA K.UMount
2019-05-04 21:13:50 +00:00
.DA 0
2020-05-17 17:34:32 +00:00
.DA K.GetErrorMessage
2020-02-17 16:55:02 +00:00
.DA K.Shift $68 : ARG
.DA K.ArgV
.DA K.ArgVDup
2019-05-04 21:13:50 +00:00
.DA 0
2020-02-17 16:55:02 +00:00
2020-02-14 07:21:56 +00:00
.DA K.AToF $70 : STDLIB
2018-06-18 06:22:50 +00:00
.DA K.AToI
.DA K.AToL
.DA K.StrToF
.DA K.StrToL
2019-09-02 15:34:10 +00:00
.DA K.StrToUL
2018-06-18 06:22:50 +00:00
.DA K.RealPath
2020-02-14 07:21:56 +00:00
.DA K.Expand
.DA K.StrLen $80 : STRING
.DA K.StrCpy
.DA K.StrCat
2018-12-20 16:23:43 +00:00
.DA K.StrDup
2018-06-18 06:22:50 +00:00
.DA K.StrUpr
.DA K.StrLwr
2018-01-15 16:51:44 +00:00
.DA K.StrCmp
2018-09-06 12:27:37 +00:00
.DA K.StrCaseCmp
2020-02-16 20:45:16 +00:00
.DA K.GetDevByName $90 : DEV
.DA K.GetDevStatus
.DA K.MKDev
.DA K.IOCTL
2020-02-14 07:21:56 +00:00
.DA K.LoadLib BIN
2018-06-18 06:22:50 +00:00
.DA K.UnloadLib
.DA K.LoadDrv
2018-06-28 15:26:34 +00:00
.DA K.InsDrv
2020-02-14 07:21:56 +00:00
.DA K.ExecL $A0 : PS
2018-10-25 15:31:41 +00:00
.DA K.ExecV
2020-02-07 12:53:46 +00:00
.DA K.Fork
2018-12-04 13:20:35 +00:00
.DA K.Kill
2019-07-29 15:38:55 +00:00
.DA K.LoadFile
.DA K.LoadTxtFile
2020-02-07 12:53:46 +00:00
.DA K.FileSearch
2019-07-29 15:38:55 +00:00
.DA K.GetMemStat
2020-02-17 16:55:02 +00:00
*--------------------------------------
* AUX
*--------------------------------------
.DA K.StrVShift $B0 : STRV
.DA K.StrVGet
.DA K.StrVAdd
2020-02-14 07:21:56 +00:00
.DA 0
2020-02-17 16:55:02 +00:00
.DA K.PutEnv $B8 : ENV
2016-09-21 15:20:37 +00:00
.DA K.SetEnv
2018-06-18 06:22:50 +00:00
.DA K.GetEnv
.DA K.UnsetEnv
2020-02-17 16:55:02 +00:00
2020-02-14 07:21:56 +00:00
.DA K.Time $C0 : TIME
2020-01-21 07:34:32 +00:00
.DA K.StrFTime
.DA K.PTime2Time
.DA K.CTime2Time
2020-02-17 16:55:02 +00:00
.DA K.MD5 $C8 : MD5
2020-01-20 07:23:51 +00:00
.DA K.MD5Init
.DA K.MD5Update
.DA K.MD5Finalize
2017-10-27 14:56:46 +00:00
2020-02-14 07:21:56 +00:00
.DA K.GetPWUID $D0 : PWD
2019-07-19 14:05:22 +00:00
.DA K.GetPWName
.DA K.PutPW
2020-02-17 16:55:02 +00:00
.DA K.GetGRGID
.DA K.GetGRName
.DA K.PutGR
2020-03-12 16:44:11 +00:00
.DA K.OpenSession
.DA K.CloseSession
2020-02-17 16:55:02 +00:00
.DA K.SListGetData $E0 : SLIST
.DA K.SListAddData
.DA K.SListSetData
.DA K.SListGetByID
.DA K.SListNewKey
.DA K.SListLookup
.DA K.SListFree
2020-02-18 15:34:56 +00:00
.DA K.SListNew
2016-06-07 06:10:18 +00:00
*--------------------------------------
* $E000
*--------------------------------------
2020-02-17 16:55:02 +00:00
.DA K.GetMem $F0
2020-01-31 16:12:25 +00:00
.DA K.Realloc
2019-01-30 06:20:13 +00:00
.DA K.GetMemPtr
.DA K.FreeMem
2019-06-19 15:56:59 +00:00
.DA K.GetMem K.NewStkObj
2019-03-15 16:20:28 +00:00
.DA K.LoadStkObj
2019-06-19 15:56:59 +00:00
.DA K.GetMemPtr K.GetStkObjPtr
.DA K.FreeMem K.FreeStkObj
2016-09-26 16:00:52 +00:00
*--------------------------------------
* LO Byte :
* #RRAMWRAMBNK1,#RRAMWRAMBNK2
* HI Byte :
* Flags (ROOT....)
2016-09-05 06:10:04 +00:00
*--------------------------------------
K.SYSCALL.BANK .DA #RRAMWRAMBNK1 $00
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
2019-10-03 06:25:27 +00:00
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1 $10
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1 $20
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1 $30
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1 $40
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
2020-02-07 06:42:30 +00:00
.DA #RRAMWRAMBNK1 $50
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
*--------------------------------------
2020-05-17 17:34:32 +00:00
.DA #RRAMWRAMBNK2 $60 : MOUNT
2020-02-14 07:21:56 +00:00
.DA #0
.DA #RRAMWRAMBNK2
.DA #0
.DA #RRAMWRAMBNK2
.DA #0
2020-05-17 17:34:32 +00:00
.DA #RRAMWRAMBNK2
2020-02-14 07:21:56 +00:00
.DA #0
2020-02-17 16:55:02 +00:00
.DA #RRAMWRAMBNK2 $68 : ARG
2020-02-14 07:21:56 +00:00
.DA #0
.DA #RRAMWRAMBNK2
.DA #0
.DA #RRAMWRAMBNK2
.DA #0
.DA #RRAMWRAMBNK2
.DA #0
2020-02-17 16:55:02 +00:00
.DA #RRAMWRAMBNK2 $70 : STDLIB
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
2020-02-07 06:42:30 +00:00
2020-02-17 16:55:02 +00:00
.DA #RRAMWRAMBNK2 $80 : STRING
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
2020-02-07 06:42:30 +00:00
2020-03-11 16:41:45 +00:00
.DA #RRAMWRAMBNK1 $90 : DEV
2020-02-17 16:55:02 +00:00
.DA #0
2020-03-11 16:41:45 +00:00
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
2020-03-11 16:41:45 +00:00
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
2020-03-11 16:41:45 +00:00
.DA #RRAMWRAMBNK1
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2 $98 : BIN
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
2020-02-17 16:55:02 +00:00
.DA #RRAMWRAMBNK2 $A0 : PS
.DA #0
.DA #RRAMWRAMBNK2
.DA #0
.DA #RRAMWRAMBNK2
.DA #0
.DA #RRAMWRAMBNK2
.DA #0
.DA #RRAMWRAMBNK2
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #RRAMWRAMBNK2
2020-02-17 16:55:02 +00:00
.DA #0
.DA #0 $B0 : STRV
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
2020-02-06 16:23:59 +00:00
.DA #0 $B8 : ENV
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
2017-10-27 14:56:46 +00:00
2020-02-06 16:23:59 +00:00
.DA #0 $C0 : TIME
2020-01-21 07:34:32 +00:00
.DA #0
.DA #0
.DA #0
2020-02-17 16:55:02 +00:00
.DA #0
.DA #0
.DA #0
.DA #0
2020-01-24 14:21:08 +00:00
.DA #0 $C8 : MD5
.DA #0
.DA #0
.DA #0
2020-02-17 16:55:02 +00:00
.DA #0
.DA #0
.DA #0
.DA #0
2017-10-27 14:56:46 +00:00
2020-02-18 15:34:56 +00:00
.DA #0 $D0 : PWD
.DA #0
.DA #0
.DA #0
2020-02-17 16:55:02 +00:00
.DA #0
.DA #0
2020-02-07 15:35:52 +00:00
.DA #0
.DA #0
2020-02-17 16:55:02 +00:00
2020-02-07 15:35:52 +00:00
.DA #0
.DA #0
.DA #0
.DA #0
2020-02-02 14:58:01 +00:00
.DA #0
2019-06-19 15:56:59 +00:00
.DA #0
.DA #0
.DA #0
2020-02-17 16:55:02 +00:00
2020-02-18 15:34:56 +00:00
.DA #0 $E0 : SLIST
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
2019-06-19 15:56:59 +00:00
.DA #0
2020-02-17 16:55:02 +00:00
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
*--------------------------------------
.DA #0 $E0 : MemMgr at $E000
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
.DA #0
.DA #$C0 NewStkObj
.DA #0
.DA #0 LoadStkObj
.DA #0
.DA #$C0 GetStkObjPtr
.DA #0
.DA #$C0 FreeStkObj
.DA #0
*--------------------------------------
2019-08-05 13:30:58 +00:00
* K.SYSCALL2 : From KERNEL (MAIN,AUX), LIB
*--------------------------------------
2019-05-12 20:45:11 +00:00
K.SYSCALL2 bit K.SYSCALL.BANK,x Get Target BNK
2019-06-19 15:56:59 +00:00
bvc K.SYSCALL2.BANK
2019-08-05 13:30:58 +00:00
K.SYSCALL2.AUX sta SETREADAUX MAIN to AUX Mem API
2019-06-19 15:56:59 +00:00
sta SETWRITEAUX
jsr K.SYSCALL.JMP
sta CLRREADAUX
sta CLRWRITEAUX
rts
2020-02-03 15:17:34 +00:00
2019-08-05 13:30:58 +00:00
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
2019-12-02 16:47:53 +00:00
2019-08-05 13:30:58 +00:00
K.SYSCALL2.BANK bpl K.SYSCALL.JMP 0, E000, no BNK change
sta .7+1
2019-05-04 21:13:50 +00:00
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
2019-12-02 16:47:53 +00:00
2019-05-04 21:13:50 +00:00
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
2019-01-26 14:01:05 +00:00
rts
2019-05-04 21:13:50 +00:00
.6 ldx #$ff SELF MODIFIED
.7 lda #$ff SELF MODIFIED
2019-05-05 17:15:37 +00:00
2019-05-04 21:13:50 +00:00
K.SYSCALL.JMP jmp (K.SYSCALL,x)
2019-01-26 14:01:05 +00:00
*--------------------------------------
2020-02-03 22:06:28 +00:00
K.SYSCALL.JMPX sta SETREADAUX
sta SETWRITEAUX
jsr .1
sta CLRREADAUX
sta CLRWRITEAUX
rts
2020-02-17 16:55:02 +00:00
.1 jmp (.2-SYS.StrVShift,x)
2020-02-06 16:23:59 +00:00
2020-02-17 16:55:02 +00:00
.2 .DA STRVX.StrVShift
.DA STRVX.StrVGet
.DA STRVX.StrVAdd
.DA 0
.DA ENVX.PutEnv
2020-02-06 16:23:59 +00:00
.DA ENVX.SetEnv
.DA ENVX.GetEnv
.DA ENVX.UnsetEnv
.DA 0 Time
.DA TIMEX.StrFTime
2020-02-03 22:06:28 +00:00
.DA TIMEX.PTime2Time
.DA TIMEX.CTime2Time
2020-02-06 16:23:59 +00:00
2020-02-03 22:06:28 +00:00
.DA MD5X.MD5
.DA MD5X.Init
.DA MD5X.Update
.DA MD5X.Finalize
2020-02-14 07:21:56 +00:00
.DA PWDX.GetPWUID
.DA PWDX.GetPWName
.DA PWDX.PutPW
2020-02-17 16:55:02 +00:00
.DA PWDX.GetGRGID
.DA PWDX.GetGRName
.DA PWDX.PutGR
2020-03-12 16:44:11 +00:00
.DA PWDX.OpenSession
.DA PWDX.CloseSession
2020-02-18 15:34:56 +00:00
.DA SLISTX.SListGetData
.DA SLISTX.SListAddData
.DA SLISTX.SListSetData
.DA SLISTX.SListGetByID
.DA SLISTX.SListNewKey
.DA SLISTX.SListLookup
.DA SLISTX.SListFree
.DA SLISTX.SListNew
2020-02-03 22:06:28 +00:00
*--------------------------------------
2016-06-07 06:10:18 +00:00
MAN
2018-11-17 17:17:13 +00:00
SAVE USR/SRC/SYS/KERNEL.S.JMP
LOAD USR/SRC/SYS/KERNEL.S
2016-06-07 06:10:18 +00:00
ASM