-- Copyright (C) 1984  by Xerox Corporation. All rights reserved. 
-- Multibuser.mesa, HGM, 17-Jul-84 15:42:44

DIRECTORY
  DicentraInputOutput USING [Input, Output, RawRead, RawWrite, ReadHyper, WriteHyper],
  Multibus USING [Block, IOAddress, Page, RawAddress, wordsPerBlock, wordsPerPage];
 
Multibuser: PROGRAM IMPORTS DicentraInputOutput EXPORTS Multibus =
  BEGIN
  
  Error: PUBLIC ERROR [reason: LONG STRING] = CODE;

  Input: PUBLIC PROCEDURE [address: Multibus.IOAddress] RETURNS [word: UNSPECIFIED] =
    BEGIN
    RETURN[DicentraInputOutput.Input[address]];
    END;
  
  Output: PUBLIC PROCEDURE [word: UNSPECIFIED, address: Multibus.IOAddress] =
    BEGIN
    DicentraInputOutput.Output[word, address];
    END;
  
  RawRead: PUBLIC PROCEDURE [address: Multibus.RawAddress] RETURNS [word: UNSPECIFIED] =
    BEGIN
    RETURN[DicentraInputOutput.RawRead[address]];
    END;
    
  RawWrite: PUBLIC PROCEDURE [word: UNSPECIFIED, address: Multibus.RawAddress] =
    BEGIN
    DicentraInputOutput.RawWrite[word, address];
    END;

  RawReadPage: PUBLIC PROCEDURE [address: Multibus.RawAddress] RETURNS [page: Multibus.Page] =
    BEGIN
    DicentraInputOutput.ReadHyper[to: @page, from: address, words: Multibus.wordsPerPage];
    END;
    
  RawWritePage: PUBLIC PROCEDURE [page: Multibus.Page, address: Multibus.RawAddress] =
    BEGIN
    DicentraInputOutput.WriteHyper[from: @page, to: address, words: Multibus.wordsPerPage];
    END;

  RawReadBlock: PUBLIC PROCEDURE [address: Multibus.RawAddress] RETURNS [block: Multibus.Block] =
    BEGIN
    DicentraInputOutput.ReadHyper[to: @block, from: address, words: Multibus.wordsPerBlock];
    END;
    
  RawWriteBlock: PUBLIC PROCEDURE [block: Multibus.Block, address: Multibus.RawAddress] =
    BEGIN
    DicentraInputOutput.WriteHyper[from: @block, to: address, words: Multibus.wordsPerBlock];
    END;

  END..