DataMuseum.dk

Presents historical artifacts from the history of:

DANOSI

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DANOSI

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦0b11ec948⟧ TextFile

    Length: 9532 (0x253c)
    Types: TextFile
    Names: »RTPSTDO.ENV«

Derivation

└─⟦bc8c51924⟧ Bits:30010506 DVBS1.SW2114 DANOSI SW2114 Disk 1/1 Real Time Pascal Compiler Rel. 2.23 PN: 708-66-088
    └─⟦this⟧ »RTPSTDO.ENV« 

TextFile

\f


$listoff
stdenv;     (* standard environment       TOG 870927 *)

(***** PREDEFINED CONSTANTS *****)
CONST
maxint = 32767;
minint = -32768;


(***** PREDEFINED TYPES *****)
TYPE

buffer(bufsize: 0..maxint) =
      ARRAY (0..bufsize - 1) OF BYTE;

conn_service = (cs_normal, cs_high);

type create_result = (create_ok, no_memory);
prio_type=129..254;

dataarea(offset, top: 0..maxint) =
        ARRAY(offset..top - 1) OF BYTE;

event_type = (not_event, message_event, answer_event,
              process_removed, port_closed, disconnected,
              letter_sent, letter_arrived,
              local_connect, remote_connect,
              reset_indication, reset_completion,
              credit, data_sent, data_arrived, data_overrun,
              dummy_letter, dummy_lcnct, dummy_rcnct,
              dummy_rindic, dummy_rcmpl, dummy_credit,
              dummy_sent, dummy_arrived);

type link_result=(link_ok, file_not_found, file_not_object, no_men,
                  missing_subprogram, already_linked, external_not_found);

mem_type = ( MEM_PRIVATE, MEM_DUALPORT, MEM_BORD );

reason_type = (reason_ok, reason_name, reason_resource,
               reason_closed, reason_network);

scope_type = (anonymous, local, regional, global);

string(length: 0..255) = ARRAY(1..length) OF char;

type unlink_result = (unlink_ok, no_program_linked, existing_incarnations);

wait_result = (a_buffer, a_delay);

(* shielded type declarations *)
(******************************)

mailbox_ = record
  mbx:          WORD;
  s:            INTEGER;
  next:         ^integer; --^mailbox_
end;

pool_ = record
  mbx:          WORD;
  s:            WORD;
  size:         INTEGER;
  mem:          BYTE;
  bufs:         WORD;
  next:         ^integer; --^pool_
end;

process_ = record
  proc:         WORD;
  next:         ^integer; --^process_
end;

reference_ = record
  topbuf:       WORD;
  locked:       INTEGER;
  next:         ^integer; --^reference_
end;

chain_ = record
  curbuf:       WORD;
  locked:       INTEGER;
  start:        WORD;
  length:       WORD;
  next:         ^integer; --^chain_
end;

port_ = record
  prt:          WORD;
  state:        BYTE;
  next:         ^integer; --^port_
end;

program_descriptor= record
  state:        BYTE;
  paramdesc:    ^word;
  poolparam:    BYTE;
  LBDR:         ^integer; --^extenal_lbdr
  prgname:      array(1..13) of char;
  count:        WORD;
  paramptr:     ^word;
  noparams:     BYTE;
  next:         ^integer; --program_descriptor
end;


(*****  PREDEFINED ROUTINES  *****)
(*********************************)



function abs(n: integer): 0..maxint;
openroutine;

function allocpool(var p: pool; no_of_bufs, bufsize: 0..maxint;
mem: mem_type): 0..maxint;
external;

procedure breakpoint;
openroutine;

function bufcount(var r: reference): 0..maxint;
openroutine;

function bufsize(var r: rtype    ): 0..maxint;
openroutine;

function int(v: byte ): integer; openroutine;
function wrd(v: integer): word;   (* !!!?? skal fjernes !! *)
openroutine;

function byt(v: integer): byte;    openroutine;
function chr(v: 0..255): char;    openroutine;
function int(v: word ): integer; openroutine;
function ord(v: btype): 0..255;  openroutine;
function ord(v: wtype): integer; openroutine;
function wrd(v: integer): word;
openroutine;

function bytecount(var r: rtype   ): 0..maxint;
openroutine;

procedure chaindown(var ch: chain);
external;

procedure chainextract(var ch: chain;var ref: reference);
external;

procedure chaininsert(var ch: chain;var ref: reference);
external;

function chainlength(var ch: chain): 0..maxint;
openroutine;

procedure chainreset(var ch: chain);
external;

procedure chainstart(var ch: chain);
external;

procedure chainup(var ch: chain);
external;

(* chr see byt *)

function create(inspect incname: string; var prog: program_descriptor;
     var pr: process; size: 0..maxint; prio: prio_type): create_result;
external;

function creditcount(var r: reference): 0..255;
openroutine;

procedure dec(var v: byte);
openroutine;

procedure dec(var v: word);
openroutine;

procedure delay(ms: 0..maxint);
external;

function equal_home(var a: rtype    ; var b: rtype    ): boolean;
openroutine;

function eventkind(var r: rtype): event_type;
openroutine;

procedure getbuf(var p: pool; var ra: mailbox; var r: reference);
external;

