// Sys.Bk -- Link between OS and User programs
// Copyright Xerox Corporation 1979
// Last modified December 1, 1979  2:47 PM by Boggs
// Last index used: 300, no holes

// The ordering of static names in this file is the truth about which
//  Junta levels contain which procedures.
// The file names in which the statics are defined are in parentheses.
// They are all contained in <AltoSource>OsSources.dm or BFSSources.dm.
// .BRs for most are contained in <AltoSource>OSBrs.dm or BFSBrs.dm.

	0	// Main statics region

// These objects are in the OS stack below levMain and above user programs:
	sysFont			1	V
	dsp			2	V
	sysZone			221	V

// levMain (OsMain.bcpl, OsUtils.bcpl)
	CallSubsys		0	P	// Relocation base
	Wss			3	P
	Ws			4	P
	Wl			5	P
	Wns			6	P
	Wos			7	P
	Wo			10	P
	GetFixed		11	P
	FreeFixed		12	P
	FixedLeft		13	P
	SetEndCode		14	P
	Junta			15	P

// levDisplay (DspStreamsB.bcpl, DspStreamsA.asm)
	CreateDisplayStream	23	P
	CharWidth		24	P
	ResetLine		25	P
	FontHeight		26	P
	ShowDisplayStream	27	P
	GetFont			30	P
	SetFont			31	P
	GetBitPos		32	P
	SetBitPos		33	P
	GetLmarg		34	P
	SetLmarg		35	P
	GetRmarg		36	P
	SetRmarg		37	P
	GetLinePos		40	P
	SetLinePos		41	P
	InvertLine		42	P
	Scroll			43	P
	EraseBits		44	P

// levKeyboard (KeyStreamsB.bcpl, KeyStreamsA.asm)
	keys			45	V
	lvCursorLink		46	V
	SetKeyboardProc		47	P

// levDirectory (Dirs.bcpl)
	FindFdEntry		50	P
	MakeNewFdEntry		51	P
	DeleteFdEntry		52	P
	SetWorkingDir		53	P
	StripVersion		54	P
	AppendVersion		55	P
	OpenFile		56	P
	HelpOpenFile		56	P	// alias
	OpenFileFromFp		57	P
	DeleteFile		60	P
	HelpDeleteFile		60	P	// alias
	ParseFileName		155	P

// (RWDD.bcpl)
	WriteDiskDescriptor	61	P
	ReadDiskDescriptor	226	P

// levScan (DiskStreamsScan.bcpl)
	InitScanStream		257	P
	GetScanStreamBuffer	260	P
	FinishScanStream	261	P

// levStreams (FastStreamsB.bcpl, FastStreamsA.asm)
	InitializeFstream	62	P
	SetupFstream		63	P
	CurrentPos		64	P
	SetEof			65	P
	ItemSize		66	P
	Dirty			67	P
	SetDirty		70	P

// (DiskStreams.bcpl)
	CreateDiskStream	71	P
	ReadLeaderPage		72	P
	WriteLeaderPage		73	P
	TruncateDiskStream	100	P
	KsBufferAddress		106	P
	KsSetBufferAddress	107	P
	ReleaseKs		147	P
	LnPageSize		152	P
	KsGetDisk		153	P
	KsHintLastPageFa	154	P

// (DiskStreamsMain.bcpl)
	CleanupDiskStream	75	P
	WriteBlock		76	P
	ReadBlock		77	P
	PositionPtr		102	P
	SetLengthHint		300	P

// (DiskStreamsAux.bcpl)
	PositionPage		101	P
	JumpToFa		103	P
	GetCurrentFa		104	P
	GetCompleteFa		105	P
	FilePos			110	P
	SetFilePos		111	P
	FileLength		112	P

// (DummyLog.bcpl)
	MakeLogEntry		74	P	// dummy - deimplemented
	LogOpen			223	P	// dummy - deimplemented
	LogClose		224	P	// dummy - deimplemented

// levAlloc (Alloc.bcpl)
	InitializeZone		16	P
	HelpInitializeZone	16	P	// alias
	AddToZone		17	P
	HelpAddToZone		17	P	// alias
	Allocate		20	P	// actually Call0
	Free			21	P	// actually Call1
	CheckZone		22	P
	HelpCheckZone		22	P	// alias

// levBFSWrite (LevBFSWrite.asm)
	sysDisk			143	V
	diskKd			144	V

// (Calendar.asm)
	Timer			141	P
	SetCalendar		227	P
	SetDayTime		140	P	// same as SetCalendar
	ReadCalendar		230	P
	DayTime			142	P	// same as ReadCalendar

// (BFSWrite.bcpl)
	BFSWritePages		254	P
	BFSAssignDiskPage	255	P
	BFSSetStartingVDA	244	P	// dummy - deimplemented

// (BFSCreate.bcpl)
	BFSReleaseDiskPage	251	P
	BFSCreateFile		252	P
	BFSDeletePages		253	P

// (BFSClose.bcpl)
	BFSClose		232	P
	BFSWriteDiskDescriptor	233	P

