mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-24 14:31:05 +00:00
511 lines
9.4 KiB
Plaintext
511 lines
9.4 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
*--------------------------------------
|
||
* $E000-E1FF System calls Jump Table
|
||
*--------------------------------------
|
||
* Bank 1
|
||
*--------------------------------------
|
||
JMP.TABL .DA 0 $00 : STAT
|
||
.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 : DIRENT
|
||
.DA K.ReadDir
|
||
.DA K.FClose
|
||
.DA K.Open UNISTD
|
||
.DA K.Close
|
||
.DA K.Read
|
||
.DA K.Write
|
||
.DA K.ChOwn
|
||
|
||
.DA K.FPutC $20 : STDIO
|
||
.DA K.PutChar
|
||
.DA K.GetC
|
||
.DA K.GetChar
|
||
.DA K.FPutS
|
||
.DA K.PutS
|
||
.DA K.FGetS
|
||
.DA K.UngetC
|
||
|
||
.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 K.PrintF
|
||
.DA K.FPrintF
|
||
.DA K.SPrintF
|
||
.DA K.ScanF
|
||
.DA K.FScanF
|
||
.DA K.SScanF
|
||
|
||
.DA 0 $50
|
||
.DA 0
|
||
.DA 0
|
||
.DA 0
|
||
.DA K.Online $58 : PRODOS
|
||
.DA K.ChTyp
|
||
.DA K.ChAux
|
||
.DA K.SetAttr
|
||
*--------------------------------------
|
||
* Bank 2
|
||
*--------------------------------------
|
||
.DA K.Mount $60 : MOUNT
|
||
.DA K.UMount
|
||
.DA K.LoadStkObj $64 : STKOBJ
|
||
.DA K.GetStkObj
|
||
.DA K.Shift $68 : ARG
|
||
.DA K.ArgV
|
||
.DA K.ArgVDup
|
||
.DA K.GetErrMsg
|
||
|
||
.DA K.AToF $70 : STDLIB
|
||
.DA K.AToI
|
||
.DA K.AToL
|
||
.DA K.StrToF
|
||
.DA K.StrToL
|
||
.DA K.StrToUL
|
||
.DA K.RealPath
|
||
.DA K.Expand
|
||
|
||
.DA K.StrLen $80 : STRING
|
||
.DA K.StrCpy
|
||
.DA K.StrCat
|
||
.DA K.StrDup
|
||
.DA K.StrUpr
|
||
.DA K.StrLwr
|
||
.DA K.StrCmp
|
||
.DA K.StrCaseCmp
|
||
|
||
.DA K.GetDevByName $90 : DEV
|
||
.DA 0
|
||
.DA K.MKDev
|
||
.DA K.IOCTL
|
||
.DA K.LoadLib BIN
|
||
.DA K.UnloadLib
|
||
.DA K.LoadDrv
|
||
.DA K.InsDrv
|
||
|
||
.DA K.ExecL $A0 : PS
|
||
.DA K.ExecV
|
||
.DA K.Fork
|
||
.DA K.Kill
|
||
.DA K.LoadFile
|
||
.DA K.LoadTxtFile
|
||
.DA K.FileSearch
|
||
.DA K.GetMemStat
|
||
*--------------------------------------
|
||
* AUX
|
||
*--------------------------------------
|
||
.DA K.StrVNew $B0 : STRV
|
||
.DA K.StrVSet
|
||
.DA K.StrVGet
|
||
.DA K.StrVFree
|
||
.DA K.PutEnv $B8 : ENV
|
||
.DA K.SetEnv
|
||
.DA K.GetEnv
|
||
.DA K.UnsetEnv
|
||
|
||
.DA K.Time $C0 : TIME
|
||
.DA K.StrFTime
|
||
.DA K.PTime2Time
|
||
.DA K.CTime2Time
|
||
.DA K.MD5 $C8 : MD5
|
||
.DA K.MD5Init
|
||
.DA K.MD5Update
|
||
.DA K.MD5Finalize
|
||
|
||
.DA K.GetPWUID $D0 : PWD
|
||
.DA K.GetPWName
|
||
.DA K.PutPW
|
||
.DA K.GetGRGID
|
||
.DA K.GetGRName
|
||
.DA K.PutGR
|
||
.DA K.OpenSession
|
||
.DA K.CloseSession
|
||
|
||
.DA K.SListGetData $E0 : SLIST
|
||
.DA K.SListAddData
|
||
.DA K.SListSetData
|
||
.DA K.SListGetByID
|
||
|
||
.DA K.SListNewKey
|
||
.DA K.SListLookup
|
||
.DA K.SListFree
|
||
.DA K.SListNew
|
||
*--------------------------------------
|
||
* $E000
|
||
*--------------------------------------
|
||
.DA K.GetMem $F0
|
||
.DA K.Realloc
|
||
.DA K.GetMemPtr
|
||
.DA K.FreeMem
|
||
.DA K.Free
|
||
|
||
.DA K.GetMem K.NewStkObj
|
||
.DA K.GetMemPtr K.GetStkObjPtr
|
||
.DA K.FreeMem K.FreeStkObj
|
||
*--------------------------------------
|
||
* LO Byte :
|
||
* #IO.RRAMWRAMBNK1,#IO.RRAMWRAMBNK2
|
||
* HI Byte :
|
||
* Flags (ROOT....)
|
||
*--------------------------------------
|
||
JMP.BANK .DA #IO.RRAMWRAMBNK1 $00
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
|
||
.DA #IO.RRAMWRAMBNK1 $10
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
|
||
.DA #IO.RRAMWRAMBNK1 $20 : STDIO
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
|
||
.DA #IO.RRAMWRAMBNK1 $30
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
|
||
.DA #IO.RRAMWRAMBNK1 $40
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
|
||
.DA #IO.RRAMWRAMBNK1 $50
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1 $58 : PRODOS
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
*--------------------------------------
|
||
.DA #IO.RRAMWRAMBNK2 $60 : MOUNT
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2 $64 : STKOBJ
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2 $68 : ARG
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
|
||
.DA #IO.RRAMWRAMBNK2 $70 : STDLIB
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
|
||
.DA #IO.RRAMWRAMBNK2 $80 : STRING
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
|
||
.DA #IO.RRAMWRAMBNK1 $90 : DEV
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK1
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2 $98 : BIN
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
|
||
.DA #IO.RRAMWRAMBNK2 $A0 : PS
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
.DA #IO.RRAMWRAMBNK2
|
||
.DA #0
|
||
|
||
.DA #0 $B0 : STRV
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0 $B8 : ENV
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
|
||
.DA #0 $C0 : TIME
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0 $C8 : MD5
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
|
||
.DA #0 $D0 : PWD
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
|
||
.DA #0 $E0 : SLIST
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.DA #0
|
||
.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 #0
|
||
.DA #0
|
||
.DA #$C0 NewStkObj
|
||
.DA #0
|
||
.DA #$C0 GetStkObjPtr
|
||
.DA #0
|
||
.DA #$C0 FreeStkObj
|
||
.DA #0
|
||
*--------------------------------------
|
||
* From KERNEL (MAIN,AUX), LIB
|
||
*--------------------------------------
|
||
JMP.2 bit JMP.BANK,x Get Target BNK
|
||
bvc JMP.B
|
||
|
||
sta IO.SETREADAUX MAIN to AUX Mem API
|
||
sta IO.SETWRITEAUX
|
||
jsr JMP.JMPX
|
||
sta IO.CLRREADAUX
|
||
sta IO.CLRWRITEAUX
|
||
rts
|
||
|
||
JMP.M sta IO.CLRREADAUX Coming from KERNEL in AUX...
|
||
sta IO.CLRWRITEAUX
|
||
jsr .1
|
||
sta IO.SETREADAUX
|
||
sta IO.SETWRITEAUX
|
||
rts
|
||
|
||
.1 bit JMP.BANK,x Get Target LC BNK
|
||
|
||
JMP.B bpl JMP.JMPX 0, E000, no BNK change
|
||
|
||
sta .7+1
|
||
lda $D000 #IO.RRAMWRAMBNK1 or #IO.RRAMWRAMBNK2
|
||
cmp JMP.BANK,x
|
||
beq .7
|
||
|
||
pha remember source BNK
|
||
stx .6+1
|
||
lda JMP.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
|
||
|
||
JMP.JMPX jmp (JMP.TABL,x)
|
||
*--------------------------------------
|
||
JMP.X1A >PULLW FORPNT
|
||
bra JMP.XA
|
||
|
||
JMP.X2A sec
|
||
.HS 90 BCC
|
||
JMP.X2 clc
|
||
>PULLW FORPNT
|
||
>PULLW TXTPTR
|
||
bcc JMP.X
|
||
|
||
JMP.XA >PULLA
|
||
|
||
JMP.X sta IO.SETREADAUX
|
||
sta IO.SETWRITEAUX
|
||
jsr JMPX
|
||
sta IO.CLRREADAUX
|
||
sta IO.CLRWRITEAUX
|
||
rts
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE usr/src/sys/kernel.s.jmp
|
||
LOAD usr/src/sys/kernel.s
|
||
ASM
|