2018-11-23 16:20:19 +00:00
|
|
|
|
NEW
|
2019-05-15 05:46:12 +00:00
|
|
|
|
AUTO 3,1
|
2018-11-23 16:20:19 +00:00
|
|
|
|
*--------------------------------------
|
2021-04-29 11:56:34 +00:00
|
|
|
|
ZPPtr1 .EQ 0
|
|
|
|
|
ZPPtr2 .EQ 2
|
|
|
|
|
ZPPtr3 .EQ 4
|
|
|
|
|
ZPPtr4 .EQ 6
|
2018-11-23 16:20:19 +00:00
|
|
|
|
|
2021-04-29 11:56:34 +00:00
|
|
|
|
pFD .EQ 8
|
|
|
|
|
pDRV .EQ 10
|
|
|
|
|
pIOCTL .EQ 12
|
|
|
|
|
pIOBuf .EQ 14
|
2018-11-23 16:20:19 +00:00
|
|
|
|
*--------------------------------------
|
2019-01-04 13:17:31 +00:00
|
|
|
|
ZPMEMMGR .EQ $10
|
|
|
|
|
*--------------------------------------
|
2020-12-15 13:23:22 +00:00
|
|
|
|
*SIGNFLG .EQ $16 COS,SIN,TAN
|
2018-11-23 16:20:19 +00:00
|
|
|
|
*--------------------------------------
|
2020-12-15 13:23:22 +00:00
|
|
|
|
* XMov / XFer
|
2018-11-23 16:20:19 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
A1L .EQ $3C
|
|
|
|
|
A2L .EQ $3E
|
|
|
|
|
A4L .EQ $42
|
|
|
|
|
|
2020-02-14 07:21:56 +00:00
|
|
|
|
*XFer.JMP .EQ $3ED
|
2018-11-23 16:20:19 +00:00
|
|
|
|
|
2020-12-15 13:23:22 +00:00
|
|
|
|
XMov .EQ $C311
|
2018-11-23 16:20:19 +00:00
|
|
|
|
XFer .EQ $C314 CS:M->X, VS:Use Aux ZP
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* $42-$47 ProDOS Block Device Drivers Main
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.BLK.Cmd .EQ $42
|
2021-04-29 11:56:34 +00:00
|
|
|
|
*DRV.BLK.UnitNum .EQ $43
|
|
|
|
|
*DRV.BLK.Buf .EQ $44
|
|
|
|
|
*DRV.BLK.BlkNum .EQ $46
|
2018-11-23 16:20:19 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* $5E-$C8 RESERVED APPLESOFT Main/Aux (ROM Call, no need to switch back MainZP)
|
|
|
|
|
*--------------------------------------
|
2019-06-28 15:15:58 +00:00
|
|
|
|
*INDEX .EQ $5E ->$5F LOAD.FAC.FROM.YA
|
2019-08-01 14:59:15 +00:00
|
|
|
|
*DEST .EQ $60 ->$61 used in FCOMP
|
2019-01-04 13:17:31 +00:00
|
|
|
|
RESULT .EQ $62 ->$66 used in FMULT FDIV
|
2019-07-03 15:25:07 +00:00
|
|
|
|
TMP32.Sign .EQ RESULT
|
|
|
|
|
TMP32 .EQ RESULT+1
|
2019-01-04 13:17:31 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
ZPTMP .EQ $67 ->$84 29 bytes
|
|
|
|
|
*--------------------------------------
|
2019-10-28 06:32:12 +00:00
|
|
|
|
* X.UNPAK temp ZP (with ZPPtr1 &ZPPtr2)
|
|
|
|
|
*--------------------------------------
|
2020-11-19 15:34:02 +00:00
|
|
|
|
.DUMMY UNPAK
|
2019-10-28 06:32:12 +00:00
|
|
|
|
.OR ZPTMP
|
|
|
|
|
ZPInBufPtr .BS 2
|
|
|
|
|
ZPOutBufPtr .BS 2
|
|
|
|
|
|
|
|
|
|
ZPnCnt .BS 2
|
|
|
|
|
ZPInMask .BS 1
|
|
|
|
|
ZPBLOfsLBits .BS 1
|
|
|
|
|
ZPBLOfsHBits .BS 1
|
|
|
|
|
ZPBLLenBits .BS 1
|
|
|
|
|
.ED
|
|
|
|
|
*--------------------------------------
|
2019-08-01 14:59:15 +00:00
|
|
|
|
FORPNT .EQ $85 ->$86 Used in GETFAC
|
2018-11-23 16:20:19 +00:00
|
|
|
|
FAC .EQ $9D ->$A1
|
|
|
|
|
FAC.SIGN .EQ $A2
|
2019-07-03 15:25:07 +00:00
|
|
|
|
* FAC.EXTENSION .EQ $AC
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
ACC32.Sign .EQ FAC
|
|
|
|
|
ACC32 .EQ FAC+1
|
|
|
|
|
*--------------------------------------
|
2018-11-23 16:20:19 +00:00
|
|
|
|
ARG .EQ $A5 -> $A9 (5 bytes)
|
|
|
|
|
ARG.SIGN .EQ $AA
|
2019-07-03 15:25:07 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
ARG32.Sign .EQ ARG
|
|
|
|
|
ARG32 .EQ ARG+1
|
|
|
|
|
*--------------------------------------
|
2019-01-04 13:17:31 +00:00
|
|
|
|
* CHARGET .EQ $B1
|
|
|
|
|
* CHARGOT .EQ $B7
|
2018-11-23 16:20:19 +00:00
|
|
|
|
TXTPTR .EQ $B8
|
|
|
|
|
*--------------------------------------
|
2020-11-19 15:34:02 +00:00
|
|
|
|
.DUMMY
|
2021-03-11 21:40:55 +00:00
|
|
|
|
.OR FAC 12 Bytes
|
2020-11-19 15:34:02 +00:00
|
|
|
|
BIN.R.CS.Start .BS 2
|
|
|
|
|
BIN.R.CS.End .BS 2
|
|
|
|
|
BIN.R.End .BS 2
|
|
|
|
|
BIN.R.Size .BS 2
|
|
|
|
|
BIN.R.Offset .BS 2
|
|
|
|
|
BIN.R.Stop .BS 2
|
|
|
|
|
.ED
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR ZPDRV
|
|
|
|
|
ENV.BufPtr .BS 1
|
|
|
|
|
ENV.VarEndChar .BS 1
|
|
|
|
|
ENV.bNoExp .BS 1
|
|
|
|
|
ENV.bExp .BS 1
|
|
|
|
|
.ED
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
2021-03-11 21:40:55 +00:00
|
|
|
|
.OR ZPTMP 6 Bytes
|
|
|
|
|
BIN.hMem .BS 1
|
2020-11-19 15:34:02 +00:00
|
|
|
|
PS.bTXT .BS 1
|
|
|
|
|
PS.hMem .BS 1
|
|
|
|
|
PS.MemPtr .BS 2
|
|
|
|
|
PS.hFILE .BS 1
|
|
|
|
|
.ED
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR ZPTMP+8 7 Bytes
|
|
|
|
|
PS.Flags .BS 1
|
|
|
|
|
PS.ArgV .BS 2
|
|
|
|
|
PS.ArgSize .BS 2
|
|
|
|
|
PS.NewPSPtr .BS 2
|
|
|
|
|
.ED
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
2020-12-15 13:23:22 +00:00
|
|
|
|
.OR ZPTMP+20 6 Bytes
|
2020-11-19 15:34:02 +00:00
|
|
|
|
IO.Open.FLAGS .BS 1
|
|
|
|
|
IO.Open.TYPE .BS 1
|
|
|
|
|
IO.Open.AUXTYPE .BS 2
|
|
|
|
|
IO.hFD .BS 1
|
2021-07-24 20:42:23 +00:00
|
|
|
|
IO.hFILE .BS 1
|
2020-11-19 15:34:02 +00:00
|
|
|
|
.ED
|
2018-11-23 16:20:19 +00:00
|
|
|
|
*--------------------------------------
|
2021-05-04 17:31:21 +00:00
|
|
|
|
SaveSM .EQ $100 Aux
|
|
|
|
|
SaveSX .EQ $101 Aux
|
|
|
|
|
*FOUTBufPtr .EQ $102 Aux
|
|
|
|
|
FOUTBuf .EQ $103 Aux
|
2018-11-23 16:20:19 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* 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-12-21 14:32:45 +00:00
|
|
|
|
Evt.Table .EQ $0340 K.EVT.MAX*S.EVT=4*8=32b
|
2018-11-23 16:20:19 +00:00
|
|
|
|
K.S.IOCTL .EQ $0360 9 bytes
|
|
|
|
|
K.MLI.PATH .EQ $0369 64+1
|
2020-05-28 21:13:52 +00:00
|
|
|
|
K.MLI.PARAMS .EQ $03AA Main, 18 bytes min for GetFileInfo
|
|
|
|
|
* GetFileInfoEx/SetFileInfoEx need 1 + 2 + 48 = 51
|
2018-11-23 16:20:19 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
K.STACKTOP .EQ $03ED XFer !!! down to $3E0
|
|
|
|
|
*--------------------------------------
|
2018-12-17 07:02:03 +00:00
|
|
|
|
*** $3F0-$3FF IRQ Handler.... ***
|
2018-11-23 16:20:19 +00:00
|
|
|
|
*--------------------------------------
|
2019-01-04 13:17:31 +00:00
|
|
|
|
SYS.BASL0 .EQ $400
|
|
|
|
|
*--------------------------------------
|
2018-12-17 07:02:03 +00:00
|
|
|
|
* Main/Aux $400 -> $7FF : TXT PAGE1 Screens
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* MemMgr : $0800->$0FFF MAIN/AUX (2 kBytes)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Mem.LoMem .EQ $0800
|
|
|
|
|
Mem.Free .EQ $0802
|
|
|
|
|
Mem.HiMem .EQ $0804
|
|
|
|
|
Mem.LastSlot .EQ $0806
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* free $1000->$1FFF = $1000 (4096) Aux
|
2018-11-23 16:20:19 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
*** Z80 Reserved $1000-10FF***
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Z80CODE .EQ $1000 (00000h) Up To $10FF
|
|
|
|
|
Z80STACK .EQ $10FF (000FFh) Down to $1000
|
|
|
|
|
*--------------------------------------
|
2021-07-24 20:42:23 +00:00
|
|
|
|
K.Buf256 .EQ $1100 512 bytes....
|
2018-11-23 16:20:19 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-24 20:42:23 +00:00
|
|
|
|
K.IOBuf .EQ $1200 ....for ReadDir
|
2018-11-23 16:20:19 +00:00
|
|
|
|
*--------------------------------------
|
2019-07-26 14:23:07 +00:00
|
|
|
|
Mem.MHiMem .EQ A2osX.SYSCALL
|
2020-01-31 16:12:25 +00:00
|
|
|
|
Mem.XLoMem .EQ $1000
|
2020-01-21 07:34:32 +00:00
|
|
|
|
Mem.XHiMem .EQ $A000
|
2018-11-23 16:20:19 +00:00
|
|
|
|
DevMgr.HiMem .EQ $FFFA Protect IRQ vectors in Aux LC
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
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
|
|
|
|
|
H.BIN.V .EQ 5
|
|
|
|
|
H.BIN.F .EQ 6
|
|
|
|
|
H.BIN.CS.SIZE .EQ 8
|
|
|
|
|
H.BIN.DS.SIZE .EQ 10
|
|
|
|
|
H.BIN.SS.SIZE .EQ 12
|
|
|
|
|
H.BIN.ZP.SIZE .EQ 13
|
2018-12-17 14:24:39 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-13 16:39:24 +00:00
|
|
|
|
S.DCB.TTY.DEVID .EQ 0
|
2021-05-04 17:31:21 +00:00
|
|
|
|
S.DCB.TTY.S .EQ 1
|
|
|
|
|
S.DCB.TTY.M .EQ 2
|
|
|
|
|
S.DCB.TTY.M.ESC .EQ 2
|
|
|
|
|
S.DCB.TTY.M.CSI .EQ 4
|
|
|
|
|
S.DCB.TTY.M.IAC .EQ 6
|
|
|
|
|
S.DCB.TTY.M.G0 .EQ 8
|
|
|
|
|
S.DCB.TTY.M.G1 .EQ 10
|
2018-12-13 16:39:24 +00:00
|
|
|
|
S.DCB.TTY.CH .EQ 3
|
2019-12-04 13:46:58 +00:00
|
|
|
|
S.DCB.TTY.CH.SAVE .EQ 4
|
|
|
|
|
S.DCB.TTY.CV .EQ 5
|
|
|
|
|
S.DCB.TTY.CV.SAVE .EQ 6
|
2019-05-14 16:04:16 +00:00
|
|
|
|
|
2019-12-04 13:46:58 +00:00
|
|
|
|
S.DCB.TTY.SCROLLTOP .EQ 7
|
|
|
|
|
S.DCB.TTY.SCROLLBOT .EQ 8
|
|
|
|
|
S.DCB.TTY.bCURON .EQ 9
|
|
|
|
|
S.DCB.TTY.bTITLE .EQ 10
|
2019-05-14 16:04:16 +00:00
|
|
|
|
|
2019-12-04 13:46:58 +00:00
|
|
|
|
S.DCB.TTY.bNORMAL .EQ 11
|
2023-04-22 18:58:37 +00:00
|
|
|
|
S.DCB.TTY.bDECAWM .EQ 12
|
|
|
|
|
S.DCB.TTY.bLNM .EQ 13
|
2019-05-25 19:24:07 +00:00
|
|
|
|
|
2019-12-04 13:46:58 +00:00
|
|
|
|
S.DCB.TTY.bG0G1 .EQ 14
|
|
|
|
|
S.DCB.TTY.bG0G1ALT .EQ 15
|
2019-05-25 19:24:07 +00:00
|
|
|
|
|
|
|
|
|
S.DCB.TTY.OUTTAIL .EQ 16
|
|
|
|
|
S.DCB.TTY.OUTHEAD .EQ 17
|
2021-04-29 11:56:34 +00:00
|
|
|
|
S.DCB.TTY.INBUF .EQ 18
|
|
|
|
|
S.DCB.TTY.INBUF.MAX .EQ 31
|
|
|
|
|
S.DCB.TTY.OUTBUF .EQ 32
|
|
|
|
|
S.DCB.TTY.OUTBUF.MAX .EQ 64
|
2018-12-10 16:45:37 +00:00
|
|
|
|
*
|
2019-06-10 08:19:13 +00:00
|
|
|
|
S.DCB.TTY .EQ 64
|
2018-12-13 16:39:24 +00:00
|
|
|
|
*--------------------------------------
|
2020-01-20 07:23:51 +00:00
|
|
|
|
S.MD5.ABCD0 .EQ 0
|
|
|
|
|
S.MD5.A0 .EQ 0
|
|
|
|
|
S.MD5.B0 .EQ 4
|
|
|
|
|
S.MD5.C0 .EQ 8
|
|
|
|
|
S.MD5.D0 .EQ 12
|
|
|
|
|
S.MD5.BITCOUNT .EQ 16
|
|
|
|
|
S.MD5.EXTRABIT .EQ 24
|
|
|
|
|
S.MD5.FINALIZED .EQ 25
|
|
|
|
|
*
|
|
|
|
|
S.MD5 .EQ 26
|
|
|
|
|
*--------------------------------------
|
2018-11-23 16:20:19 +00:00
|
|
|
|
MAN
|
2020-12-15 13:23:22 +00:00
|
|
|
|
SAVE usr/src/sys/kernel.s.def
|
|
|
|
|
LOAD usr/src/sys/kernel.s
|
2018-11-23 16:20:19 +00:00
|
|
|
|
ASM
|