// (BFSDDMgr.bcpl)
	BFSCreateDDMgr		234	P

// levBFSbase (BFSBase.bcpl)
	BFSVirtualDA		246	P
	BFSRealDA		247	P
	BfsInitializeCbStorage	145	P
	BfsDoDiskCommand	146	P
	BfsMakeFpFromLabel	156	P
	BfsGetCb		150	P
	BFSActOnPages		250	P
	BFSNonEx		245	P
	DefaultBfsErrorRtn	256	P

// (DVec.bcpl)
	Dvec			171	P
	DefaultArgs		172	P

// (BFSML.asm)
	MoveBlock		173	P
	Zero			174	P
	SetBlock		175	P
	BitBlt			231	P
	HelpBitBlt		231	P	// alias
	Usc			176	P
	Min			262	P
	Max			263	P
	Umin			264	P
	Umax			265	P
	DoubleAdd		177	P
	oneBits			200	P
	freePageFid		201	P
	freePageFp		202	P
	DisableInterrupts	217	P
	EnableInterrupts	220	P
	StartIO			225	P
	Idle			157	P
	lvIdle			160	V
	Noop			123	P
	TruePredicate		124	P
	FalsePredicate		125	P

// (BcplTricks.asm)
	FrameSize		203	P
	MyFrame			204	P
	CallersFrame		205	P
	FramesCaller		206	P
	CallFrame		207	P
	GotoFrame		210	P
	CoCall			211	P
	CoReturn		212	P
	ReturnTo		213	P
	GotoLabel		214	P
	RetryCall		215	P
	ReturnFrom		216	P

// (Calls.asm)
	Call0			126	P
	Call1			127	P
	Call2			130	P
	Call3			131	P
	Call4			132	P
	Call5			133	P
	Call6			134	P
	Call7			135	P
	Call8			136	P
	Call9			137	P
	Call10			266	P
	Call11			267	P
	Call12			270	P
	Call13			271	P
	Call14			272	P
	Call15			273	P

	Closes			113	P	// actually Call2
	Gets			114	P	// actually Call3
	Puts			115	P	// actually Call4
	Resets			116	P	// actually Call5
	Putbacks		117	P	// actually Call6
	Errors			120	P	// actually Call7
	Endofs			121	P	// actually Call8
	Stateofs		122	P	// actually Call9

	OpenDD			235	P	// actually Call0
	LockDD			236	P	// actually Call1
	ReadDDPage		237	P	// actually Call2
	UnlockDD		240	P	// actually Call3
	FlushDD			241	P	// actually Call4
	CloseDD			242	P	// actually Call5
	DestroyDDMgr		243	P	// actually Call6

	ActOnDiskPages		161	P	// actually Call0
	WriteDiskPages		162	P	// actually Call1
	CreateDiskFile		165	P	// actually Call2
	DeleteDiskPages		166	P	// actually Call3
	AssignDiskPage		163	P	// actually Call4
	ReleaseDiskPage		164	P	// actually Call5
	VirtualDiskDA		167	P	// actually Call6
	RealDiskDA		170	P	// actually Call7
	InitializeDiskCBZ	274	P	// actually Call9
	DoDiskCommand		275	P	// actually Call10
	GetDiskCb		276	P	// actually Call14
	CloseDisk		277	P	// actually Call15

// levStatics (BootInit.bcpl)
	lvSysErr		151	V
	lvSysZone		222	V


	100000		// Top Statics region

// levBcpl (LevBcpl.asm)

// levFilePointers (LevFilePointers.asm)
	EnumerateFp		0	P	// Relocation base
	fpSysDir		1	V
	fpSysBoot		2	V
	fpDiskDescriptor	3	V
//	available		4	V	// ** available **
//	available		5	V	// ** available **
	fpUserCm		6	V
	fpComCm			7	V
	fpRemCm			10	V
	fpExecutive		11	V
	fpSysFont		12	V
//	available		13	V	// ** available **
//	available		14	V	// ** available **

// levBuffer (LevBuffer.asm)
	OsBuffer		15	V

// levBasic (LevBasic.asm)
	EventVector		16	V
	UserName		17	V
	UserPassword		20	V
	OsFinish		21	P
	OsFinishCode		22	V
	OsVersion		23	V
	OsVersionCompatible	24	V
	OsFinishSafeAdr		25	V
	SerialNumber		26	V
	lvUserFinishProc	27	V
	SysErr			30	P
	CounterJunta		31	P
	juntaTable		45	V
	AltoVersion		46	V
	ErrorLogAddress		47	V

// (SwatResident.asm)
	CallSwat		32	P
	lvAbortFlag		33	V
	lvSwatContextProc	34	V

// (InOutLd.asm)
	OutLd			35	P
	InLd			36	P
	BootFrom		37	P
	DiskIOSetup		40	P
	DiskIOTransfer		41	P
	LastLdCB		44	V

// (ParityErrors.asm)
	lvParitySweepCount	43	V
	lvParityPhantomEnable	50	V

// (UpdateTimer.asm)
	UpdateTimer		42	P
	ClockSecond		51	V