mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 05:32:20 +00:00
270 lines
7.3 KiB
Plaintext
270 lines
7.3 KiB
Plaintext
PR#3
|
||
PREFIX /A2OSX.SRC
|
||
NEW
|
||
INC 1
|
||
AUTO 6
|
||
.LIST OFF
|
||
*--------------------------------------
|
||
************ A2osX API ****************
|
||
*--------------------------------------
|
||
* A2osX.SYSCALL Functions Indexes
|
||
*--------------------------------------
|
||
SYS.GetMem .EQ $00
|
||
SYS.FreeMemA .EQ $02
|
||
SYS.GetMemPtrA .EQ $04
|
||
SYS.GetMemByIDA .EQ $06
|
||
|
||
SYS.GetMemByNameA .EQ $08
|
||
SYS.GetMemByNameYA .EQ $0A
|
||
*--------------------------------------
|
||
SYS.NewPStrYA .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.LoadLibYA .EQ $22
|
||
SYS.UnloadLibA .EQ $24
|
||
SYS.LoadDrvA .EQ $26
|
||
*--------------------------------------
|
||
SYS.ExpandPStrA .EQ $30
|
||
SYS.ExpandPStrYA .EQ $32
|
||
SYS.GetEnvVarH .EQ $34
|
||
SYS.GetEnvVarP .EQ $36
|
||
|
||
SYS.SetEnvVarH .EQ $38
|
||
SYS.SetEnvVarP .EQ $3A
|
||
*--------------------------------------
|
||
SYS.MLICreateFile .EQ $40
|
||
SYS.MLICreateDirA .EQ $42
|
||
SYS.MLICreateDirYA .EQ $44
|
||
SYS.MLIDestroyA .EQ $46
|
||
|
||
SYS.MLIDestroyYA .EQ $48
|
||
SYS.MLIRename .EQ $4A
|
||
SYS.MLISetFileInfo .EQ $4C
|
||
SYS.MLIGetFileInfoA .EQ $4E
|
||
|
||
SYS.MLIGetFileInfoYA .EQ $50
|
||
SYS.MLIOnline .EQ $52
|
||
SYS.MLISetPrefixA .EQ $54
|
||
SYS.MLISetPrefixYA .EQ $56
|
||
|
||
SYS.MLIGetPrefixA .EQ $58
|
||
SYS.MLIGetPrefixYA .EQ $5A
|
||
SYS.MLIOpenA .EQ $5C
|
||
SYS.MLIOpenYA .EQ $5E
|
||
|
||
SYS.MLINewLine .EQ $60
|
||
SYS.MLIRead .EQ $62
|
||
SYS.MLIWrite .EQ $64
|
||
SYS.MLICloseA .EQ $66
|
||
|
||
SYS.MLIFlushA .EQ $68
|
||
SYS.MLISetMark .EQ $6A
|
||
SYS.MLIGetMarkA .EQ $6A
|
||
SYS.MLISetEOF .EQ $6C
|
||
|
||
SYS.MLIGetEOFA .EQ $70
|
||
SYS.MLISetBuf .EQ $72
|
||
SYS.MLIGetBuf .EQ $74
|
||
SYS.MLIGetTime .EQ $76
|
||
|
||
SYS.MLIAllocIRQ .EQ $78
|
||
SYS.MLIDeallocIRQ .EQ $7A
|
||
SYS.MLIReadBlock .EQ $7C
|
||
SYS.MLIWriteBlock .EQ $7E
|
||
*--------------------------------------
|
||
SYS.GetDevByIDA .EQ $80
|
||
SYS.GetDevByNameA .EQ $82
|
||
SYS.GetDevByNameYA .EQ $84
|
||
*--------------------------------------
|
||
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
|
||
*--------------------------------------
|
||
SYS.ScreenSelectA .EQ $C0
|
||
|
||
SYS.SysScrPPSTRA .EQ $C4
|
||
SYS.SysScrPPSTRYA .EQ $C6
|
||
*--------------------------------------
|
||
* ERROR CODES
|
||
*--------------------------------------
|
||
MEMMGR.ERROOM .EQ $FF Out Of Memory Error
|
||
MEMMGR.ERROOH .EQ $FE Out Of Handle Error
|
||
*--------------------------------------
|
||
DEVMGR.ERROOM .EQ $EF Out Of Memory Error
|
||
DEVMGR.ERROOH .EQ $EE Out Of Handle Error
|
||
DEVMGR.ERRNICL .EQ $ED Invalid Command Line
|
||
DEVMGR.ERRNOHW .EQ $EC No Hardware
|
||
DEVMGR.ERRDNF .EQ $EB Device Not Found Error
|
||
*--------------------------------------
|
||
TSKMGR.ERROOH .EQ $DF Out Of Handle Error
|
||
TSKMGR.ERRNSP .EQ $DD No Such Process Error
|
||
*--------------------------------------
|
||
SYSMGR.ERRSYN .EQ $CF Syntax Error
|
||
SYSMGR.ERRENVF .EQ $CE Env is Full
|
||
SYSMGR.ERRIDIR .EQ $CD Invalid Directory
|
||
SYSMGR.ERRFTB .EQ $CC File Too Big Error
|
||
SYSMGR.ERRFNF .EQ $CB File Not Found Error
|
||
*--------------------------------------
|
||
* MEM STRUCT
|
||
*--------------------------------------
|
||
S.MEM.F .EQ 0
|
||
S.MEM.F.AUX .EQ %10000000 Request Stock Object
|
||
S.MEM.F.INIT0 .EQ %01000000 Fill with "0"
|
||
S.MEM.F.CODE .EQ %00100000
|
||
S.MEM.F.NOMOVE .EQ %00010000
|
||
S.MEM.F.ALIGN .EQ %00001000
|
||
S.MEM.F.INUSE .EQ %10000000 (Internal Flag)
|
||
S.MEM.REFCNT .EQ 1
|
||
S.MEM.OWNERPID .EQ 2
|
||
S.MEM.BIN .EQ 3
|
||
S.MEM.PTR .EQ 4
|
||
S.MEM.LEN .EQ 6
|
||
*
|
||
S.MEM.SIZE .EQ 8
|
||
*--------------------------------------
|
||
* BIN STRUCT
|
||
*--------------------------------------
|
||
S.BIN.CODE .EQ 0
|
||
*--------------------------------------
|
||
* DEV STRUCT
|
||
*--------------------------------------
|
||
S.DEV.CODE .EQ 0
|
||
S.DEV.JMP .EQ 2
|
||
S.DEV.F .EQ 4
|
||
S.DEV.F.INUSE .EQ %10000000
|
||
S.DEV.F.BUSY .EQ %01000000
|
||
S.DEV.F.SHARE .EQ %00100000 Device is shareable
|
||
S.DEV.F.IRQ .EQ %00010000 Device is irq driven
|
||
S.DEV.F.EVENT .EQ %00001000 Device is event driven
|
||
S.DEV.F.COUT .EQ %00000100 Device supports Char OUT
|
||
S.DEV.F.BLOCK .EQ %00000010
|
||
S.DEV.F.CHAR .EQ %00000001
|
||
S.DEV.NAME .EQ 5 5 Bytes : LEN+NUL KBD CON COMx LPTx ETHx
|
||
*
|
||
S.DEV.SIZE .EQ 16
|
||
*--------------------------------------
|
||
S.DEVINFO.TYPE .EQ 0
|
||
S.DEVINFO.TYPE.CHAR .EQ %00000001
|
||
S.DEVINFO.TYPE.XY .EQ %00000010
|
||
S.DEVINFO.TYPE.NET .EQ %00000011
|
||
S.DEVINFO.TYPE.GFX .EQ %00000100
|
||
*--------------------------------------
|
||
* Generic Driver Functions
|
||
*--------------------------------------
|
||
DEVMGR.OPEN .EQ 0
|
||
DEVMGR.GETEVENT .EQ 2
|
||
DEVMGR.COUT .EQ 4
|
||
DEVMGR.CLOSE .EQ 6
|
||
DEVMGR.GETINFO .EQ 8
|
||
DEVMGR.IRQ .EQ 10
|
||
*--------------------------------------
|
||
* 'XY' Class Driver Functions
|
||
*--------------------------------------
|
||
DEVMGR.XY.SETPOS .EQ 12
|
||
*--------------------------------------
|
||
* 'NET' Class Driver Functions
|
||
*--------------------------------------
|
||
DEVMGR.NET.SEND .EQ 12
|
||
*--------------------------------------
|
||
* 'GFX' Class Driver Functions
|
||
*--------------------------------------
|
||
DEVMGR.GFX.SETPIXEL .EQ 12
|
||
DEVMGR.GFX.GETPIXEL .EQ 14
|
||
DEVMGR.GFX.HLINE .EQ 16
|
||
DEVMGR.GFX.VLINE .EQ 18
|
||
DEVMGR.GFX.BITBLT .EQ 20
|
||
*--------------------------------------
|
||
* 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
|
||
*--------------------------------------
|
||
* 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
|
||
*--------------------------------------
|
||
* 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.hPATH .EQ 14 Pattern for file filtering
|
||
S.LISTDIR.hPATTERN .EQ 15 Pattern for file filtering
|
||
*
|
||
S.LISTDIR.SIZE .EQ 16
|
||
*--------------------------------------
|
||
* 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.API.I
|