DataMuseum.dk

Presents historical artifacts from the history of:

Bogika Butler

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

See our Wiki for more about Bogika Butler

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦083e5cdc1⟧ TextFile

    Length: 12160 (0x2f80)
    Types: TextFile
    Names: »COMDEF.BAK«

Derivation

└─⟦8592db80f⟧ Bits:30009789/_.ft.Ibm2.50007350.imd Mogens Pelles Zilog 80,000 / EOS projekt
    └─⟦this⟧ »COMDEF.BAK« 

TextFile

(*
***********************************************************************
*                       Copyright 1984 by                             *
*                       NCR Corporation                               *
*                       Dayton, Ohio  U.S.A.                          *
*                       All Rights Reserved                           *
***********************************************************************
*                       EOS Software produced by:                     *
*                       NCR Systems Engineering - Copenhagen          *
*                       Copenhagen                                    *
*                       DENMARK                                       *
***********************************************************************
*                       EOS Software rewritten by:                    *
*                       Lars G. Jakobsen                              *
*                       Metanic Aps.                                  *
*                       DK-3660 Stenloese                             *
*                       DENMARK                                       *
*                                                                     *
*                       Copyright 1986 by Metanic Aps.                *
***********************************************************************
*)
(*

This file defines constants, data types and primitive operations
on abstract datatypes.
     Names of constants and fields of structures complies with the
names used by NCR secp in the Motorola EXORmacs 680000 implementation
of the kernel.

*)

   TYPE
      RefStore = long;       (* Used to represent assembler chaining
                                fields instead of ordinary pascal
                                pointers *)


(*---------------------------------------------------------------------
  CHAIN AND MEMBER   *)

   TYPE
      ChainType = RECORD
         Next: RefStore;         (* next element, always meaningful *)
         Prev: RefStore;         (* previous element, always meaningful *)
        END;

      MemberType = RECORD
         Chain: ChainType;
         Ch_hold: RefStore;      (* Addr of structure holding chain head *)
        END;

   CONST
      Ch_siz = 4;            (* Number of word in chain *)
      Member = 6;            (* Number of word in member element *)

(*---------------------------------------------------------------------
  SIZE TYPE  *)

   TYPE
      SizeType = RECORD
         UserPart: long;     (* no. of bytes in user part *)
         KnelPart: word;     (* no. of bytes in kernel part *)
        END;

   CONST
      Sz_siz = 6;            (* size of size type *)
      Sz_typ = 3;            (* number of words in size type *)

