A2osX/ProDOS.FX/ProDOS.S.txt

308 lines
7.3 KiB
Plaintext
Raw Normal View History

2019-10-16 06:09:13 +00:00
NEW
AUTO 3,1
2021-03-11 21:40:55 +00:00
.LIST OFF
.OP 65816
.OR $2000
.TF PRODOS.FX,TSYS
2019-11-10 18:28:06 +00:00
*--------------------------------------
2021-03-11 21:40:55 +00:00
READCAT .EQ 0 Boot Block read Catalog at $C00
2019-11-10 18:28:06 +00:00
ENHFILENAME .EQ 1
LOWERCASE .EQ 1
2019-12-06 07:15:51 +00:00
ACL .EQ 1
2020-08-30 17:50:57 +00:00
LOGO .EQ 1
2021-03-11 21:40:55 +00:00
*--------------------------------------
2021-06-11 17:25:09 +00:00
XRWDBG .EQ 0
2019-10-16 06:09:13 +00:00
*--------------------------------------
2020-05-23 18:45:32 +00:00
.INB inc/zp.i
.INB inc/io.i
.INB inc/io.d2.i
.INB inc/monitor.i
.INB inc/mli.i
.INB inc/mli.e.i
2019-10-16 06:09:13 +00:00
*--------------------------------------
MMStartUp .EQ $0202
NewHandle .EQ $0902
PtrToHand .EQ $2802
MessageCenter .EQ $1501
DisposeHandle .EQ $1002
MMShutDown .EQ $0302
ReadTimeHex .EQ $0D03
Int2Hex .EQ $220B
TLTextMountVolume .EQ $1201
*--------------------------------------
.MA SHORTMX
sep #$30
.EM
.MA SHORTM
sep #$20
.EM
.MA SHORTX
sep #$10
.EM
.MA LONGMX
rep #$30
.EM
.MA LONGM
rep #$20
.EM
.MA LONGX
rep #$10
.EM
*--------------------------------------
.MA IIGS
ldx ##]1
jsl $E10000
.EM
*--------------------------------------
P8QUIT .EQ $E0D000
GSOS .EQ $E100A8
GSOS2 .EQ $E100B0
2020-04-08 06:13:31 +00:00
OS_BOOT .EQ $E100BD indicates O/S initially booted
*--------------------------------------
2019-10-16 06:09:13 +00:00
lookptr .EQ $0A
idapple .EQ $0C model machine id
idxl .EQ $10 general use 16 bit index pointer
devid .EQ $12
src .EQ $12
dst .EQ $14
cnt .EQ $16
cde .EQ $18
ecde .EQ $1A
2020-08-30 17:50:57 +00:00
*--------------------------------------
2019-10-16 06:09:13 +00:00
pcl .EQ $3A
pch .EQ $3B
A1L .EQ $3C
A1H .EQ $3D
A2L .EQ $3E
A2H .EQ $3F
A3L .EQ $40
A4L .EQ $42
unitnum .EQ $43
buf .EQ $44 2-byte data buffer pointer which
2019-10-19 18:35:30 +00:00
*accsav .EQ $45 overlaps accsav (temp acc save byte)
2019-10-16 06:09:13 +00:00
bloknml .EQ $46 used mostly as 16 bit block # pointer
zpt .EQ $48 highly used zero page index pointer
datptr .EQ $4A ptr to data area of buffer.
sos .EQ $4C sos buffer pointer.
usrbuf .EQ $4E data ptr in user buffer.
* zero page variables for Bird's Better Bye
smparms .EQ $60 set mark parms
sm_refn .EQ $61 file reference number
fpos_lo .EQ $62 new file position (3 bytes)
fpos_mid .EQ $63
fpos_hi .EQ $64
lstpntr .EQ $65 device list pointer (16 bit)
valcnt .EQ $67 name counter
filecount .EQ $68 # of displayable files in directory
namelen .EQ $69 length of filename
gp_cnt .EQ $6A general purpose counter
dlevel .EQ $6B directory level
fnstore .EQ $6C filename storage pointer (16 bit)
entlen .EQ $6E directory entry length
entblk .EQ $6F directory entries/block
filecnt .EQ $70 directory file count (16 bit)
blkfl .EQ $72 block flag / file counter
topname .EQ $73 index # of top name in display
filetyps .EQ $74 128 byte table of filetypes
errnum .EQ $DE
*--------------------------------------
auxsp .EQ $0101
RAMXDRV .EQ $0200 load address for aux bank /RAM driver
inbuf .EQ $0200 keyboard buffer
pbuf .EQ $0280 prefix buffer
softev .EQ $03F2 RESET vector
pwredup .EQ $03F4 power up byte
nmivect .EQ $03FB nmi handler
2019-10-17 20:21:22 +00:00
2020-08-30 17:50:57 +00:00
vmode .EQ $04FB video firmware operating mode
2019-10-16 06:09:13 +00:00
ch80col .EQ $057B 80 column ch position
dbuf .EQ $0C00 8 page directory buffer
vblock1 .EQ $0E00 ramdisk directory block
volbuf .EQ $0F00 volume buffer
iobuf .EQ $1400 i/o buffer
fbuf .EQ $1800 FCB buffer
op_buf .EQ $1C00 open file buffer (selector)
sysentry .EQ $2000 .SYS file load address
xfer .EQ $C314
2020-09-17 05:43:06 +00:00
*--------------------------------------
2019-11-23 15:24:55 +00:00
pathbuf .EQ $D700
XDOS.ClockDrv .EQ $D742
prefixbuf .EQ $D742+125
2020-05-23 18:45:32 +00:00
*--------------------------------------
2020-09-18 15:06:12 +00:00
FCB.MAX .EQ 8
2020-05-28 21:13:52 +00:00
FCBs .EQ $D800
FCB.ID .EQ 0
2020-09-18 15:06:12 +00:00
FCB.DEVID .EQ 1 d_dev -> d_dev+5
FCB.DIRHBLK .EQ 2 2 bytes
FCB.DIREBLK .EQ 4 2 bytes
FCB.DIRENUM .EQ 6
2020-05-28 21:13:52 +00:00
FCB.STYPE .EQ 7
FCB.F .EQ 8
2020-07-17 15:18:31 +00:00
FCB.F.STMOD .EQ %00001000
FCB.F.UMOD .EQ %00010000
2020-09-17 05:43:06 +00:00
FCB.F.DBLKMOD .EQ %01000000
2020-07-17 15:18:31 +00:00
FCB.F.IBLKMOD .EQ %10000000
FCB.ACCESS .EQ 9
2020-05-28 21:13:52 +00:00
FCB.NLBYTE .EQ 10
FCB.BUFID .EQ 11
2020-07-17 15:18:31 +00:00
FCB.1stBLK .EQ 12 2 bytes
FCB.IBLK .EQ 14 2 bytes
FCB.DBLK .EQ 16 2 bytes
FCB.MARK .EQ 18 3 bytes
2020-07-16 06:18:17 +00:00
FCB.EOF .EQ 21 3 bytes
2020-07-17 15:18:31 +00:00
FCB.UBLK .EQ 24 2 bytes
2020-09-17 05:43:06 +00:00
2020-05-28 21:13:52 +00:00
FCB.FLEVEL .EQ 27
2020-07-17 15:18:31 +00:00
FCB.DIRTY .EQ 28
2020-09-17 05:43:06 +00:00
2020-05-28 21:13:52 +00:00
FCB.NLMASK .EQ 31
2020-07-17 06:04:08 +00:00
*
2020-05-28 21:13:52 +00:00
FCB .EQ 32
*--------------------------------------
2020-05-23 18:45:32 +00:00
VCBs .EQ $D900
2020-08-28 15:11:27 +00:00
* 6 free bytes
VCB0 .EQ 06 range $D906-$DA00
2020-05-28 21:13:52 +00:00
VCB.DEV .EQ 16
2020-07-16 06:18:17 +00:00
VCB.OFCNT .EQ 17
2020-08-28 06:23:27 +00:00
VCB.BMAP .EQ 18 2 bytes
VCB.TBLK .EQ 20 2 bytes
VCB.FBLK .EQ 22 2 bytes
2020-07-17 06:04:08 +00:00
VCB.BMAPIDX .EQ 24
2020-05-23 18:45:32 +00:00
*
2020-08-28 15:11:27 +00:00
VCB .EQ 25
2020-05-23 18:45:32 +00:00
*--------------------------------------
2019-10-16 06:09:13 +00:00
bmbuf .EQ $DA00 512 byte bitmap buffer
gbuf .EQ $DC00 general purpose 512 byte block buffer
*--------------------------------------
2019-11-01 20:06:04 +00:00
.DUMMY
.OR $10
ZPPtr1 .BS 2
ZPPtr2 .BS 2
ZPInBufPtr .BS 2
ZPOutBufPtr .BS 2
ZPnCnt .BS 2
ZPInMask .BS 1
ZPBLOfsLBits .BS 1
ZPBLOfsHBits .BS 1
ZPBLLenBits .BS 1
.ED
2019-10-16 06:09:13 +00:00
*--------------------------------------
2020-05-23 18:45:32 +00:00
.INB usr/src/prodos.fx/prodos.s.ldr
2019-11-10 18:28:06 +00:00
X.Unpak.XatYA sty ZPOutBufPtr
sta ZPOutBufPtr+1
lda PAKME.Table,x
sta ZPInBufPtr
lda PAKME.Table+1,x
2021-03-11 21:40:55 +00:00
sta ZPInBufPtr+1
2020-05-23 18:45:32 +00:00
.INB usr/src/shared/x.unpak.s
2020-08-30 17:50:57 +00:00
.DO LOGO
.INB usr/src/prodos.fx/prodos.s.logo
.FIN
2019-11-04 07:21:40 +00:00
*--------------------------------------
2019-11-01 20:06:04 +00:00
PAKME.Table
2020-05-25 13:58:59 +00:00
PAKME.ILDR .DA ILDR.PAK
PAKME.GP .DA GP.PAK
PAKME.XRW .DA XRW.PAK
PAKME.XDOS .DA XDOS.PAK
PAKME.IRQ .DA IRQ.PAK
PAKME.RAM .DA RAM.PAK
PAKME.RAMX .DA RAMX.PAK
PAKME.NCLK .DA NCLK.PAK
PAKME.TCLK .DA TCLK.PAK
PAKME.CCLK .DA CCLK.PAK
PAKME.SEL1 .DA SEL1.PAK
PAKME.SEL2 .DA SEL2.PAK
2019-10-16 06:09:13 +00:00
2020-05-25 13:58:59 +00:00
ILDR.PAK .DA #0
2019-11-01 20:06:04 +00:00
.DA ILDR.LEN
.PH $800
2020-05-23 18:45:32 +00:00
.INB usr/src/prodos.fx/prodos.s.ildr
2019-10-31 06:54:28 +00:00
.EP
2020-05-25 13:58:59 +00:00
GP.PAK .DA #0
2019-11-01 20:06:04 +00:00
.DA GP.LEN
.PH $BF00
2020-05-23 18:45:32 +00:00
.INB usr/src/prodos.fx/prodos.s.gp
2019-10-16 06:09:13 +00:00
.EP
2020-05-25 13:58:59 +00:00
XRW.PAK .DA #0
2019-11-01 20:06:04 +00:00
.DA XRW.LEN
.PH $D000
2020-05-23 18:45:32 +00:00
.INB usr/src/prodos.fx/prodos.s.xrw
2019-10-16 06:09:13 +00:00
.EP
2020-05-25 13:58:59 +00:00
XDOS.PAK .DA #0
2019-11-01 20:06:04 +00:00
.DA XDOS.LEN
.PH $DE00
2020-05-23 18:45:32 +00:00
.INB usr/src/prodos.fx/prodos.s.xdos.a
.INB usr/src/prodos.fx/prodos.s.xdos.b
.INB usr/src/prodos.fx/prodos.s.xdos.c
.INB usr/src/prodos.fx/prodos.s.xdos.d
.INB usr/src/prodos.fx/prodos.s.xdos.e
.INB usr/src/prodos.fx/prodos.s.xdos.f
2019-10-16 06:09:13 +00:00
.EP
2020-05-25 13:58:59 +00:00
IRQ.PAK .DA #0
2019-11-01 20:06:04 +00:00
.DA IRQ.LEN
.PH $FF9B
2020-05-23 18:45:32 +00:00
.INB usr/src/prodos.fx/prodos.s.irq
2019-11-01 20:06:04 +00:00
.EP
2020-05-25 13:58:59 +00:00
RAM.PAK .DA #0
2019-11-01 20:06:04 +00:00
.DA RAM.LEN
.PH $FF00
2020-05-23 18:45:32 +00:00
.INB usr/src/prodos.fx/prodos.s.ram
2019-11-01 20:06:04 +00:00
.EP
2020-05-25 13:58:59 +00:00
RAMX.PAK .DA #0
2019-11-01 20:06:04 +00:00
.DA RAMX.LEN
.PH $200
2020-05-23 18:45:32 +00:00
.INB usr/src/prodos.fx/prodos.s.ramx
2019-10-16 06:09:13 +00:00
.EP
2020-05-25 13:58:59 +00:00
NCLK.PAK .DA #0
2019-11-04 07:21:40 +00:00
.DA NCLK.LEN
2019-11-23 15:24:55 +00:00
.PH XDOS.ClockDrv
2020-05-23 18:45:32 +00:00
.INB usr/src/prodos.fx/prodos.s.nclk
2019-11-04 07:21:40 +00:00
.EP
2020-05-25 13:58:59 +00:00
TCLK.PAK .DA #0
2019-11-01 20:06:04 +00:00
.DA TCLK.LEN
2019-11-23 15:24:55 +00:00
.PH XDOS.ClockDrv
2020-05-23 18:45:32 +00:00
.INB usr/src/prodos.fx/prodos.s.tclk
2019-10-16 06:09:13 +00:00
.EP
2020-05-25 13:58:59 +00:00
CCLK.PAK .DA #0
2019-11-01 20:06:04 +00:00
.DA CCLK.LEN
2019-11-23 15:24:55 +00:00
.PH XDOS.ClockDrv
2020-05-23 18:45:32 +00:00
.INB usr/src/prodos.fx/prodos.s.cclk
2019-10-16 06:09:13 +00:00
.EP
2020-05-25 13:58:59 +00:00
SEL1.PAK .DA #0
2019-11-01 20:06:04 +00:00
.DA SEL1.LEN
.PH $1000
2020-05-23 18:45:32 +00:00
.INB usr/src/prodos.fx/prodos.s.sel1
2019-10-16 06:09:13 +00:00
.EP
2020-05-25 13:58:59 +00:00
SEL2.PAK .DA #0
2019-11-01 20:06:04 +00:00
.DA SEL2.LEN
.PH $1000
2020-05-23 18:45:32 +00:00
.INB usr/src/prodos.fx/prodos.s.sel2
2019-10-16 06:09:13 +00:00
.EP
2019-11-01 20:06:04 +00:00
*--------------------------------------
.AS "PAKME" TAG
.DA $2000 BIN ORG
2019-11-04 07:21:40 +00:00
.DA #12 Chunk Count
2019-11-01 20:06:04 +00:00
.DA PAKME.Table Chunks
2019-10-16 06:09:13 +00:00
*--------------------------------------
MAN
2020-05-23 18:45:32 +00:00
SAVE usr/src/prodos.fx/prodos.s
2019-10-16 06:09:13 +00:00
ASM