-- Multibus.mesa, HGM, 17-Jul-84 15:41:12

Multibus: DEFINITIONS =
  BEGIN
  
  Error: ERROR [reason: LONG STRING];

  IOAddress: TYPE = LONG POINTER;
  HANDLEIOAddress: TYPE = IOAddress;
  
  RawAddress: TYPE = LONG POINTER;
  HANDLERawAddress: TYPE = RawAddress;
  
  -- Read/Write one word from specified IO Address
  Input: PROCEDURE [address: HANDLEIOAddress] RETURNS [word: UNSPECIFIED];
  Output: PROCEDURE [word: UNSPECIFIED, address: HANDLEIOAddress];
  
  -- Read/Write one word from specified real memory
  -- This allows access to memory beyond the addressing limits of the Map
  RawRead: PROCEDURE [address: HANDLERawAddress] RETURNS [word: UNSPECIFIED];
  RawWrite: PROCEDURE [word: UNSPECIFIED, address: HANDLERawAddress];
  
  -- Read/Write one page from specified real memory
  -- Faster than a word at a time
  wordsPerPage: CARDINAL = 256;
  Page: TYPE = ARRAY [0..wordsPerPage) OF UNSPECIFIED;
  RawReadPage: PROCEDURE [address: HANDLERawAddress] RETURNS [page: Page];
  RawWritePage: PROCEDURE [page: Page, address: HANDLERawAddress];
  
  -- Read/Write one block from specified real memory
  -- Blocks are bigger than pages - conviently the size of an Eiconix scan line
  wordsPerBlock: CARDINAL = 2048;
  Block: TYPE = ARRAY [0..wordsPerBlock) OF UNSPECIFIED;
  RawReadBlock: PROCEDURE [address: HANDLERawAddress] RETURNS [block: Block];
  RawWriteBlock: PROCEDURE [block: Block, address: HANDLERawAddress];
  
  END..