mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-03 12:06:05 +00:00
327 lines
8.9 KiB
Plaintext
327 lines
8.9 KiB
Plaintext
PR#3
|
||
PREFIX /DATA/A2OSX
|
||
NEW
|
||
INC 1
|
||
AUTO 6
|
||
.LIST OFF
|
||
*--------------------------------------
|
||
* KERNEL Reserved ZP Location 00-1F,56-FF
|
||
*--------------------------------------
|
||
ZPQuickPtr1 .EQ $90 Temp Ptrs for use in very limited scope
|
||
ZPQuickPtr2 .EQ $92 (could be trashed by any JSR)
|
||
ZPQuickPtr3 .EQ $94
|
||
ZPQuickPtr4 .EQ $96
|
||
|
||
ZPLIB .EQ $A0 Main
|
||
ZPDRV .EQ $B0 Main
|
||
ZPBIN .EQ $C0 Main
|
||
*--------------------------------------
|
||
pPsContext .EQ $F0
|
||
pDevContext .EQ $F2
|
||
pEvent .EQ $F4
|
||
*--------------------------------------
|
||
R.SP .EQ $FE Main
|
||
*--------------------------------------
|
||
* A2OS.SYSCALL Functions Indexes
|
||
*--------------------------------------
|
||
SYS.GetMem .EQ $00
|
||
SYS.FreeMemA .EQ $02
|
||
SYS.ClrMemA .EQ $04
|
||
SYS.GetMemPtrA .EQ $06
|
||
|
||
SYS.GetMemLenA .EQ $08
|
||
SYS.GetMemByIDA .EQ $0A
|
||
SYS.GetMemByNameA .EQ $0C
|
||
*--------------------------------------
|
||
SYS.NewPStr .EQ $10
|
||
SYS.PStrCpyA .EQ $12
|
||
SYS.PStrCat .EQ $14
|
||
SYS.PStrCmp .EQ $16
|
||
|
||
SYS.PStrGetTkn .EQ $18
|
||
SYS.GetPStrIndex .EQ $1A
|
||
*--------------------------------------
|
||
SYS.LoadBinA .EQ $20
|
||
SYS.LoadLib .EQ $22
|
||
SYS.UnloadLibA .EQ $24
|
||
SYS.LoadDrvA .EQ $26
|
||
*--------------------------------------
|
||
SYS.ExpandPStrA .EQ $30
|
||
SYS.ExpandPStr .EQ $32
|
||
SYS.GetEnvVarH .EQ $34
|
||
SYS.GetEnvVarP .EQ $36
|
||
|
||
SYS.SetEnvVarH .EQ $38
|
||
SYS.SetEnvVarP .EQ $3A
|
||
*--------------------------------------
|
||
SYS.MLICreate .EQ $40
|
||
SYS.MLIDestroy .EQ $42
|
||
SYS.MLIRename .EQ $44
|
||
SYS.MLISetFileInfo .EQ $46
|
||
|
||
SYS.MLIGetFileInfoA .EQ $48
|
||
SYS.MLIOnline .EQ $4A
|
||
SYS.MLISetPrefix .EQ $4C
|
||
SYS.MLIGetPrefixA .EQ $4E
|
||
|
||
SYS.MLIOpenA .EQ $50
|
||
SYS.MLINewLine .EQ $52
|
||
SYS.MLIRead .EQ $54
|
||
SYS.MLIWrite .EQ $56
|
||
|
||
SYS.MLICloseA .EQ $58
|
||
SYS.MLIFlushA .EQ $5A
|
||
SYS.MLISetMark .EQ $5C
|
||
SYS.MLIGetMark .EQ $5E
|
||
|
||
SYS.MLISetEOF .EQ $60
|
||
SYS.MLIGetEOFA .EQ $62
|
||
*--------------------------------------
|
||
SYS.GetDevByIDA .EQ $70
|
||
SYS.GetDevByNameA .EQ $72
|
||
SYS.GetDevTable .EQ $74
|
||
SYS.GetDevInfoA .EQ $76
|
||
|
||
SYS.DevOutA .EQ $78
|
||
*--------------------------------------
|
||
SYS.GetEvent .EQ $80
|
||
SYS.DestroyEvent .EQ $82
|
||
*--------------------------------------
|
||
SYS.ExecProcessA .EQ $90
|
||
SYS.CreateProcessA .EQ $92
|
||
|
||
SYS.GetPSByIDA .EQ $98
|
||
*--------------------------------------
|
||
SYS.CheckPrefixA .EQ $A0
|
||
SYS.FileSearch .EQ $A2
|
||
SYS.LoadFileA .EQ $A4
|
||
SYS.ListDirInitA .EQ $A6
|
||
|
||
SYS.ListDirNextA .EQ $A8
|
||
SYS.ListDirCloseA .EQ $AA
|
||
*--------------------------------------
|
||
SYS.AddNetCfg .EQ $B0
|
||
SYS.SetNetCfg .EQ $B2
|
||
SYS.GetNetCfgA .EQ $B4
|
||
SYS.ClrNetCfgA .EQ $B6
|
||
*--------------------------------------
|
||
A2osX.SaveSM .EQ $100 Main
|
||
A2osX.SaveSX .EQ $101 Aux
|
||
*--------------------------------------
|
||
* Main $200 -> 2FF : (Reserved, ProDOS,Clock DRV....)
|
||
* Main $300 -> 3EF : <free>
|
||
* Main $3F0 -> 3FF : ProDOS Vectors
|
||
* Aux $200 -> 3FD : /RAM Driver
|
||
* Aux $3FE -> 3FF : RESET Vector
|
||
*--------------------------------------
|
||
* Console Screen .EQ $400 -> $7FF
|
||
* System Screen .EQ $800 -> $BFF
|
||
*--------------------------------------
|
||
TmpBuffer256 .EQ $0C00
|
||
*--------------------------------------
|
||
D.STACKSEG .EQ $0D00 $0DFF Down to $0D00
|
||
*--------------------------------------
|
||
MLICALL.PARAMS .EQ $0E00 size=$12 (SET_FILE_INFO +1)
|
||
|
||
*--------------------------------------
|
||
MEMMGR.LOMEM .EQ $0E30
|
||
MEMMGR.MLLIMIT .EQ $0E32
|
||
MEMMGR.MHLIMIT .EQ $0E34
|
||
MEMMGR.HIMEM .EQ $0E36
|
||
MEMMGR.MFREE .EQ $0E38
|
||
MEMMGR.TABLESIZE .EQ $0E3A
|
||
*--------------------------------------
|
||
Z80STACK .EQ $0FFF (0FFFFh) Down to $0F00
|
||
Z80JMP .EQ $1000
|
||
*--------------------------------------
|
||
MEMMGR.TABLE .EQ $1100 256 Handles
|
||
DEVMGR.TABLE .EQ $1200 K.DEV.MAX*S.DEV.SIZE=20*12=240
|
||
TSKMGR.TABLE .EQ $1300 K.PS.MAX*S.PS.SIZE=32*16=512
|
||
*--------------------------------------
|
||
A2osX.LOMEM .EQ $1500
|
||
*--------------------------------------
|
||
* A2osX GLOBAL PAGE
|
||
* $BE00->$BE0F : Public JMP
|
||
*--------------------------------------
|
||
A2osX.SYSCALL .EQ $BE00
|
||
A2osX.MLICALL .EQ $BE02
|
||
A2osX.LIBCALL .EQ $BE04
|
||
A2osX.SLEEP .EQ $BE06
|
||
Kernel.MLICALL .EQ $BE08
|
||
Kernel.DRVCALL .EQ $BE0A
|
||
Kernel.BINCALL .EQ $BE0C
|
||
Kernel.LIBCALL .EQ $BE0E
|
||
*--------------------------------------
|
||
A2osX.SCREENS .EQ $BE10
|
||
A2osX.SCREENS.G .EQ %00000100
|
||
A2osX.SCREENS.C .EQ %00000010
|
||
A2osX.SCREENS.S .EQ %00000001
|
||
A2osX.ACTIVESCRN .EQ $BE11
|
||
|
||
A2osX.TIMER16 .EQ $BE12
|
||
A2osX.RANDOM16 .EQ $BE14
|
||
|
||
A2osX.CPUTYPE .EQ $BE16
|
||
A2osX.Z80SLOT .EQ $BE17
|
||
|
||
Kernel.JMP .EQ $BE1A
|
||
A2osX.SaveA .EQ $BE1C
|
||
A2osX.SaveX .EQ $BE1D
|
||
A2osX.SaveY .EQ $BE1E
|
||
A2osX.GPCODE .EQ $BE20
|
||
*--------------------------------------
|
||
* MEM STRUCT
|
||
*--------------------------------------
|
||
S.MEM.F .EQ 0
|
||
S.MEM.F.INUSE .EQ %10000000
|
||
S.MEM.F.CLEAR .EQ %10000000 Fill with "0"
|
||
S.MEM.F.CODE .EQ %01000000
|
||
S.MEM.F.NOMOV .EQ %00100000
|
||
S.MEM.F.ALIGN .EQ %00010000
|
||
S.MEM.F.SPARE .EQ %00001000
|
||
S.MEM.F.AUX .EQ %00000100
|
||
S.MEM.F.LC1 .EQ %00000010
|
||
S.MEM.F.LC2 .EQ %00000001
|
||
S.MEM.REFCNT .EQ 1
|
||
S.MEM.PTR .EQ 2
|
||
S.MEM.LEN .EQ 4
|
||
S.MEM.BIN .EQ 6
|
||
S.MEM.OWNERPID .EQ 7
|
||
*
|
||
S.MEM.SIZE .EQ 8
|
||
*--------------------------------------
|
||
MEMMGR.ERROOM .EQ $FF Out Of Memory Error
|
||
MEMMGR.ERROOS .EQ $FE Out Of Slot Error
|
||
*--------------------------------------
|
||
* DEV STRUCT
|
||
*--------------------------------------
|
||
S.DEV.F .EQ 0
|
||
S.DEV.F.INUSE .EQ %10000000
|
||
S.DEV.F.EVENT .EQ %01000000
|
||
S.DEV.F.OUT .EQ %00100000
|
||
S.DEV.F.XYP .EQ %00010000
|
||
S.DEV.F.GFX .EQ %00001000
|
||
S.DEV.F.NET .EQ %00000100
|
||
S.DEV.F.BLOCK .EQ %00000010
|
||
S.DEV.F.CHAR .EQ %00000001
|
||
S.DEV.ID .EQ 1
|
||
S.DEV.NAME .EQ 2 5 Bytes : NUL KBD CON COMx LPTx ETHx
|
||
S.DEV.hCS .EQ 7
|
||
S.DEV.hDS .EQ 8
|
||
S.DEV.hCMD .EQ 9
|
||
S.DEV.hARGS .EQ 10
|
||
S.DEV.hOWNERPS .EQ 11
|
||
*
|
||
S.DEV.SIZE .EQ 12
|
||
*--------------------------------------
|
||
* Driver Function Indexes
|
||
*--------------------------------------
|
||
DEVMGR.OPEN .EQ 0
|
||
DEVMGR.GETEVENT .EQ 2
|
||
DEVMGR.OUT .EQ 4
|
||
DEVMGR.CLOSE .EQ 6
|
||
DEVMGR.GETINFO .EQ 8
|
||
*--------------------------------------
|
||
DEVMGR.ERRNICL .EQ $EB Invalid Command Line
|
||
DEVMGR.ERRNOHW .EQ $EC No Hardware
|
||
DEVMGR.ERRDNF .EQ $ED Device Not Found Error
|
||
DEVMGR.ERROOS .EQ $EE Out Of Slot Error
|
||
*--------------------------------------
|
||
* PS STRUCT
|
||
*--------------------------------------
|
||
S.PS.F .EQ 0
|
||
S.PS.F.INUSE .EQ %10000000
|
||
S.PS.F.HOLD .EQ %01000000
|
||
S.PS.F.EVENT .EQ %00100000
|
||
S.PS.ID .EQ 1
|
||
S.PS.PID .EQ 2
|
||
S.PS.hCS .EQ 3
|
||
S.PS.hDS .EQ 4
|
||
S.PS.hPREFIX .EQ 5
|
||
S.PS.hENV .EQ 6
|
||
S.PS.hCMD .EQ 7
|
||
S.PS.hARGS .EQ 8
|
||
S.PS.hINDEV .EQ 9
|
||
S.PS.hOUTDEV .EQ 10
|
||
S.PS.hERRDEV .EQ 11
|
||
S.PS.CID .EQ 12
|
||
S.PS.LASTERROR .EQ 13
|
||
S.PS.PC .EQ 14
|
||
*
|
||
S.PS.SIZE .EQ 16
|
||
*--------------------------------------
|
||
* LIB Function Indexes
|
||
*--------------------------------------
|
||
LIBMGR.LOAD .EQ 0
|
||
LIBMGR.UNLOAD .EQ 2
|
||
*--------------------------------------
|
||
* Task Function Indexes
|
||
*--------------------------------------
|
||
TSKMGR.INIT .EQ 0
|
||
TSKMGR.RUN .EQ 2
|
||
TSKMGR.DOEVENT .EQ 4
|
||
TSKMGR.QUIT .EQ 6
|
||
*--------------------------------------
|
||
TSKMGR.ERROOS .EQ $DE Out Of Slot Error
|
||
TSKMGR.ERRNSP .EQ $DF No Such Process Error
|
||
*--------------------------------------
|
||
* EVENT STRUCT
|
||
*--------------------------------------
|
||
S.EVT.F .EQ 0
|
||
S.EVT.F.SYS .EQ %10000000
|
||
S.EVT.F.WND .EQ %01000000
|
||
S.EVT.F.hMEM2 .EQ %00100000 Indicates That S.EVT.DATAHI is a hMem
|
||
S.EVT.F.hMEM1 .EQ %00010000 Indicates That S.EVT.DATALO is a hMem
|
||
S.EVT.F.TIMER .EQ %00001000
|
||
S.EVT.F.NET .EQ %00000100
|
||
S.EVT.F.MOUSE .EQ %00000010
|
||
S.EVT.F.KEY .EQ %00000001
|
||
S.EVT.hDEV .EQ 1
|
||
S.EVT.DATA .EQ 2
|
||
S.EVT.DATALO .EQ 2
|
||
S.EVT.DATAHI .EQ 3
|
||
S.EVT.DATAW1 .EQ 4
|
||
S.EVT.DATAW2 .EQ 6
|
||
*
|
||
S.EVT.SIZE .EQ 8
|
||
*--------------------------------------
|
||
SYSMGR.ERRENVF .EQ $CB Env is Full
|
||
SYSMGR.ERRIDIR .EQ $CC Invalid Directory
|
||
SYSMGR.ERRFTB .EQ $CD File Too Big Error
|
||
SYSMGR.ERRFNF .EQ $CE File Not Found Error
|
||
SYSMGR.ERRSYN .EQ $CF Syntax Error
|
||
*--------------------------------------
|
||
* S.LISTDIR STRUCT
|
||
*--------------------------------------
|
||
S.LISTDIR.hONLINE .EQ 0
|
||
S.LISTDIR.ONLINEPTR .EQ 1
|
||
S.LISTDIR.REFNUM .EQ 2 ref_num file
|
||
S.LISTDIR.hIOBUF .EQ 3 hMem to ProDOS IO buffer
|
||
S.LISTDIR.hREADBUF .EQ 4 hMem to 512 Read Buffer
|
||
S.LISTDIR.EL .EQ 5 entry_length
|
||
S.LISTDIR.EIB .EQ 6 ENTRY_INDEX in block
|
||
S.LISTDIR.EPB .EQ 7 entry_per_block
|
||
S.LISTDIR.BLKPTR .EQ 8 entry PTR in block
|
||
S.LISTDIR.FI .EQ 10 FILE_INDEX in DIR
|
||
S.LISTDIR.FC .EQ 12 file_count
|
||
S.LISTDIR.hPATTERN .EQ 14 Pattern for file filtering
|
||
*
|
||
S.LISTDIR.SIZE .EQ 16
|
||
*--------------------------------------
|
||
* S.FENTRY STRUCT
|
||
*--------------------------------------
|
||
S.FENTRY.F .EQ 0
|
||
S.FENTRY.COUNT .EQ 1
|
||
*--------------------------------------
|
||
* S.BUFRDR STRUCT
|
||
*--------------------------------------
|
||
S.BUFRDR.hMEM .EQ 0
|
||
S.BUFRDR.DELIM .EQ 1
|
||
S.BUFRDR.LEN .EQ 2
|
||
S.BUFRDR.IDX .EQ 4
|
||
*
|
||
S.BUFRDR.SIZE .EQ 6
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE INC/A2OSX.I
|