-- AlarmTest.mesa

DIRECTORY
  Mopcodes USING [zMISC];

AlarmTest: PROGRAM =
BEGIN

  -- Operate the Dorado muffler/manifold system.
  RWMufMan: PROCEDURE [MufManArg] RETURNS [MufManResult] = MACHINE CODE
    BEGIN Mopcodes.zMISC, 246B; END;

  MufManArg: TYPE = MACHINE DEPENDENT RECORD [
    useDMD: BOOLEAN,
    unused: [0..7] ← NULL,
    dMuxAddr: [0..7777B]];

  MufManResult: TYPE = MACHINE DEPENDENT RECORD [
    dMuxData: [0..1],
    unused: [0..77777B]];

  Halt: PROC [data: UNSPECIFIED] = MACHINE CODE { Mopcodes.zMISC, 252B };

  [] ← RWMufMan[[useDMD: TRUE, dMuxAddr: 2263B]];
  Halt[3];


END.