manifest[
DISKRO = 0
DISKWO = 1
DISKRW = 2
DISKROCH = 3
DISKWOCH = 4
DISKRWCH = 5
STRINGOPEN = 6
BIGSTRINGOPEN = 7
SPECIALOPEN = 8
	KEYSOPEN = 9
	DISPLAYOPEN = 10
	EIAINOPEN = 11
	EIAOUTOPEN = 12
 
 
// OBJECT TYPES
 
	DISKSTREAM = 1
	STRINGSTREAM = 2
	TTYSTREAM = 3; KEYBOARDSTREAM = TTYSTREAM
	FIDVEC = 4
	DISPLAYSTREAM = 5
	EIAINSTREAM = 6
	EIAOUTSTREAM = 7
 
// KEYBOARD SYMBOLS
 
	CTRL = 36	//CTRL KEY INDEX
	LSHIFTKEY = 41	//ETC.
	LOCK = 56
	RSHIFTKEY = 60
 
 
// BUGSYMS
 
PRV1 = -1; PRV2 = -2; PRVEC = -3; PRSTR = -4
PRVBUG1 = 1; PRVBUG2 = 2; PRVECBUG = 3; PRBUGSTR = 4
PRNIL = 0
]
 
external[
INITALTOIO
 
CREATES; CLOSES; GETS; PUTS
RESETS; PUTBACKS; ERRORS; ENDOFS; STATEOFS; MOVESTREAM
POSITIONPAGE; POSITIONPTR; READVEC
WRITEVEC; DISPLAY; GETCHAR; GETRW; PUTRW;GETCH
PUTCH; RESERVEOBJ; RETURNOBJ
DELETEAFILE; GETAFILE; OPENAFILE; CREATEAFILE
CLOSEAFILE; CALLSUBSYS; OVERWRITE; SAVESTATE
OVERLAY; RETURNSTACK; BMSG; WS; WL; WO
WSS; WOS; INCLUDES
MERRORPB
SYSERR; OPENS; MEM; INCMEM; ADDOBJ; DELOBJ
SYSTEMDIR; BSTORE; BMOVE; TOPOFMEMORY; USERNAME
BITTABLE; READNEXTPAGE; WRITEPAGE; FLUSHPAGE; EXECUTEDIO
REXQTCOUNT; BADPAGES; DELETEFILES; MAKENTRY; FINDHOLE
LOOKUPENTRY; ISIOERROR; FIRSTFREEPAGE; MAKEADDR; VIRTUALADDRESS
PAGESIN; PAGESOUT; PAGEOVERFLOW; KEYS; DSP; INITSWATRES; MOUSELINK
]
  
manifest[
	SPTR  = 0
	OPENX =  1 
	CLOSEX = 2 
	GETX = 3 
	PUTX = 4 
	RESETX = 5 
	PUTBACKX = 6 
	ERRORX = 7 
RELEASEPAGEX = 8
XQTDIOX = 9 
	RNPX = 10
	WRITEPGX = 11
	GETSTRNGBX = 12
	PUTSTRNGBX = 13
	PUTPBX = 14
	ALOCSTRMX = 15 
	DEALOCSTRMX = 16 
	BAKPGX = 17
	RSVOBJX = 18 
	RTNOBJX = 19 
	ZVECX = 20 
	GETCHX = 21
	PGINX =  22
	GETBSBX = 23 
	OPNSTRNGX = 24
	POSPNX = 25;		POSPTRX = 26
	FETCHKEYSX = 27;	FETCHDISPX = 30
	FETCHEINX = 28;		FETCHEOUTX = 29
	GETPBX = 31
	MOREFSX = 32
	INCMEMX = 33
	ADDOBJX = 34
	DELOBJX = 35
  
///////////////////↑↑↑↑↑↑↑↑↑↑↑
  
	PAGESIZE = 256; ENDOFSTREAM = #100000
	MAXNUMCHS = PAGESIZE * 2 
	IOERRBIT = #40000
 DIRENTRYSIZE = 9 
	BITTABLESIZE = ((203*2)*12)/16 +1
	STREAMPREAMBLESIZE = 15
	DISKSTREAMSIZE = 16 + 256 + STREAMPREAMBLESIZE
	DISPLAYSTREAMSIZE = 10 + STREAMPREAMBLESIZE
	DISPLAYLINESIZE = #775
	PAGE1DISKADDR = #521
	FORCEREAD = #44000
	FORCEWRITE = #44000 + #250
	READDISK = FORCEREAD + #120
	WRITEDISK = #44000 + #170
	MAXUNAMESIZE = 15*2-1
 
	] 
  
manifest[ERRCONS
// DEFINE SUNDRY ERROR RELATED CONSTANTS
	OK = 0 
	NOSTREAM = 1 
	NOSUCHSTREAM = NOSTREAM
	BADSTREAM = NOSTREAM 
	NOMORESTREAMS = 3
	PARAMTOOSMALL = 4
	PARAMTOOBIG = 5
	NOSUCHACT = 2
	BADPARAM = 6 
	ENDSTREAM = 7
	BADPUT = 8 
	BADGET = 9 
	BADPUTBACK = 10
	IOERROR = 11 
	BADSTATE = 12
	BADNAME = 13 
	NOSUCHENTRY =  14
	BADFILE = 15 
	NYI = 16 
	PAGENOTFULL = 17 
	PNTOOSMALL = 18
	BADDADDR = 19
	SPACEDOUT = 20 
	FILEEXISTS = 21
	TOOMANYOBJ = 22
  
//  PARAMETER INDEX CONSTANTS 
	PARAMETER1 = 1 lshift 8
	PARAMETER2 = 2 lshift 8
	PARAMETER3 = 3 lshift 8
	PARAMETER4 = 4 lshift 8
	PARAMETER5 = 5 lshift 8
	PARAMETER6 = 6 lshift 8
  
	]ERRCONS 
// SUBSYSTEM SYMBOLS
manifest[ERRNUMS
	STACKOVERLAY = 200 
	STACKTOOBIG = 201
	NOMORESTACK = 202
  
	EXISTINGINT = 220
	ALREADYACTIVE = 221
 
	]ERRNUMS 
  
manifest[ERRCLASS 
	CALLSX = 200 
	OVRLYX  = 201
	RTNSTKX = 202
	RDATX = 203
	INTSONX = 220
	INTSOFFX = 221
	]ERRCLASS