	List	off
;
;*******************
;* General equates *
;*******************
;
wstart	equ	0	;Warm start vector.
iobyte	equ	3	;I/O byte.
cdos	equ	5	;Cdos entry point.
cbuff	equ	80h	;Command line buffer.
dfcb1	equ	5ch	;Default fcb 1.
dfcb2	equ	6ch	;Default fcb 2.
tbase	equ	100h	;Transient prog base.
version	equ	253h	;Current version.
;
;****************************
;* Cdos System call Equates *
;****************************
;
.abort	   equ	0
.conine	   equ	1
.conout	   equ	2
.rdrin	   equ	3
.punout	   equ	4
.lstout	   equ	5
.conio	   equ	6
.getiob	   equ	7
.setiob	   equ	8
.wrline	   equ	9
.rdline	   equ	0ah
.constat   equ	0bh
.deselold  equ	0ch
.reset	   equ	0dh
.select	   equ	0eh
.open	   equ	0fh
.close	   equ	10h
.search	   equ	11h
.findnxt   equ	12h
.delete	   equ	13h
.rdnext	   equ	14h
.wrnext	   equ	15h
.create	   equ	16h
.rename	   equ	17h
.getdiskv  equ	18h
.getcurr   equ	19h
.setbuff   equ	1ah
.getallo   equ	1bh
.setwpv	   equ	1ch
.getwpv	   equ	1dh
.setatrib  equ	1eh
.getdpar   equ	1fh
.usrcode   equ	20h
.rdrand	   equ	21h
.wrrand	   equ	22h
.filsize   equ	23h
.setrnd	   equ	24h
;
.conin	   equ	80h
.getusr	   equ	81h
.setabort  equ	82h
.rdlogic   equ	83h
.wrlogic   equ	84h
;
.format	   equ	86h
.dirupd	   equ	87h
.linkpgm   equ	88h
.mult	   equ	89h
.divd	   equ	8ah
.home	   equ	8bh
.eject	   equ	8ch
.version   equ	8dh
.setspec   equ	8eh
.setdate   equ	8fh
.getdate   equ	90h
.settime   equ	91h
.gettime   equ	92h
.setretur  equ	93h
.setattr   equ	94h
.rdlabel   equ	95h
.mtroff	   equ	96h
.setram	   equ	97h
.rdcurr	   equ	98h
.wrcurr	   equ	99h
.chkallo   equ	9ah
;
.dir	   equ	9ch
.setopt	   equ	9dh
.delext	   equ	9eh
.getmastr  equ	9fh
.rdtrk	   equ	0a0h
.wrtrk	   equ	0a1h
.deselect  equ	0a2h
;
;******************************
;* File Control Block offsets *
;******************************
;
f.dsk	   equ	0	;Disk specifier.
f.fn	   equ	1	;Filename.
f.fne	   equ	9	;File extension.
f.ent	   equ	0ch	;Dir entry count.
f.res1	   equ	0dh	;Reserved.
f.res2	   equ	0eh	;Reserved.
f.rcnt	   equ	0fh	;Record count.
f.cmap	   equ	10h	;Cluster map.
f.nxtrec   equ	20h	;Next record.
;
;*****************
;* Label offsets *
;*****************
;
l.id	   equ	81h	;Label identifier.
l.flg1	   equ	0	;Label flags (=l.id).
l.nam	   equ	1	;Label name.
l.mon	   equ	9	;Month.
l.day	   equ	0ah	;Day.
l.yr	   equ	0bh	;Year.
l.r.clust  equ	0ch	;Records / cluster.
l.flg2	   equ	0dh	;Flags.
	   ; Bit 7 set = 2 byte cluster ptr.
	   ; Bit 6 set = Extended file (hard).
	   ; Bit 5 set = Bitmap on disk (hard).
l.res	   equ	0eh	;Not used.
l.r.dir	   equ	0fh	;Records in directory.
l.cmap	   equ	10h	;Cluster map of dir.
;
;***************************
;* Directory entry offsets *
;***************************
;
e.mt	   equ	0e5h	;Empty entry flag.
e.attr	   equ	0	;Attribute flags.
e.fn	   equ	1	;Filename.
e.fne	   equ	9	;Filename extension.
e.ext	   equ	0ch	;Extent number.
e.r.hext   equ	0eh	;Recs in last extent.
			;(hard only).
