DynMemProg.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Created by Jean Gastinel, April 4, 1988 4:35:31 pm PDT
Bob Hagmann December 2, 1987 12:01:10 pm PST
This module change the Atom which contains the program to send the Data
DIRECTORY
Atom,DynaBusInterface,Rope; 
DynMemProg: 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[110]], -- for waiting DBus intit
Initialisation
LIST[$IOWrite0, C[1], L[TRUE], L[TRUE], C[0],C[28],C[28],C[28],C[22],C[22]],
$WaitMsgSent,
LIST[$Wait, C[9]], -- for snooping
LIST[$SendShOw,R["SO"]],
$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,0,0]],Q[[3,3,3,3]],Q[[2,2,2,2]],Q[[1,1,1,1]],Q[[0,0,0,0]]],
$WaitMsgSent,
$WaitMsgReceived, -- for the Echo
$WaitReply,
LIST[$WriteBlockRqst, Q[[0,0,0,0]],Q[[0,0,0,0]],Q[[1,1,1,1]],Q[[2,2,2,2]],Q[[3,3,3,3]]],
$WaitMsgSent,
$WaitMsgReceived, -- for the Echo
$WaitReply,
Circular Access Test
LIST[$Wait, C[2]],
LIST[$WriteBlockRqst, Q[[0,0,0,0]],Q[[3,3,3,3]],Q[[2,2,2,2]],Q[[1,1,1,1]],Q[[0,0,0,0]]],
$WaitMsgSent,
$WaitMsgReceived, -- for the Echo
$WaitReply,
LIST[$ReadBlockRqst, Q[[0,0,0,0]]],
$WaitMsgSent,
LIST[$Wait, C[9]], -- for snooping
LIST[$SendShOw,R["S"]],
$WaitMsgReceived, -- for the Echo
$WaitReply,
LIST[$WaitReadBlockRplyandCheck,Q[[3,3,3,3]],Q[[2,2,2,2]],Q[[1,1,1,1]],Q[[0,0,0,0]]],
LIST[$ReadBlockRqst, Q[[0,0,0,2]]],
$WaitMsgSent,
LIST[$Wait, C[9]], -- for snooping
LIST[$SendShOw,R["O"]],
$WaitMsgReceived, -- for the Echo
$WaitReply,
LIST[$WaitReadBlockRplyandCheck,Q[[2,2,2,2]],Q[[1,1,1,1]],Q[[0,0,0,0]],Q[[3,3,3,3]]],
LIST[$ReadBlockRqst, Q[[0,0,0,4]]],
$WaitMsgSent,
LIST[$Wait, C[9]], -- for snooping
LIST[$SendShOw,R["SO"]],
$WaitMsgReceived, -- for the Echo
$WaitReply,
LIST[$WaitReadBlockRplyandCheck,Q[[1,1,1,1]],Q[[0,0,0,0]],Q[[3,3,3,3]],Q[[2,2,2,2]]],
LIST[$ReadBlockRqst, Q[[0,0,0,6]]],
$WaitMsgSent,
$WaitMsgReceived, -- for the Echo
LIST[$WaitReadBlockRplyandCheck,Q[[0,0,0,0]],Q[[3,3,3,3]],Q[[2,2,2,2]],Q[[1,1,1,1]]],
LIST[$ReadBlockRqst, Q[[0,0,0,0]]],
$WaitMsgSent,
$WaitMsgReceived, -- for the Echo
LIST[$WaitReadBlockRplyandCheck,Q[[3,3,3,3]],Q[[2,2,2,2]],Q[[1,1,1,1]],Q[[0,0,0,0]]],
LIST[$ReadBlockRqst, Q[[0,0,0,0]]],
$WaitMsgSent,
$WaitMsgReceived, -- for the Echo
LIST[$WaitReadBlockRplyandCheck,Q[[3,3,3,3]],Q[[2,4,2,2]],Q[[1,1,1,1]],Q[[0,0,0,0]]],
$Nop,
LIST[$Jump, $Nop]
]];
END.