function getbufdelay(var p:pool; var ra: mailbox; var r:reference; 
                     ms: 0..maxint): wait_result;
external;

function homeless(var r: rtype    ): boolean; external;

function hometest(var p: pool; var r:rtype): boolean;
openroutine;

procedure inc(var v:byte);
openroutine;

procedure inc(var v:word);
openroutine;

function index(var r:reference): 0..255;
openroutine;

(**
function initpool(var r:reference): 0..maxint;
external;
**)

(* int see byt *)

function input_byte(ioport: word): byte;
openroutine;

function input_word(ioport: word): word;
openroutine;

function link(inspect incname: string;var prog: program_descriptor): 
              link_result;
external;
 
function locked(var m:mailbox): boolean;
openroutine;

procedure new(var p: ptype); external;

function nil(var p:ptype  ): boolean;
openroutine;

function nil(var p:reference): boolean;
openroutine;

function nil(var p:process): boolean;
openroutine;

function offset(var r:rtype    ): 0..maxint;
openroutine;

function open(var m:mailbox): boolean;
openroutine;

(* ord see byt *)

procedure output_byte(ioport: word; data: byte);
openroutine;

procedure output_word(ioport: word; data: word);
openroutine;

function own_name(var name:string): 0..255;
external;

function own_priority: byte;
openroutine;

procedure set_priority(prio: 0..255);
openroutine;

function own_stack_bound: word;
openroutine;

function own_stack_size: word;
openroutine;

function passive(var m:mailbox): boolean;
openroutine;

procedure pop(var s,b: reference);
external;

function pred(v: btype): btype;
openroutine;

function pred(v: wtype): wtype;
openroutine;

function priority(var p: process): byte;
openroutine;

function process_name(var name: string; var p: process): 0..255;
external;

procedure push(var s,b: reference);
external;

procedure putbuf(var r: reference);
external;

function reason(var r:reference): reason_type;
openroutine;

function releasepool(var p:pool; bufs: 1..maxint): 0..maxint;
external;

procedure remove(var pr: process);
external;

procedure resetevent(var r: rtype);
openroutine;

procedure resume(var pr: process);
external;

procedure return(var r:reference);
external;

procedure setbytecount(var r: rtype    ; v: 0..maxint);
openroutine;

procedure setoffset(var r: rtype    ; v: 0..maxint);
openroutine;

procedure settop(var r: rtype    ; v: 0..maxint);
openroutine;

procedure setu1(var r: rtype    ; v: 0..255);
openroutine;

procedure setu2(var r: rtype    ; v: 0..255);
openroutine;

procedure setu3(var r: rtype    ; v: 0..255);
openroutine;

procedure setu4(var r: rtype    ; v: 0..255);
openroutine;

procedure signal(var m:mailbox; var r:reference);
external;

function stack_bound(var p: process): word;
openroutine;

function stackdepth(var r:reference  ): 0..maxint;
openroutine;

function stack_size(var p: process): word;
openroutine;

procedure stop(var p: process);
external;

function succ(v:btype): btype;
openroutine;

function succ(v:wtype): wtype;
openroutine;

function top(var r:rtype    ): 0..maxint;
openroutine;

procedure trace(f: integer);
external;

procedure dtrace(f: integer);
external;

procedure strace(f: integer);
external;

function u1(var r:rtype    ): 0..255;
openroutine;

function u2(var r:rtype    ): 0..255;
openroutine;

function u3(var r:rtype    ): 0..255;
openroutine;

function u4(var r:rtype    ): 0..255;
openroutine;

function rest_of_delay: integer;
openroutine;

function mailbox_state(var m:mailbox): integer;
openroutine;

function swop(n: word): word; openroutine;
function swop(n: integer): integer;
openroutine;

function data_segment(var r:rtype    ): word;
openroutine;

procedure enable;
openroutine;

procedure disable;
openroutine;


function unlink(var prog: program_descriptor): unlink_result; external;

procedure wait(var m: mailbox; var r:reference);
external;

function waitdelay(var m: mailbox; var r:reference;
                   ms: 0..maxint): wait_result;
external;

(* wrd see byt *)

procedure closeport(var p: port);
external;

procedure connect(var p:port; index:1..255; var compl, disc: reference;
                  inspect remote_name:string; service: conn_service);
external;
procedure disconnect(var p:port; index:1..255);
external;

procedure getconnection(var p:port; index:1..255; var compl, disc:reference);
external;

procedure getcredit(var p:port; index:1..255; var credbuf: reference);
external;

procedure getreset(var p:port; index:1..255; var indic: reference);
external;

function maxconnections:0..maxint;
external;

function maxlettersize:0..maxint;
external;

procedure openport(var p:port; var closebuf: reference;
                   inspect name:string; scope: scope_type;
                   no_of_cons: 0..255; rcv_all:boolean);
external;

procedure receive(var p:port; index:1..255; var databuf: reference);
external;

procedure receiveall(var p:port; var databuf: reference);
external;

procedure receiveletter(var p:port; var databuf: reference);
external;

procedure reset(var p:port; index:1..255; var compl: reference);
external;

procedure send(var p:port; index:1..255; var databuf: reference);
external;

procedure sendletter(inspect destination: string; var databuf: reference);
external;
.