e.r.ext	   equ	0fh	;Recs in last extent.
e.cmap	   equ	10h	;Cluster map.
;
;***************************
;* Disk Data table offsets *
;***************************
;
d.config   equ	0	;Drive configuration.
	   ; Bit     Set	  Reset
	   ;  0
	   ;  1    Dual Drive	Single Drive
	   ;  2
	   ;  3    Fast seek	Slow seek
	   ;  4    Hard		Floppy
	   ;  5    DD drive	SD drive
	   ;  6    DS drive	SS drive
	   ;  7    Rd after Wr	No Rd after Wr
	   ;
d.dconfig  equ	1	;Disk & drive config.
	   ; Bit     Set	  Reset
	   ;  0
	   ;  1
	   ;  2
	   ;  3    DT disk	ST disk
	   ;  4    DT drive	ST drive
	   ;  5    LG drive	SM drive
	   ;  6    DD disk	SD disk
	   ;  7    DS disk	SS disk
	   ;
d.lun	   equ	2	;Logical unit number.
d.lsttrk   equ	3	;Last track accessed.
;
d.r.clust  equ	5	;Records / Cluster.
d.fn$	   equ	6	;$ of function table.
d.epl	   equ	6
d.eph	   equ	7
d.lblk	   equ	8	;1st blk of file area.
d.lblkl	   equ	8
d.lblkh	   equ	9
d.dirent   equ	0ah	;No. of dir entries.
d.dentl	   equ	0ah
d.denth	   equ	0bh
;
d.attr	   equ	0dh	;Disk attributes.
d.label	   equ	0eh	;Disk label.(8 bytes).
;		16h
d.nclust   equ	1ah	;Clusters on disk.
;
d.sr.trk   equ	1eh	;sd records / track.
d.t.surf   equ	1fh	;Tracks / surface.
d.nsurf	   equ	21h	;Number of surfaces.
d.ddat$	   equ	22h
d.ddat$l   equ	22h	;$ of table for other
d.ddat$h   equ	23h	;half of dual drives.
d.alt$	   equ	24h
d.alt$l	   equ	24h	;$ of alternate track
d.alt$h	   equ	25h	;table.
d.nalt	   equ	26h	;Number of alt. tracks.
;
d.bmapblk  equ	2ah	;Block no. of bitmap.
d.bmbl	   equ	2ah	;2a=lsb,2c=msb
d.bmbm	   equ	2bh
d.bmbh	   equ	2ch
d.veloc	   equ	2dh	;Drive seek speed.
;
d.dr.trk   equ	2fh	;dd records / track.
d.month	   equ	30h	;Month on label.
d.day	   equ	31h	;Day on label.
d.year	   equ	32h	;Year on label.
d.r.sect   equ	33h	;Records / sector.
;
;**********************
;* User Table offsets *
;**********************
;
u.rl	   equ	0	;User L.
u.rh	   equ	1	;User H.
u.re	   equ	2	;User E.
u.rd	   equ	3	;User D.
u.rc	   equ	4	;User C.
u.rb	   equ	5	;User B.
u.rf	   equ	6	;User Flags.
u.ra	   equ	7	;User A.
u.rspl	   equ	8	;User stack pointer.
u.rsph	   equ	9
u.riff	   equ	0ah	;User interrupt stat.
u.curdsk   equ	0bh	;Current disk.
u.diskb	   equ	0ch	;Current disk buffer.
;
u.trap$	   equ	11h	;^C trap address.
;
u.prgret   equ	14h	;Program return code.
u.opts	   equ	15h	;User options.
u.lcnt	   equ	16h	;Console char count.
;
u.ddat$	   equ	23h	;$ of disk entry table.
u.mstdk	   equ	25h	;Master drive.
u.lstbdrv  equ	26h	;Last drive used in @.
u.ddiskb   equ	27h
u.sdiskb   equ	29h
;
u.pgmnam   equ	2dh	;Current Program name.
;
	list	on
; Cdos Equates inserted
