?? NEWTITLE := '~~~~~  common deck DSP$CALLVER', EJECT ??
{***********************************************************

{  Interface to 170 OS virtual environment resource program.

{***********************************************************

  VAR
   ver_request: ver_request_block;

  PROCEDURE [XREF] callver
    (VAR ver_request: ver_request_block;
         operation: ver_functions;
         wait: boolean);

  CONST
    nio_channel = 0,
    cio_channel = 1;

  CONST
    non_driver_pp = 0,
    driver_pp = 1,
    cio_cluster_0 = 2,
    cio_cluster_1 = 3,
    pair_of_pps = 4;

  TYPE
    ver_functions = (rscm, rspp, rsch, rseq, rtcm, rtpp, rtch, rteq, stcm,
                     stpp, stch, steq, stmr,
                     ifrc, rspt, rsct, rnpt, rnct, stpt, stct );

  TYPE
    iou_resource = PACKED RECORD
      primary: 0 .. 77(8),
      secondary: 0 .. 77(8),
      kind: 0 .. 7777(8),
      fill: 0 .. 77777777(8),
      status: 0 .. 7777(8),
    RECEND;

  TYPE
    eq_path = PACKED RECORD
      channel: 0 .. 77(8),
      equipment: 0 .. 77(8),
      unit: 0 .. 77(8),
      fill: 0 .. 7777777777(8),
      status: 0 .. 7777(8),
      fil1: 0 .. 77777777(8),
      equipment_type: 0 .. 7777(8),
      fil2: 0 .. 77777(8),
      est_ordinal: 0 .. 777(8),
    RECEND;

  TYPE
    cm_request_type = PACKED RECORD
      fill1: 0 .. 77777777777777(8),
      words_div_1000: 0 .. 777777(8),
      fill2: 0 .. 7777(8),
      fwa_div_1000: 0 .. 77777777(8),
      lwa_div_1000: 0 .. 77777777(8),
    RECEND;

  TYPE
    resource_status_type = PACKED RECORD
      fill1: 0 .. 77777777777777(8),
      available_words_div_1000: 0 .. 777777(8),
      fill2: 0 .. 777777777777(8),
      fill3: 0 .. 777777(8),
      available_pps: 0 .. 77(8),
    RECEND;

  TYPE
    ver_request_block = PACKED RECORD
      return_all: boolean,
      fill: 0 .. 377777777777(8),
      length: 0 .. 7777(8),
      general_status: 0 .. 7777(8),
      CASE ver_functions OF
      = rscm, rtcm, stcm =
        cm_block: cm_request_type,
      = stmr =
        resources: resource_status_type,
      = rspp, rtpp =
        pp: iou_resource,
      = rsch, rtch =
        channel: iou_resource,
      = stpp =
        pps: ARRAY [1 .. 30] OF iou_resource,
      = stch =
        channels: ARRAY [1 .. 34] OF iou_resource,
      = rseq, rteq =
        eq: eq_path,
      = steq =
        clear: integer,
      = ifrc =
        fill1: 0 .. 07777(8),
        new_value: 0 .. 07777777777777777(8),  { 48 bits for new FRC value
      CASEND,
    RECEND;
?? OLDTITLE ??
