Hardware manual

let stack = empty
while n gr 1 do
[ let stkent = Allocate(FactZone, size STKENT/wordsize)
stkent>>STKENT.link = stack
stkent>>STKENT.value = n
stack = stkent
n = n-1
]
let value = 1
while stack ne empty do
[ value = value*(stack>>STKENT.value)
let stkent = stack
stack = stkent>>STKENT.link
Free(FactZone, stkent)
]
resultis value
]
and StkOvfl(Zone, nil, Length) = valof
[ unless SpareIsAvail do
[ Ws("Aargh! Stack stuck!")
finish
]
AddToZone(FactZone, Spare, 37)
SpareIsAvail = false
resultis Allocate(FactZone, Length)
]
Alloc February 19, 1979 7:23 PM 50
For Xerox Internal Use Only -- December 15, 1980