mirror of
https://github.com/A2osX/A2osX.git
synced 2024-08-14 13:29:02 +00:00
116 lines
3.8 KiB
Plaintext
116 lines
3.8 KiB
Plaintext
PR#3
|
||
PREFIX /A2OSX.BUILD
|
||
LOMEM $A00
|
||
INC 1
|
||
AUTO 6
|
||
.LIST OFF
|
||
*--------------------------------------
|
||
* KERNEL CONSTANTS DEFINITON
|
||
*--------------------------------------
|
||
K.ENV.SIZE .EQ 256
|
||
K.FLT.MAX .EQ 4
|
||
K.EVT.MAX .EQ 8
|
||
K.DEV.MAX .EQ 32
|
||
K.PS.MAX .EQ 32
|
||
*--------------------------------------
|
||
H.BIN.T .EQ 0
|
||
H.BIN.T.DRV65 .EQ $4CD8 6502:cld,jmp abs
|
||
H.BIN.T.LIB65 .EQ $7CD8 6502:cld,jmp (abs,x)
|
||
H.BIN.T.BIN65 .EQ $7CD8 6502:cld,jmp (abs,x)
|
||
*H.BIN.T.LIB80 .EQ $A28D Z80:
|
||
*H.BIN.T.BIN80 .EQ $A28D Z80:
|
||
H.BIN.JMP .EQ 2
|
||
*H.BIN.CODE.TYPE .EQ 4
|
||
*H.BIN.VERSION .EQ 5
|
||
H.BIN.CODE.LEN .EQ 8
|
||
*
|
||
H.BIN.EXE.DS.SIZE .EQ 10
|
||
H.BIN.EXE.SS.SIZE .EQ 12
|
||
H.BIN.EXE.ZP.SIZE .EQ 13
|
||
H.BIN.EXE.REL.TABLE .EQ 16
|
||
*
|
||
H.BIN.DRV.HEADER.O .EQ 10
|
||
H.BIN.DRV.CODE.O .EQ 12
|
||
H.BIN.DRV.CODE.LEN .EQ 14
|
||
H.BIN.DRV.REL.TABLE .EQ 0
|
||
*--------------------------------------
|
||
ZPKERNEL .EQ $0
|
||
ZPMEMMGR .EQ $8
|
||
*--------------------------------------
|
||
* $42-$47 ProDOS Block Device Drivers Main
|
||
*--------------------------------------
|
||
* $5E-$C8 RESERVED APPLESOFT Main/Aux (ROM Call, no need to switch back MainZP)
|
||
*--------------------------------------
|
||
INDEX .EQ $5E ->$5F
|
||
FORPNT .EQ $85 ->$86
|
||
FAC .EQ $9D ->$A1
|
||
FAC.SIGN .EQ $A2
|
||
FAC.EXTENSION .EQ $AC
|
||
TXTPTR .EQ $B8
|
||
*--------------------------------------
|
||
* ROM Entry Point
|
||
*--------------------------------------
|
||
ROM.SETFAC .EQ 10 Set FAC from INDEX
|
||
ROM.GETFAC .EQ 12 Get FAC at FORPNT
|
||
ROM.FIN .EQ 14
|
||
ROM.FOUT .EQ 16
|
||
*--------------------------------------
|
||
* Memory Map
|
||
*--------------------------------------
|
||
A2osX.SaveSM .EQ $100 Aux
|
||
A2osX.SaveSX .EQ $101 Aux
|
||
*--------------------------------------
|
||
* Main $200 -> 2FF : (Used By ProDOS,Clock DRV....)
|
||
* Main $300 -> 3EF : <free>
|
||
* Main $3F0 -> 3FF : SYS Vectors (reset,IRQ...)
|
||
* Aux $200 -> 3FD : /RAM Driver
|
||
* Aux $3FE -> 3FF : IRQ Vector
|
||
*--------------------------------------
|
||
K.S.STAT .EQ $0300 S.STAT for internal kernel operations
|
||
K.S.DEVSTAT .EQ $0340 S.DEVSTAT=25 or higher depends on dev type
|
||
K.SP.PARAMS .EQ $0380 Max 9 bytes
|
||
K.MLI.PARAMS .EQ $0390 Main, 18 bytes min for GetFileInfo (ATLK needs MORE!!!...32 max for now)
|
||
K.MLI.PATH .EQ $03B0 64+1 -> $03F0
|
||
*--------------------------------------
|
||
*** $3F0-$3FF IRQ Handler.... ***
|
||
*--------------------------------------
|
||
* Main/Aux $400 -> $7FF : Console Screen
|
||
* Main/Aux $800 -> $BFF : System Screen
|
||
*--------------------------------------
|
||
PS.Table.PID .EQ $0C00 K.PS.MAX
|
||
PS.Table.hMem .EQ $0C00+K.PS.MAX
|
||
K.Buf256 .EQ $0E00 Main
|
||
*--------------------------------------
|
||
K.STACKTOP .EQ $0F20 down to $0f00
|
||
*--------------------------------------
|
||
*** Z80 Reserved $0F00-10FF***
|
||
*--------------------------------------
|
||
Z80STACK .EQ $0FFF (0FFFFh) Down to $0F20
|
||
Z80JMP .EQ $1000 (00000h) Up To $10FF
|
||
*--------------------------------------
|
||
FltMgr.Table .EQ $1100 K.FLT.MAX*S.FLT.SIZE=8*32=128b
|
||
*--------------------------------------
|
||
EvtMgr.Table .EQ $1180 K.EVT.MAX*S.EVT.SIZE=16*8=128b
|
||
*--------------------------------------
|
||
DevMgr.Table .EQ $1200 K.DEV.MAX*S.DEV.SIZE=32*16=512b
|
||
*--------------------------------------
|
||
* MemMgr : $1800->$1FFF MAIN/AUX (2 kBytes)
|
||
*--------------------------------------
|
||
MemMgr.Table .EQ $1800 Slot 0 is Reserved
|
||
MemMgr.LoMem .EQ $1800
|
||
MemMgr.Free .EQ $1802
|
||
MemMgr.HiMem .EQ $1804
|
||
MemMgr.LastSlot .EQ $1806
|
||
*--------------------------------------
|
||
MemMgr.MLoMem .EQ $2000
|
||
MemMgr.MHiMem .EQ $BD00
|
||
MemMgr.XLoMem .EQ $2000
|
||
MemMgr.XHiMem .EQ $C000
|
||
*--------------------------------------
|
||
DevMgr.HiMem .EQ $FFFA Protect IRQ vectors in Aux LC
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE /A2OSX.BUILD/INC/KERNEL.I
|
||
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
||
ASM
|