-- AltoDefs.Mesa  Edited by Sandman on October 23, 1979  11:12 AM
-- Copyright  Xerox Corporation 1979, 1980

AltoDefs: DEFINITIONS =
  BEGIN

  wordlength: CARDINAL = 16; -- Alto word length (bits)

  maxword: CARDINAL = 177777B; -- N.B. negative as 16 bit number

  maxinteger: INTEGER = 077777B; -- maximum positive number

  charlength: CARDINAL = 8; -- Alto character size (bits)

  maxcharcode: CARDINAL = 377B;
  BYTE: TYPE = [0..maxcharcode];
  BytesPerWord, CharsPerWord: CARDINAL = wordlength/charlength;
  LogBytesPerWord, LogCharsPerWord: CARDINAL = 1;

  PageSize: CARDINAL = 256; -- Alto page size (words)

  LogPageSize: CARDINAL = 8;
  BytesPerPage, CharsPerPage: CARDINAL = PageSize*CharsPerWord;
  LogBytesPerPage, LogCharsPerPage: CARDINAL = LogPageSize + LogCharsPerWord;

  VMLimit: CARDINAL = 177777B; -- maximum Alto VM address

  Address: TYPE = [0..VMLimit];

  MaxMDSPage: CARDINAL = 377B;
  PagesPerMDS: CARDINAL = MaxMDSPage + 1;
  MaxVMPage: CARDINAL = 7777B;
  MaxFilePage: CARDINAL = 077777B;

  PageNumber: TYPE = [0..MaxFilePage];
  PageCount: TYPE = [0..MaxVMPage + 1];

  END.