	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 *
;		******************************
;
	struct	0
f.dsk	   ds	1	;Disk specifier.
f.fn	   ds	8	;Filename.
f.fne	   ds	3	;File extension.
f.ent	   ds	1	;Dir entry count.
f.res1	   ds	1	;Reserved.
f.res2	   ds	1	;Reserved.
f.rcnt	   ds	1	;Record count.
f.cmap	   ds	10h	;Cluster map.
f.nxtrec   ds	1	;Next record.
f.size	   ds	0	;Size of fcb.
	mend
;
;		*****************
;		* Label offsets *
;		*****************
;
l.id	   equ	81h	;Label identifier.
	struct	0
l.flg1	   ds	1	;Label flags (=l.id).
l.nam	   ds	8	;Label name.
l.mon	   ds	1	;Month.
l.day	   ds	1	;Day.
l.yr	   ds	1	;Year.
l.r.clust  ds	1	;Records / cluster.
l.flg2	   ds	1	;Flags.
	   ; Bit 7 set = 2 byte cluster ptr.
	   ; Bit 6 set = Extended file (hard).
	   ; Bit 5 set = Bitmap on disk (hard).
l.res	   ds	1	;Not used.
l.r.dir	   ds	1	;Records in directory.
l.cmap	   ds	10h	;Cluster map of dir.
l.size	   ds	0	;Size of label.
	mend
;
;		***************************
;		* Directory entry offsets *
;		***************************
;
e.mt	   equ	0e5h	;Empty entry flag.
	struct	0
e.attr	   ds	1	;Attribute flags.
e.fn	   ds	8	;Filename.
e.fne	   ds	3	;Filename extension.
e.ext	   ds	1	;Extent number.
	   ds	1
e.r.hext   ds	1	;Recs in last extent.
			;(hard only).
e.r.ext	   ds	1	;Recs in last extent.
e.cmap	   ds	10h	;Cluster map.
e.size	   ds	0	;Size of entry
	mend
;
;		***************************
;		* Disk Data table offsets *
;		***************************
;
	struct	0
d.config   ds	1	;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  ds	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	   ds	1	;Logical unit number.
d.lsttrk   ds	1	;Last track accessed.
	   ds	1
d.r.clust  ds	1	;Records / Cluster.
d.fn$	   ds	2	;$ of function table.
d.fblk	   ds	2	;1st blk of file area.
d.dirent   ds	2	;No. of dir entries.
	   ds	1
d.attr	   ds	1	;Disk attributes.
d.label	   ds	8	;Disk label.
	   ds	4
d.nclust   ds	2	;clusters on disk ?
	   ds	2
d.sr.trk   ds	1	;sd records / track.
d.t.surf   ds	2	;Tracks / surface.
d.nsurf	   ds	1	;Number of surfaces.
d.ddat$	   ds	2	;$ of table for other
			;half of dual drives.
d.alt$	   ds	2	;$ of alt. track table.
d.nalt	   ds	1	;Number of alt. tracks.
	   ds	3
d.bblk	   ds	3	;Block no. of bitmap.
d.veloc	   ds	1	;Drive seek speed.
	   ds	1
d.dr.trk   ds	1	;dd records / track.
d.month	   ds	1	;Month on label.
d.day	   ds	1	;Day on label.
d.year	   ds	1	;Year on label.
d.r.sect   ds	1	;Records / sector.
d.size	   ds	0	;Disk table size.
	mend
;
;		**********************
;		* 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 ***
