2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2017-09-25 15:50:33 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
2017-12-22 21:24:30 +00:00
|
|
|
|
AUTO 4,1
|
2017-09-25 15:50:33 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2017-10-18 15:32:56 +00:00
|
|
|
|
ZPKERNEL .EQ $0
|
2018-01-15 06:50:44 +00:00
|
|
|
|
ZPMEMMGR .EQ $10
|
2017-09-25 15:50:33 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-05 15:39:36 +00:00
|
|
|
|
ZPPtr1 .EQ ZPKERNEL
|
|
|
|
|
ZPPtr2 .EQ ZPKERNEL+2
|
|
|
|
|
ZPPtr3 .EQ ZPKERNEL+4
|
|
|
|
|
ZPPtr4 .EQ ZPKERNEL+6
|
|
|
|
|
|
2018-09-06 15:36:44 +00:00
|
|
|
|
pFD .EQ ZPKERNEL+10
|
|
|
|
|
pDRV .EQ ZPKERNEL+12
|
|
|
|
|
pIOCTL .EQ ZPKERNEL+12
|
2018-07-05 15:39:36 +00:00
|
|
|
|
pIOBuf .EQ ZPKERNEL+14
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
SYS.BASL0 .EQ $800
|
|
|
|
|
*--------------------------------------
|
2018-06-19 15:08:22 +00:00
|
|
|
|
* AuxMove / XFer
|
2017-12-07 16:33:39 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
A1L .EQ $3C
|
|
|
|
|
A2L .EQ $3E
|
|
|
|
|
A4L .EQ $42
|
|
|
|
|
|
|
|
|
|
XFer.JMP .EQ $3ED
|
|
|
|
|
|
|
|
|
|
AuxMove .EQ $C311
|
|
|
|
|
XFer .EQ $C314 CS:M->X, VS:Use Aux ZP
|
|
|
|
|
*--------------------------------------
|
2017-09-25 15:50:33 +00:00
|
|
|
|
* $42-$47 ProDOS Block Device Drivers Main
|
2017-10-16 15:41:48 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-06 14:42:20 +00:00
|
|
|
|
DRV.BLK.Cmd .EQ $42
|
|
|
|
|
DRV.BLK.UnitNum .EQ $43
|
|
|
|
|
DRV.BLK.Buf .EQ $44
|
|
|
|
|
DRV.BLK.BlkNum .EQ $47
|
|
|
|
|
*--------------------------------------
|
2017-09-25 15:50:33 +00:00
|
|
|
|
* $5E-$C8 RESERVED APPLESOFT Main/Aux (ROM Call, no need to switch back MainZP)
|
|
|
|
|
*--------------------------------------
|
2017-10-30 16:11:07 +00:00
|
|
|
|
SIGNFLG .EQ $16 COS,SIN,TAN
|
2017-10-18 15:32:56 +00:00
|
|
|
|
INDEX .EQ $5E ->$5F
|
2017-10-17 15:40:21 +00:00
|
|
|
|
FORPNT .EQ $85 ->$86
|
2017-10-30 16:11:07 +00:00
|
|
|
|
FAC .EQ $9D ->$A1
|
2017-10-31 15:25:16 +00:00
|
|
|
|
FAC.SIGN .EQ $A2
|
2018-05-22 06:01:05 +00:00
|
|
|
|
ARG .EQ $A5 -> $A9 (5 bytes)
|
|
|
|
|
ARG.SIGN .EQ $AA
|
2017-10-27 06:36:46 +00:00
|
|
|
|
*FAC.EXTENSION .EQ $AC
|
2017-10-16 15:41:48 +00:00
|
|
|
|
TXTPTR .EQ $B8
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* ROM Entry Point
|
|
|
|
|
*--------------------------------------
|
2017-10-26 16:01:54 +00:00
|
|
|
|
ROM.FSUB .EQ 0
|
|
|
|
|
ROM.FADD .EQ 2
|
2017-10-27 06:36:46 +00:00
|
|
|
|
ROM.LTOF .EQ 4
|
|
|
|
|
ROM.LOG .EQ 6
|
|
|
|
|
ROM.FMULT .EQ 8
|
2017-10-27 14:56:46 +00:00
|
|
|
|
ROM.SETARG .EQ 10
|
2017-10-27 06:36:46 +00:00
|
|
|
|
ROM.FDIV .EQ 12
|
2017-10-27 14:56:46 +00:00
|
|
|
|
ROM.SETFAC .EQ 14
|
2017-10-27 06:36:46 +00:00
|
|
|
|
|
2017-10-27 14:56:46 +00:00
|
|
|
|
ROM.GETFAC .EQ 16 Copy FAC to (FORPNT)
|
2017-10-27 06:36:46 +00:00
|
|
|
|
ROM.FCOMP .EQ 18
|
|
|
|
|
ROM.QINT .EQ 20
|
|
|
|
|
ROM.FIN .EQ 22
|
|
|
|
|
ROM.FOUT .EQ 24
|
|
|
|
|
ROM.SQR .EQ 26
|
|
|
|
|
ROM.PWR .EQ 28
|
|
|
|
|
ROM.EXP .EQ 30
|
|
|
|
|
|
|
|
|
|
ROM.COS .EQ 32
|
|
|
|
|
ROM.SIN .EQ 34
|
|
|
|
|
ROM.TAN .EQ 36
|
|
|
|
|
ROM.ATAN .EQ 38
|
2017-10-16 15:41:48 +00:00
|
|
|
|
*--------------------------------------
|
2017-09-25 15:50:33 +00:00
|
|
|
|
* 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
|
2018-07-19 15:33:55 +00:00
|
|
|
|
*K.S.DIB .EQ $0340 S.DIB=25 or higher depends on dev type
|
2018-06-19 15:08:22 +00:00
|
|
|
|
K.S.IOCTL .EQ $0360 9 bytes
|
2017-11-22 16:27:50 +00:00
|
|
|
|
K.MLI.PATH .EQ $0369 64+1
|
|
|
|
|
K.MLI.PARAMS .EQ $03AA Main, 18 bytes min for GetFileInfo (ATLK needs MORE!!!...32 max for now)
|
|
|
|
|
*--------------------------------------
|
2017-12-07 16:33:39 +00:00
|
|
|
|
K.STACKTOP .EQ $03ED XFer !!! down to $3E0
|
2017-09-25 15:50:33 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
*** $3F0-$3FF IRQ Handler.... ***
|
|
|
|
|
*--------------------------------------
|
2018-07-10 15:33:13 +00:00
|
|
|
|
* Main/Aux $400 -> $7FF : TXT PAGE1 Console Screen
|
|
|
|
|
* Main/Aux $800 -> $BFF : TXT PAGE2 System Screen
|
2017-09-25 15:50:33 +00:00
|
|
|
|
*--------------------------------------
|
2017-11-22 16:27:50 +00:00
|
|
|
|
* free $0C00->$17FF = $C00 (3072) Aux
|
2017-11-17 16:16:05 +00:00
|
|
|
|
*--------------------------------------
|
2018-10-11 15:23:06 +00:00
|
|
|
|
Dev.Table.hPath .EQ $0C00 K.Dev.MAX
|
|
|
|
|
Dev.Table.hFD .EQ $0C20 K.Dev.MAX
|
2017-11-17 16:16:05 +00:00
|
|
|
|
*--------------------------------------
|
2018-10-11 15:23:06 +00:00
|
|
|
|
Nod.Table.hPath .EQ $0C40 K.NOD.MAX
|
|
|
|
|
Nod.Table.hFD .EQ $0C60 K.NOD.MAX
|
2018-09-20 15:33:05 +00:00
|
|
|
|
*--------------------------------------
|
2018-10-17 15:31:29 +00:00
|
|
|
|
PS.Table.PID .EQ $0C80 K.PS.MAX
|
|
|
|
|
PS.Table.hPS .EQ $0CA0 K.PS.MAX
|
2018-10-15 15:39:21 +00:00
|
|
|
|
PS.Table.Hits .EQ $0CC0 K.PS.MAX
|
|
|
|
|
PS.Table.Stats .EQ $0CE0 K.PS.MAX
|
2017-11-17 16:16:05 +00:00
|
|
|
|
*--------------------------------------
|
2018-04-23 06:03:23 +00:00
|
|
|
|
Evt.Table .EQ $0D60 K.EVT.MAX*S.EVT.SIZE=4*8=32b
|
2017-09-25 15:50:33 +00:00
|
|
|
|
*--------------------------------------
|
2017-11-22 16:27:50 +00:00
|
|
|
|
Flt.Table .EQ $0D80 K.FLT.MAX*S.FLT.SIZE=4*32=128b
|
2017-09-25 15:50:33 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-10 15:33:13 +00:00
|
|
|
|
K.Buf256 .EQ $0E00
|
2017-09-25 15:50:33 +00:00
|
|
|
|
*--------------------------------------
|
2018-05-22 06:01:05 +00:00
|
|
|
|
K.IOBuf .EQ $0F00
|
|
|
|
|
*--------------------------------------
|
2017-11-22 16:27:50 +00:00
|
|
|
|
*** Z80 Reserved $1000-10FF***
|
2017-09-25 15:50:33 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-04 14:59:12 +00:00
|
|
|
|
Z80CODE .EQ $1000 (00000h) Up To $10FF
|
2017-11-22 16:27:50 +00:00
|
|
|
|
Z80STACK .EQ $10FF (000FFh) Down to $1000
|
2017-09-25 15:50:33 +00:00
|
|
|
|
*--------------------------------------
|
2017-11-22 16:27:50 +00:00
|
|
|
|
* CORE $1100->$17FF = $700 Main
|
2017-09-25 15:50:33 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* MemMgr : $1800->$1FFF MAIN/AUX (2 kBytes)
|
|
|
|
|
*--------------------------------------
|
2017-10-27 06:36:46 +00:00
|
|
|
|
Mem.Table .EQ $1800 Slot 0 is Reserved
|
|
|
|
|
Mem.LoMem .EQ $1800
|
|
|
|
|
Mem.Free .EQ $1802
|
|
|
|
|
Mem.HiMem .EQ $1804
|
|
|
|
|
Mem.LastSlot .EQ $1806
|
2017-09-25 15:50:33 +00:00
|
|
|
|
*--------------------------------------
|
2017-10-27 06:36:46 +00:00
|
|
|
|
Mem.MLoMem .EQ $2000
|
|
|
|
|
Mem.MHiMem .EQ $BD00
|
|
|
|
|
Mem.XLoMem .EQ $2000
|
|
|
|
|
Mem.XHiMem .EQ $C000
|
2017-09-25 15:50:33 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
DevMgr.HiMem .EQ $FFFA Protect IRQ vectors in Aux LC
|
|
|
|
|
*--------------------------------------
|
2018-07-05 15:39:36 +00:00
|
|
|
|
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.CPU .EQ 4
|
|
|
|
|
H.BIN.CPU.6502 .EQ $60
|
|
|
|
|
H.BIN.CPU.65C02 .EQ $61
|
|
|
|
|
H.BIN.CPU.65R02 .EQ $62
|
|
|
|
|
H.BIN.CPU.65816 .EQ $63
|
2018-09-11 13:32:56 +00:00
|
|
|
|
H.BIN.V .EQ 5
|
|
|
|
|
H.BIN.F .EQ 6
|
|
|
|
|
H.BIN.CS.SIZE .EQ 8
|
2018-07-05 15:39:36 +00:00
|
|
|
|
H.BIN.DS.SIZE .EQ 10
|
|
|
|
|
H.BIN.SS.SIZE .EQ 12
|
|
|
|
|
H.BIN.ZP.SIZE .EQ 13
|
|
|
|
|
*
|
|
|
|
|
H.BIN.EXE.REL.TABLE .EQ 16
|
|
|
|
|
*
|
2018-07-17 15:45:59 +00:00
|
|
|
|
H.BIN.DRV.REL.TABLE .EQ 2 Including main jmp
|
2018-07-05 15:39:36 +00:00
|
|
|
|
*--------------------------------------
|
2017-09-25 15:50:33 +00:00
|
|
|
|
MAN
|
2018-08-08 15:13:37 +00:00
|
|
|
|
SAVE INC/KERNEL.I
|
2017-09-25 15:50:33 +00:00
|
|
|
|
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
|
|
|
|
ASM
|