(*--------------------------------------------------------------------
  POINTER AND FORMAL POINTER  *)

   TYPE
      PointerKindType =
         (pt_nil   (* nil   often set with clear instruction *)
         ,pt_obj   (* refObj                                 *)
         ,pt_env   (* refEnv  ( <= pt_env means simple ref)  *)
         ,pt_own   (* ownSet                                 *)
         ,pt_man   (* manSet                                 *)
         ,pt_int   (* interrupt pointer, always local (refers to a code segment)*)
         ,pt_mmu   (* mmuDescription ref to object (not a real pointer)         *)
         ,pt_seg   (* segmentDescription ref to object (not a real pointer)     *)
         );
      (* VOID argument encoded as 6 = pt_mmu. Used for argument check *)
         pt_voi = (.pt_int..pt_seg.); (* *** ??? *** *)

      PointerInfoKindType = (interrupt_pointer, non_interrupt_pointer);

      PointerInfoBaseType =
         (* Comments describe the meaning of the elements belonging to the set *)
         (.pt_lsc     (* 0 local scope pointer *)
          ,pt_tsc     (* 1 temp scope pointer  *)
          ,pt_fsc     (* 2 formal scope pointer *)
          ,pt_cc      (* 3 simple pointer with call capability (0 if nil) *)
          ,pt_con     (* 4 manager enforces copy control (0 if nil) *)
          ,pt_io      (* 5 simple pointer with io-lock (0 if nil) *)
          ,pt_res     (* 6 simple pointer with resident lock (0 if nil ) *)
          ,pt_ret     (* 7 formal return pointer (also=1 for dummy actual) *)
         .)

      PointerInfoSetType = SET of PointerInfoBaseType;

      PointerInfoType = RECORD

         (* The Pascal interpretation of PointerInfoType is based on
            the declarations in kernel.comdef.sa page 2 and the usage
            shown at entry simplpt of kernel.mmprocs.sa page 41. *)

      CASE PointerInfoKindType OF
      interrupt_pointer:        (* For interrupt pointers all bits of pt_inf
                                   represent the interrupt vector number *)
         (pt_inf: byte
         );
      non_interrupt_pointer:
         (pt_inf: PointerInfoSetType
         )
        END;


      PointerCommonPartType = RECORD
         Pointer: memberType;
                   (* ownset and manset: pointer -> obj or env
                      refobj and refenv: obj or env -> pointer
                      nil: empty chain.
                      ch_hold (named pt_ref):
                      ownset, manset, nil: not used.
                      refobj and refenv: addr of obj or env.
                   *)
         pt_kin: PointerKindType;
                  (* pointer kind. See above *)
         pt_inf: PointerInfoType;
                 (* pointer inf. See above. pt_kin+pt_inf=word *)
        END;

      PointerFormalPartType = RECORD
         (* part only present for formal pointers *)
         fp_act: memberType; (* actual: env or ctx -> formal pointer
                                ch_hold (named fp_str):
                                addr of env or ctx structure, 0 if dummy
                             *)
         fp_off: word;       (* actual pointer offset within env or ctx *)
        END;

      PointerType = RECORD
         Common: PointerCommonPartType
        END;

      FormalPointerType = RECORD
         Common: PointerCommonPartType;
         Formal: PointerFormalPartType
        END;

   CONST
      pt_siz = sizeof(PointerCommonPartType);
                             (* size of non-formal pointer *)
      fp_siz = sizeof(FormalPointerType);
                             (* size of formal pointer *)
         (* fp_siz must be less than or equal to fp_pow2 = 32 *)
      fp_pow2 = 32;
      pt_mask = (2**15)/fp_pow2 - 1;
                             (* mask for pointer index <= 2**15/fp_siz *)

(*--------------------------------------------------------------------
  OBJECT COMMON PART  *)

   TYPE
      ObjectKindType =
         (OB_GEOB  (* 0 General object *)
         ,OB_GAOB  (* 1 Gate object *)
         ,OB_COOB  (* 2 Condition object *)
         ,OB_OPOB  (* 3 Open object *)
         ,OB_DOOB  (* 4 Dormant object *)
         ,OB_PROB  (* 5 Process object *)
         ,OB_EXOB  (* 6 Extension object (Kind not visible to user) *)
         ,OB_SEOB  (* 7 Segment object (emb or non-emb, subsegm or root segm) *)
         ,OB_ALLO  (* 8 Allocate *)
         ,OB_SCHE  (* 9 Internal scheduler *)
         );

      ObjectStateBaseType =
         (OB_REEN  (* 0 Reentrant object (only general objects) *)
         ,OB_EMB   (* 1 Embedded object  (only general objects) *)
         ,OB_SUB   (* 2 Subsegment object *)
         ,OB_OCC   (* 3 Owner has call capability (only general objects) *)
         ,OB_READ  (* 4 Read allowed (only segment objects) *)
         ,OB_WRIT  (* 5 Write allowed (only segment objects) *)
         ,OB_EXEC  (* 6 Execute allowed (only segment objects) *)
         ,OB_ABOR  (* 7 Aborted object (General and segment objects) *)
         );

      ObjectStateType = SET OF ObjectStateBaseType;

   CONST
      OB_SEGM: ObjectStateType = (. OB_READ, OB_WRIT, OB_EXEC .);
      OB_SUBS: ObjectStateType = (. OB_SUB, OB_SEGM .);

   TYPE
      ObjectCommonPartType = RECORD
         Owner: MemberType;
                   (* Ownset -> Object
                      OB_Own = Ch_hold: addr. of owner env or ctx *)
         OB_Off: word;
                   (* Owner pointer offset in env or ctx
                      (0 for initial owner pointer) *)
         OB_Ref: ChainType;
                   (* Referred by: Object -> RefObj, SebSegm, MMUdescr *)
         OB_Res: word;
                   (* Resident Count: Non segment object = #res_pt
                      to object *)
         OB_SizK: word;
                   (* Size of kernel part (used also for emb obj) *)
         OB_Kin: ObjectKindType;
                   (* See above *)
         OB_Sta: ObjectStateType;
                   (* See above *)
         OB_Spa: RefStore;
