(****************************************
*                                       *
*     MODULA-2 Multi-Pass Compiler      *
*     ****************************      *
*                                       *
*       VAX/VMS Implementation          *
*                                       *
*                                       *
*     MVCIO2:                           *
*                                       * 
*     Input / output handling in Pass 2 *
*                                       * 
*     Version 3.1 of  1-FEB-1983        *
*                                       *
*                                       *
*                                       *
*     based on PDP11 Implementation     *
*     Version M22 of 06.01.81           *
*                                       *
*     Institut fuer Informatik          *
*     ETH-Zuerich                       *
*     CH-8092 Zuerich                   *
*                                       *
****************************************)

(****************************************
* Updates: see implementation module    *
****************************************)

DEFINITION MODULE MVCIO2;     (* LG *)

  (* input and output handling in Pass2 *)

  FROM SYSTEM IMPORT WORD;
  FROM MVCompiler IMPORT Symbol, Spellix, Keyarr;

  EXPORT QUALIFIED
         sy,
         PutSy, PutWord, StopOutput, RestartOutput,
         Error, ErrorLS,
         line, pos, spix, maxspix, val, length,
         GetSy, PutGetSy,
         TermInOut,
         GetModuleKey, DefModStatus,
         AsciiSetPos, AsciiRead,
         SkipConstant, SkipType;

  CONST
    maxspix = 17777B; (* maximal value of legal spix *)

  VAR
    sy : Symbol;
    line : CARDINAL;
    pos : CARDINAL;
    spix : Spellix;
    val : CARDINAL;
    length : CARDINAL;  (* string length *)


  PROCEDURE PutSy(s : Symbol);
  (* put Symbol and pos on InterOutFile *)

  PROCEDURE PutWord(w : WORD);
  (* put word on InterOutFile *)

  PROCEDURE StopOutput;

  PROCEDURE RestartOutput;

  PROCEDURE Error(n: CARDINAL);
  (* no supression of writing on InterOutFile *)

  PROCEDURE ErrorLS(n: CARDINAL);

  PROCEDURE GetSy;

  PROCEDURE PutGetSy;

  PROCEDURE TermInOut;

  PROCEDURE GetModuleKey(VAR modkey: Keyarr);

  PROCEDURE DefModStatus;

  PROCEDURE AsciiSetPos(spix: Spellix);

  PROCEDURE AsciiRead(VAR ch: CHAR);

  PROCEDURE SkipConstant;
  (* skip a constant in a symbol module *)

  PROCEDURE SkipType;
  (* skip type structures in a symbol module *)

END MVCIO2.
