DynCacheProg0.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Created by Jean Gastinel, July 5, 1988 4:22:25 pm PDT
Pradeep Sindhu May 10, 1988 8:59:52 pm PDT
DIRECTORY
Atom,DynaBusInterface,Rope; 
DynCacheProg0: CEDAR PROGRAM
IMPORTS Atom
EXPORTS
~ BEGIN
Quad: TYPE = DynaBusInterface.Quad;
Cmd: TYPE = DynaBusInterface.Cmd;
L: PROC [c: BOOL] RETURNS [rc: REF ANY] = {rc ← NEW[BOOL ← c]};
C: PROC [c: CARD] RETURNS [rc: REF ANY] = {rc ← NEW[CARD ← c]};
Q: PROC [c: Quad] RETURNS [rc: REF ANY] = {rc ← NEW[Quad ← c]};
Com: PROC [c: Cmd] RETURNS [rc: REF ANY] = {rc ← NEW[Cmd ← c]};
R: PROC [c: Rope.ROPE] RETURNS [rc: REF ANY] = {rc ← NEW[Rope.ROPE ← c]};
Atom.PutProp[$Simul2Sender, $PKList, LIST[
$Init,
$StartStop,
$ReceiveAll,   
LIST[$Wait, C[200]], -- for waiting DBus intit
Initialize memory controller
LIST[$IOWrite0, C[1], L[TRUE], L[TRUE], C[0],C[28],C[28],C[28],C[22],C[22]],
$WaitMsgSent,
$WaitMsgReceived, -- for the Echo
$WaitReply,
LIST[$IOWrite1, C[1],C[10],C[0],C[0]],
$WaitMsgSent,
$WaitMsgReceived, -- for the Echo
$WaitReply,
LIST[$IOWrite2, C[1],C[10],C[0]],
$WaitMsgSent,
$WaitMsgReceived, -- for the Echo
$WaitReply,
LIST[$WriteBlockRqst, Q[[0,0,0011H,2233H]],Q[[0,0,0,0]],Q[[1,1,1,1]],Q[[2,2,2,2]],Q[[3,3,3,3]]],
$WaitMsgSent,
LIST[$WriteBlockRqst, Q[[0,0,0004H,5123H]],Q[[0,0,0,0]],Q[[1,1,1,1]],Q[[2,2,2,2]],Q[[3,3,3,3]]],
$WaitMsgSent,
LIST[$WriteBlockRqst, Q[[0,0,0AH,1B2CH]],Q[[0,0,054H,3210H]],Q[[1,1,1,1]],Q[[2,2,2,2]],Q[[3,3,3,3]]],
$WaitMsgSent,
LIST[$WriteBlockRqst, Q[[0,0,04H,5128H]],Q[[0,0,054H,3210H]],Q[[1,1,1,1]],Q[[2,2,2,2]],Q[[3,3,3,3]]],
$WaitMsgSent,
LIST[$WriteBlockRqst, Q[[0,0,04H,5130H]],Q[[0,0,054H,3210H]],Q[[1,1,1,1]],Q[[2,2,2,2]],Q[[3,3,3,3]]],
$WaitMsgSent,
LIST[$WriteBlockRqst, Q[[0,0,04H,5138H]],Q[[0,0,054H,3210H]],Q[[1,1,1,1]],Q[[2,2,2,2]],Q[[3,3,3,3]]],
$WaitMsgSent,
LIST[$WriteBlockRqst, Q[[0,0,04H,5140H]],Q[[0,0,054H,3210H]],Q[[1,1,1,1]],Q[[2,2,2,2]],Q[[3,3,3,3]]],
$WaitMsgSent,
LIST[$WriteBlockRqst, Q[[0,0,04H,5148H]],Q[[0,0,054H,3210H]],Q[[1,1,1,1]],Q[[2,2,2,2]],Q[[3,3,3,3]]],
$WaitMsgSent,
LIST[$WriteBlockRqst, Q[[0,0,04H,5150H]],Q[[0,0,054H,3210H]],Q[[1,1,1,1]],Q[[2,2,2,2]],Q[[3,3,3,3]]],
$WaitMsgSent,
LIST[$WriteBlockRqst, Q[[0,0,04H,5158H]],Q[[0,0,054H,3210H]],Q[[1,1,1,1]],Q[[2,2,2,2]],Q[[3,3,3,3]]],
$WaitMsgSent,
LIST[$WriteBlockRqst, Q[[0,0,04H,5160H]],Q[[0,0,054H,3210H]],Q[[1,1,1,1]],Q[[2,2,2,2]],Q[[3,3,3,3]]],
$WaitMsgSent,
LIST[$WriteBlockRqst, Q[[0,0,04H,5168H]],Q[[0,0,054H,3210H]],Q[[1,1,1,1]],Q[[2,2,2,2]],Q[[3,3,3,3]]],
$WaitMsgSent,
LIST[$WriteBlockRqst, Q[[0,0,04H,5170H]],Q[[0,0,054H,3210H]],Q[[1,1,1,1]],Q[[2,2,2,2]],Q[[3,3,3,3]]],
$WaitMsgSent,
Now lets pretend to be a Map Cache
$Loop,
$WaitMapRqst,  
LIST[$MapReply, C[0FH]],
LIST[$Jump, $Loop]
]];
END.