-- RandomCode.mesa last edited by Sturgis: May 15, 1984 11:31:58 am PDT
DIRECTORY
IO USING[STREAM];
RandomCode: CEDAR DEFINITIONS =
BEGIN
GenerateRandomProgramBytes: PROCEDURE[
initialByteAddress: INT,
randomSeed: CARDINAL,
seeOneByte: PROC[[0..255]],
dribble: IO.STREAM];
-- this procedure generates 2^16 different programs.
-- randomSeed controls which program is to be generated
-- the programs are assumed to be stored starting at virtual word address initialByteAddress/4
-- initialByteAddress is assumed to be 0 MOD 4
-- the program and data bytes are delivered one at a time to the caller via seeOneByte
-- If dribble is non NIL, then a lot of informative text will be delivered to dribble, one byte at a time.
-- it is assumed that after the programs have been placed in virtual memory, execution will continue at initialByteAddress
END.
MODULE HISTORY
Initial by: Sturgis, May 15, 1984 11:32:21 am PDT