; LevFilePointers.asm
; Copyright Xerox Corporation 1979
; Last modified December 9, 1978  6:49 AM by Boggs

.ent LevFilePointers, EnumerateFp

.ent fpSysDir, fpDiskDescriptor
.ent fpSysFont, fpUserCm, fpComCm, fpRemCm
.ent fpSysBoot, fpExecutive

.ent sysFontHeight, sysFontSize, sysDisplayLines

	.srel

LevFilePointers:.LevFilePointers
EnumerateFp:	.EnumerateFp

fpSysDir:	.fpSysDir
fpDiskDescriptor: .fpDiskDescriptor
fpSysFont:	.fpSysFont
fpUserCm:	.fpUserCm
fpComCm:	.fpComCm
fpRemCm:	.fpRemCm
fpSysBoot:	.fpSysBoot
fpExecutive:	.fpExecutive

sysFontHeight:	0
sysFontSize:	0
sysDisplayLines:0

	.nrel

lFP = 5.	; fp block
maxLengthFn = 39.
maxLengthFnInWords = (maxLengthFn+2)/2

.LevFilePointers: 0

; .fpSysDir to .fpExecutive should only be FP's -- see EnumerateFp, below
.fpSysDir:	.blk lFP
.fpDiskDescriptor: .blk lFP
.fpSysFont:	.blk lFP
.fpUserCm:	.blk lFP
.fpComCm:	.blk lFP
.fpRemCm:	.blk lFP
.fpSysBoot:	.blk lFP
.fpExecutive:	.blk lFP


; EnumerateFp(proc)
; Not re-entrant because we can't assume GetFrame is around.

.EnumerateFp:
	sta 3 EnRet	; save return address
	sta 0 EnProc
	lda 0 @EnFirst
eLoop:	sta 0 EnCurrent
	jsr @EnProc
	  1
	lda 0 EnLFp
	lda 3 EnCurrent
	add 3 0
	lda 1 @EnLast
	se 0 1
	 jmp eLoop
	lda 3 EnRet
	jmp 1,3

EnRet:		.blk 1
EnProc:		.blk 1
EnCurrent:	.blk 1
EnFirst:	fpSysDir
EnLast:		fpExecutive
EnLFp:		lFP