(* *** ??? *** *)
                   (* Space descr: Top Object, abs. ddr.
                      Disagrees with size of object during
                      relocation (not used for embedded objects) *)
        END;


   CONST
      OB_Siz = sizeof(ObjectCommonPartType);

(*--------------------------------------------------------------------
  SPACE DESCRIPTION, PRESENT ONLY FOR NON-EMBEDDED OBJECTS
  ADDRESSES RELATIVE TO TOP OF KERNEL PART  See kernel.comdef.sa p 3. *)

   TYPE
      SpaceDescriptionType = RECORD
         Sp_env: ChainType;  (* Envelope stack: Object -> env *)
         Sp_fre: SizeType;   (* Free bytes. User and kernel part *)
         Sp_FirU: long;      (* First free. User part *)
         Sp_Firk: long;      (* First free. Kernel part *)
         Sp_SizU: long;      (* Total size. User part *)
        END;

(*--------------------------------------------------------------------
  GATE OBJECT  *)

   TYPE
      GateChainArrayIndexType =
         (GA_lok   (* Locking: Gate -> processes waiting on gate.lock *)
         ,GA_relok (* Relocking: Gate -> Processes relocking after being
                      signalled *)
         ,GA_splok (* Speed reloking: Gate -> Processes relocking after
                      speed up or time out *)
         );

      GateStateType =
         (open
         ,locked
         );

      GateLevelType =
         (Normal
         ,device1
         ,device2
         ,device3
         ,device4
         ,device5
         ,device6
         ,device7
         );


      ObjectGatePartType = RECORD
         GA_sch: PointerCommonPartType;
                   (* ObjRef to Scheduler obj or nil *)
         GA_set: ChainType;
                   (* ManSet: Gate -> Cond *)
         GA_array: ARRAY (. GateChainArrayIndexType .) OF ChainType;
         GA_sta: GateStateType; (* open = 0,  locked = 2**7=128 *)
(* *** ??? *** could it be boolean ??? *)
         GA_lev: GateLevelType
        END;

      GateObjectType = RECORD
         ObjectCommonPart: ObjectCommonPartType;
         ObjectGatePart: ObjectGatePartType
        END;

   CONST
      GA_siz = sizeof(GateObjectType);

(*--------------------------------------------------------------------
  CONDITION OBJECT  *)

   TYPE
      ObjectConditionPartType = RECORD
         CO_man: MemberType; (* Manager: manset in gate -> condition
                                CO_GA = ch_hold: addr. of managing
                                gate object. 0 when cond is aborted *)
         CO_wait: ChainType; (* Waiting: condition -> processes
                                waiting on cond.wait *)
        END;

      ConditionObjectType = RECORD
         CommonPert: ObjectCommonPartType;
         ConditionPart: ObjectConditionPartType
        END;

   CONST
      CO_Siz = sizeof(ConditionObjectType);

(*--------------------------------------------------------------------
  EXTENSION AND PROCESS OBJECT *)







(*--------------------------------------------------------------------
  *)



«eof»