mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-26 13:49:18 +00:00
88 lines
3.0 KiB
Plaintext
88 lines
3.0 KiB
Plaintext
PR#3
|
||
PREFIX /A2OSX.BUILD
|
||
LOMEM $900
|
||
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
|
||
*--------------------------------------
|
||
* Kernel ZP Aux
|
||
*--------------------------------------
|
||
ZPKERNEL .EQ $0
|
||
ZPPtr1 .EQ ZPKERNEL
|
||
ZPPtr2 .EQ ZPKERNEL+2
|
||
ZPPtr3 .EQ ZPKERNEL+4
|
||
ZPPtr4 .EQ ZPKERNEL+6
|
||
*--------------------------------------
|
||
ZPMEMMGR .EQ $8
|
||
*--------------------------------------
|
||
*--------------------------------------
|
||
* $42-$47 ProDOS Block Device Drivers Main
|
||
* $5E-$C8 RESERVED APPLESOFT Main/Aux (ROM Call, no need to switch back MainZP)
|
||
*--------------------------------------
|
||
* 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 -> $03D0
|
||
*--------------------------------------
|
||
*** $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
|