?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE:  VE Linker Command Handlers' ??
MODULE ocm$ve_linker_command_handlers;

{ PURPOSE:
{   This module contains the command and subcommands for the LINK_VIRTUAL_ENVIRONMENT
{ utility.

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc clc$standard_file_names
*copyc mmc$first_transient_segment
*copyc occ$initial_segment_number
*copyc occ$retain_all_common_blocks
*copyc oce$library_generator_errors
*copyc oce$ve_linker_exceptions
*copyc oct$known_file_list
*copyc oct$link_parameters
*copyc oct$output_segment_descriptor
*copyc oct$section_name_list
*copyc oct$segment_attributes
?? POP ??
*copyc clp$begin_utility
*copyc clp$count_list_elements
*copyc clp$end_include
*copyc clp$end_utility
*copyc clp$evaluate_parameters
*copyc clp$include_file
*copyc clp$make_integer_value
*copyc ocp$add_to_known_files
*copyc ocp$add_to_object_file_list
*copyc ocp$add_to_predefined_segments
*copyc ocp$add_to_symbol_table_list
*copyc ocp$close_linker_object_files
*copyc ocp$close_linker_symbol_tables
*copyc ocp$close_predefined_segments
*copyc ocp$create_transient_segment
*copyc ocp$duplicate_file
*copyc ocp$duplicate_section_name
*copyc ocp$duplicate_segment_number
*copyc ocp$execute_the_ve_linker
*copyc ocp$open_linker_object_file
*copyc ocp$open_linker_symbol_table
*copyc ocp$open_output_segment
*copyc ocp$search_modules_to_add
*copyc osp$append_status_integer
*copyc osp$append_status_parameter
*copyc osp$set_status_abnormal
*copyc osp$set_status_condition
*copyc pmp$get_unique_name
?? OLDTITLE ??
?? NEWTITLE := 'Global Declarations Declared by This Module', EJECT ??

  SECTION
    read_only: READ;

  CONST
    utility_prompt_length = 3,
    utility_prompt = 'VEL';

  VAR
    ocv$known_file_list: [XDCL] oct$known_file_list,
    ocv$next_available_segment: [XDCL] ost$segment := occ$initial_segment_number,
    ocv$predefined_segment_list: [XDCL] oct$output_segment_descriptor,
    ocv$section_name_list: [XDCL] oct$section_name_list,
    ocv$vel_scratch_seq: [XDCL] ^SEQ ( * );

  VAR
    default_link_map: [STATIC] string (7) := 'LINKMAP',
    link_parameters: oct$link_parameters,
    utility_name: [STATIC, READ, read_only] clt$utility_name := 'virtual_environment_linker',
    ve_generator_not_executed: boolean;

?? OLDTITLE ??
?? NEWTITLE := 'initialize_the_linker', EJECT ??

  PROCEDURE initialize_the_linker;


?? FMT (FORMAT := OFF) ??
  VAR
    default_link_parameters: [STATIC] oct$link_parameters :=

      [{ virtual_image }                  NIL,
       { symbol_table }                   NIL,
       { debug_table }                    NIL,

       { symbol_table_id }                osc$null_name,
       { input_debug_table }              NIL,

       { heap_size_specified }            FALSE,
       { heap_size }                      *,

       { map_file }                       ^default_link_map,
       { map_options }                    $pmt$load_map_options [pmc$block_map,
                                                                 pmc$segment_map,
                                                                 pmc$entry_point_map],
       { starting_segment }               occ$null_seg_value,
       { starting_procedure }             osc$null_name,
       { linked_symbols }                 'GATE',
       { gate_ring_level }                osc$min_ring,

       { modules_to_add }                 [ *, NIL],
       { object_files_to_add }            [ NIL, *, *, *, *, *, *, *, *, *, *, false],
       { object_libraries_to_use }        [ NIL, *, *, *, *, *, *, *, *, *, *, false],
       { symbol_tables_to_use }           [ *, *, *, *, *, NIL],

       { exchange_package_variable }      osc$null_name,

       { build_level }                    osc$null_name,
       { build_level_variables }          [ *, NIL ],

       { heap_pointers }                  [ *, *, *, NIL],
       { symbol_table_pointers }          [ *, *, *, NIL],
       { symbol_table_id_variable }       osc$null_name,
       { debug_table_pointers }           [ *, *, *, NIL],

       { recovery_name_table_pointer }    [osc$null_name, *, *, *],
       { recovery_addresses }             [ *, NIL ],

       { ignore_section_names }           FALSE,
       { common_blocks_to_retain }        [osc$null_name, NIL],

       { mode }                           occ$template,
       { mc68000_seq }                    *,
       { mc68000_id }                     *,

       { message_module_list  }           NIL,

       {delete_declaration_matching  }    [osc$null_name, NIL],
       {preset_value }                    pmc$initialize_to_zero,
       {create_only_predefined_segments } FALSE,
       {cybil_parameter_checking }        'SOURCE',
       {defer_entry_points }              NIL,
       {defer_common_blocks }             NIL];

?? EJECT ??

?? FMT (FORMAT := ON) ??

    RESET ocv$vel_scratch_seq;

    link_parameters := default_link_parameters;

    ocv$known_file_list.name := default_link_parameters.map_file;
    ocv$known_file_list.link := NIL;

    ocv$section_name_list.link := NIL;
    ocv$predefined_segment_list.link := NIL;

    ve_generator_not_executed := FALSE;


  PROCEND initialize_the_linker;
?? OLDTITLE ??
?? NEWTITLE := 'crack_segment_attributes_param', EJECT ??

{ PURPOSE:
{   The purpose of this request to process the segment attribute parameter.  The
{   PDT for this parameter is as follows:
{
{         attribute, attributes, a: list of key
{             rd, rk, bi, wt, wk, ex, lp, gp, cb, et, wr, sh, fx, st, rt, fb, na
{           keyend = $required

  PROCEDURE crack_segment_attributes_param
    (    parameter_value: clt$parameter_value;
         inhibit_binding_check: boolean;
     VAR used_attributes: oct$segment_attributes;
     VAR unused_attributes: oct$segment_attributes;
     VAR extensible_attribute: oct$extensible_attributes;
     VAR status: ost$status);


    VAR
      data_value: ^clt$data_value,
      execute_attributes: clt$list_size,
      read_attributes: clt$list_size,
      write_attributes: clt$list_size;


    status.normal := TRUE;

    used_attributes := $oct$segment_attributes [];
    unused_attributes := $oct$segment_attributes [];
    extensible_attribute := occ$non_extensible;

    read_attributes := 0;
    write_attributes := 0;
    execute_attributes := 0;

    data_value := parameter_value.value;
    WHILE data_value <> NIL DO
      IF data_value^.element_value^.keyword_value = 'RD' THEN
        used_attributes := used_attributes + $oct$segment_attributes [occ$sa_read];
        read_attributes := read_attributes + 1;

      ELSEIF data_value^.element_value^.keyword_value = 'RK' THEN
        used_attributes := used_attributes + $oct$segment_attributes [occ$sa_read_kl];
        read_attributes := read_attributes + 1;

      ELSEIF data_value^.element_value^.keyword_value = 'WT' THEN
        used_attributes := used_attributes + $oct$segment_attributes [occ$sa_write];
        write_attributes := write_attributes + 1;

      ELSEIF data_value^.element_value^.keyword_value = 'WK' THEN
        used_attributes := used_attributes + $oct$segment_attributes [occ$sa_write_kl];
        write_attributes := write_attributes + 1;

      ELSEIF data_value^.element_value^.keyword_value = 'EX' THEN
        used_attributes := used_attributes + $oct$segment_attributes [occ$sa_non_privileged];
        execute_attributes := execute_attributes + 1;

      ELSEIF data_value^.element_value^.keyword_value = 'LP' THEN
        used_attributes := used_attributes + $oct$segment_attributes [occ$sa_local_privilege];
        execute_attributes := execute_attributes + 1;

      ELSEIF data_value^.element_value^.keyword_value = 'GP' THEN
        used_attributes := used_attributes + $oct$segment_attributes [occ$sa_global_privilege];
        execute_attributes := execute_attributes + 1;

      ELSEIF data_value^.element_value^.keyword_value = 'BI' THEN
        used_attributes := used_attributes + $oct$segment_attributes [occ$sa_binding];

      ELSEIF data_value^.element_value^.keyword_value = 'CB' THEN
        used_attributes := used_attributes + $oct$segment_attributes [occ$sa_cache_bypass];

      ELSEIF data_value^.element_value^.keyword_value = 'ET' THEN
        used_attributes := used_attributes + $oct$segment_attributes [occ$sa_extensible];
        extensible_attribute := occ$unallocated_extensible;

      ELSEIF data_value^.element_value^.keyword_value = 'WR' THEN
        unused_attributes := unused_attributes + $oct$segment_attributes [occ$sa_wired];

      ELSEIF data_value^.element_value^.keyword_value = 'SH' THEN
        unused_attributes := unused_attributes + $oct$segment_attributes [occ$sa_shared];

      ELSEIF data_value^.element_value^.keyword_value = 'FX' THEN
        unused_attributes := unused_attributes + $oct$segment_attributes [occ$sa_fixed];

      ELSEIF data_value^.element_value^.keyword_value = 'ST' THEN
        unused_attributes := unused_attributes + $oct$segment_attributes [occ$sa_stack];

      ELSEIF data_value^.element_value^.keyword_value = 'RT' THEN
        unused_attributes := unused_attributes + $oct$segment_attributes [occ$sa_read_transfer_unit];

      ELSEIF data_value^.element_value^.keyword_value = 'FB' THEN
        unused_attributes := unused_attributes + $oct$segment_attributes [occ$sa_free_behind];

      ELSEIF data_value^.element_value^.keyword_value = 'NA' THEN
        unused_attributes := unused_attributes + $oct$segment_attributes [occ$sa_no_append];

      IFEND;

      data_value := data_value^.link;
    WHILEND;

    IF occ$sa_binding IN used_attributes THEN
      IF NOT inhibit_binding_check THEN
        IF (read_attributes + write_attributes + execute_attributes) <> 0 THEN
          osp$set_status_abnormal ('OC', oce$e_seg_attribute_conflict, '''BI'' must be used alone', status);
          RETURN;
        IFEND;
      IFEND;
    IFEND;

    IF read_attributes > 1 THEN
      osp$set_status_abnormal ('OC', oce$e_seg_attribute_conflict, 'Multiple READ attributes', status);
      RETURN;
    IFEND;

    IF write_attributes > 1 THEN
      osp$set_status_abnormal ('OC', oce$e_seg_attribute_conflict, 'Multiple WRITE attributes', status);
      RETURN;
    IFEND;

    IF execute_attributes > 1 THEN
      osp$set_status_abnormal ('OC', oce$e_seg_attribute_conflict, 'Multiple EXECUTE attributes', status);
      RETURN;
    IFEND;


  PROCEND crack_segment_attributes_param;
?? OLDTITLE ??
?? NEWTITLE := 'crack_ring_brackets_parameter', EJECT ??

{ PURPOSE:
{   The purpose of this request to process the ring brackets parameter.  The
{   PDT for this parameter is as follows:
{
{         ring_brackets, rb: record
{             r1: integer osc$invalid_ring..osc$max_ring
{             r2: integer osc$invalid_ring..osc$max_ring
{             r3: integer osc$invalid_ring..osc$max_ring
{           recend = $optional

  PROCEDURE crack_ring_brackets_parameter
    (    parameter_value: clt$parameter_value;
     VAR r1: ost$ring;
     VAR r2: ost$ring;
     VAR r3: ost$ring;
     VAR status: ost$status);


    status.normal := TRUE;

    CASE link_parameters.mode OF
    = occ$template, occ$product =

      IF parameter_value.specified THEN
        r1 := parameter_value.value^.field_values^ [1].value^.integer_value.value;
        r2 := parameter_value.value^.field_values^ [2].value^.integer_value.value;
        r3 := parameter_value.value^.field_values^ [3].value^.integer_value.value;

        IF NOT ((0 < r1) AND (r1 <= r2) AND (r2 <= r3)) THEN
          osp$set_status_condition (oce$e_invalid_ring_bracket, status);
          osp$append_status_integer (osc$status_parameter_delimiter, r1, 10, FALSE, status);
          osp$append_status_integer (osc$status_parameter_delimiter, r2, 10, FALSE, status);
          osp$append_status_integer (osc$status_parameter_delimiter, r3, 10, FALSE, status);
        IFEND;

      ELSE
        osp$set_status_abnormal ('OC', cle$required_parameter_omitted, 'RING_BRACKETS', status);
      IFEND;

    ELSE { = occ$mc68000 =
      r1 := osc$invalid_ring;
      r2 := osc$invalid_ring;
      r3 := osc$invalid_ring;

    CASEND;


  PROCEND crack_ring_brackets_parameter;
?? OLDTITLE ??
?? NEWTITLE := 'crack_key_lock_parameter', EJECT ??

{ PURPOSE:
{   The purpose of this request to process the global_local_key parameter.  The
{   PDT for this parameter is as follows:
{
{         global_local_key, glk: record
{             global: integer 0..3f(16)
{             local: integer 0..3f(16)
{           recend = (0, 0)

  PROCEDURE crack_key_lock_parameter
    (    parameter_value: clt$parameter_value;
     VAR global_key: ost$key_lock_value;
     VAR local_key: ost$key_lock_value;
     VAR status: ost$status);


    status.normal := TRUE;

    global_key := parameter_value.value^.field_values^ [1].value^.integer_value.value;
    local_key := parameter_value.value^.field_values^ [2].value^.integer_value.value;

    IF global_key <> local_key THEN
      IF (global_key <> 0) AND (local_key <> 0) THEN
        osp$set_status_condition (oce$e_global_local_key_mismatch, status);
        osp$append_status_integer (osc$status_parameter_delimiter, global_key, 10, FALSE, status);
        osp$append_status_integer (osc$status_parameter_delimiter, local_key, 10, FALSE, status);
        RETURN;
      IFEND;
    IFEND;


  PROCEND crack_key_lock_parameter;
?? OLDTITLE ??
?? NEWTITLE := 'crack_segment_number_parameter', EJECT ??

{ PURPOSE:
{   The purpose of this request to process the segment number parameter.  The
{   PDT for this parameter is as follows:
{
{         number, n: integer 0..osc$maximum_segment = $optional

  PROCEDURE crack_segment_number_parameter
    (    parameter_value: clt$parameter_value;
     VAR segment_number_predefined: boolean;
     VAR segment_number: oct$segment;
     VAR status: ost$status);


    status.normal := TRUE;

    IF NOT parameter_value.specified THEN
      segment_number_predefined := FALSE;

    ELSE
      segment_number_predefined := TRUE;
      segment_number := parameter_value.value^.integer_value.value;

      IF ocp$duplicate_segment_number (segment_number) THEN
        osp$set_status_condition (oce$e_duplicate_segment_named, status);
        osp$append_status_integer (osc$status_parameter_delimiter, segment_number, 10, FALSE, status);
        RETURN;
      IFEND;
    IFEND;


  PROCEND crack_segment_number_parameter;
?? OLDTITLE ??
?? NEWTITLE := 'crack_section_name_parameter', EJECT ??

{ PURPOSE:
{   The purpose of this request to process the section name parameter.  The
{   PDT for this parameter is as follows:
{
{         section_name, section_names, sn: list of program_name = $optional

  PROCEDURE crack_section_name_parameter
    (    parameter_value: clt$parameter_value;
     VAR new_section_names: ^oct$section_name_list;
     VAR status: ost$status);


    VAR
      data_value: ^clt$data_value,
      first_section_name: oct$section_name_list,
      next_section_name: ^oct$section_name_list;


    status.normal := TRUE;

    first_section_name.link := NIL;
    next_section_name := ^first_section_name;

    data_value := parameter_value.value;
    WHILE data_value <> NIL DO
      NEXT next_section_name^.link IN ocv$vel_scratch_seq;
      next_section_name := next_section_name^.link;
      IF next_section_name = NIL THEN
        osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH1', status);
        RETURN;
      IFEND;

      next_section_name^.name := data_value^.element_value^.program_name_value;
      next_section_name^.link := NIL;

      IF ocp$duplicate_section_name (next_section_name^.name) THEN
        osp$set_status_abnormal ('OC', oce$e_duplicate_section_named, next_section_name^.name, status);
        RETURN;
      IFEND;

      data_value := data_value^.link;
    WHILEND;

    new_section_names := first_section_name.link;

  PROCEND crack_section_name_parameter;
?? OLDTITLE ??
?? NEWTITLE := 'crack_execute_privilege_param', EJECT ??

{ PURPOSE:
{   The purpose of this request to process the execute privilege parameter.  The
{   PDT for this parameter is as follows:
{
{         execute_privilege, ep: key
{             (execute, e)
{             (local, l)
{             (global, g)
{           keyend = execute

  PROCEDURE crack_execute_privilege_param
    (    parameter_value: clt$parameter_value;
     VAR execute_privilege: ost$execute_privilege);


    IF parameter_value.value^.keyword_value = 'EXECUTE' THEN
      execute_privilege := osc$non_privileged;

    ELSEIF parameter_value.value^.keyword_value = 'LOCAL' THEN
      execute_privilege := osc$local_privilege;

    ELSEIF parameter_value.value^.keyword_value = 'GLOBAL' THEN
      execute_privilege := osc$global_privilege;

    IFEND;


  PROCEND crack_execute_privilege_param;
?? OLDTITLE ??
?? NEWTITLE := 'crack_default_section_param', EJECT ??

{ PURPOSE:
{   The purpose of this request to process the default section parameter.  The
{   PDT for this parameter is as follows:
{
{         default_section, default_sections, ds: list of record
{             section_name: program_name
{             section_attributes: list rest of key
{               (read, r)
{               (write, w)
{               (execute, e)
{               (binding, b)
{             keyend
{           recend = $optional

  PROCEDURE crack_default_section_param
    (    data_value: ^clt$data_value;
     VAR default_section: oct$default_section);

    VAR
      key_value: ^clt$data_value;


    default_section.name := data_value^.field_values^ [1].value^.program_name_value;
    default_section.attributes := $llt$section_access_attributes [];

    key_value := data_value^.field_values^ [2].value;

    WHILE key_value <> NIL DO

      IF (key_value^.element_value^.keyword_value = 'READ ') THEN
        default_section.attributes := default_section.attributes + $llt$section_access_attributes [llc$read];

      ELSEIF (key_value^.element_value^.keyword_value = 'WRITE ') THEN
        default_section.attributes := default_section.attributes + $llt$section_access_attributes [llc$write];

      ELSEIF (key_value^.element_value^.keyword_value = 'EXECUTE ') THEN
        default_section.attributes := default_section.attributes + $llt$section_access_attributes
              [llc$execute];

      ELSE {key_value^.element_value^.keyword_value = 'BINDING '
        default_section.attributes := default_section.attributes + $llt$section_access_attributes
              [llc$binding];

      IFEND;

      key_value := key_value^.link;
    WHILEND;


  PROCEND crack_default_section_param;
?? OLDTITLE ??
?? NEWTITLE := 'crack_default_section_parameter', EJECT ??

{ PURPOSE:
{   The purpose of this request to process the default section parameter.  The
{   PDT for this parameter is as follows:
{
{         default_section, default_sections, ds: list of record
{             section_name: program_name
{             section_attributes: list rest of key
{               (read, r)
{               (write, w)
{               (execute, e)
{               (binding, b)
{             keyend
{           recend = $optional

  PROCEDURE crack_default_section_parameter
    (    parameter_value: clt$parameter_value;
     VAR default_sections: ^oct$default_sections;
     VAR status: ost$status);


    VAR
      data_value: ^clt$data_value,
      i: clt$list_size,
      j: clt$list_size,
      number_of_records: clt$list_size;


    status.normal := TRUE;

    number_of_records := clp$count_list_elements (parameter_value.value);

    IF number_of_records = 0 THEN
      default_sections := NIL;

    ELSE
      NEXT default_sections: [1 .. number_of_records] IN ocv$vel_scratch_seq;
      IF default_sections = NIL THEN
        osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH2', status);
        RETURN;
      IFEND;

      data_value := parameter_value.value;
      FOR i := 1 TO number_of_records DO
        crack_default_section_param (data_value^.element_value, default_sections^ [i]);

        data_value := data_value^.link;

        FOR j := 1 TO (i - 1) DO
          IF default_sections^ [i].attributes = default_sections^ [j].attributes THEN
            osp$set_status_abnormal ('OC', oce$e_duplicate_section_attr, default_sections^ [i].name, status);
            osp$append_status_parameter (osc$status_parameter_delimiter, default_sections^ [j].name, status);
            RETURN;
          IFEND;
        FOREND;
      FOREND;
    IFEND;


  PROCEND crack_default_section_parameter;
?? OLDTITLE ??
?? NEWTITLE := 'crack_map_options_parameter', EJECT ??

{ PURPOSE:
{   The purpose of this request to process the link map options parameter.  The
{   PDT for this parameter is as follows:
{
{         link_map_option, link_map_options, lmo: (BY_NAME) any of
{             key
{               all, none
{             keyend
{             list of key
{               (block, b)
{               (entry_point, ep)
{               (segment, s)
{             keyend
{           anyend = $optional

  PROCEDURE crack_map_options_parameter
    (    parameter_value: clt$parameter_value;
     VAR map_options: pmt$load_map_options;
     VAR status: ost$status);


    VAR
      data_value: ^clt$data_value,
      i: clt$list_size,
      number_of_options: clt$list_size;


    status.normal := TRUE;

    IF parameter_value.specified THEN
      map_options := $pmt$load_map_options [];
      IF parameter_value.value^.kind = clc$keyword THEN
        IF parameter_value.value^.keyword_value = 'ALL' THEN
          map_options := $pmt$load_map_options [pmc$block_map, pmc$entry_point_map, pmc$segment_map];
        ELSE { parameter_value.value^.keyword_value = 'NONE'
          map_options := $pmt$load_map_options [pmc$no_load_map];
        IFEND;
      ELSE { parameter_value.value^.kind = clc$list
        number_of_options := clp$count_list_elements (parameter_value.value);
        data_value := parameter_value.value;
        FOR i := 1 TO number_of_options DO

          IF data_value^.element_value^.keyword_value = 'BLOCK' THEN
            map_options := map_options + $pmt$load_map_options [pmc$block_map];
          ELSEIF data_value^.element_value^.keyword_value = 'ENTRY_POINT' THEN
            map_options := map_options + $pmt$load_map_options [pmc$entry_point_map];
          ELSEIF data_value^.element_value^.keyword_value = 'SEGMENT' THEN
            map_options := map_options + $pmt$load_map_options [pmc$segment_map];
          IFEND;

          data_value := data_value^.link;
        FOREND;
      IFEND;
    IFEND;

  PROCEND crack_map_options_parameter;
?? OLDTITLE ??
?? NEWTITLE := 'set_link_options', EJECT ??

  PROCEDURE set_link_options
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (ocm$linve_setlo) set_link_option, setlo (
{   build_level, bl: (BY_NAME) string 1..22 = $optional
{   create_only_predefined_segments, cops: (BY_NAME) boolean = $optional
{   cybil_parameter_checking, cpc: (BY_NAME) key
{       (source, s)
{       (object, o)
{     keyend = $optional
{   defer_common_blocks, dcb: (BY_NAME) any of
{       key
{         all, none
{       keyend
{       record
{         action: key
{           ($defer_all_except, $dae)
{         keyend
{         common_blocks: list rest of program_name
{       recend
{       list of program_name
{     anyend = none
{   defer_entry_points, dep: (BY_NAME) any of
{       key
{         all, none
{         ($not_retained, $nr)
{       keyend
{       record
{         action: key
{           ($defer_all_except, $dae)
{         keyend
{         entry_points: list rest of program_name
{       recend
{       list of program_name
{     anyend = none
{   exchange_package_variable, epv: (BY_NAME) program_name = $optional
{   gate_ring_level, grl: (BY_NAME) integer osc$min_ring..osc$max_ring = $optional
{   heap_size, hs: (BY_NAME) integer 0..osc$max_segment_length = $optional
{   ignore_section_names, isn: (BY_NAME) boolean = $optional
{   link_map, lm: (BY_NAME) file = $optional
{   link_map_option, link_map_options, lmo: (BY_NAME) any of
{       key
{         all, none
{       keyend
{       list of key
{         (block, b)
{         (entry_point, ep)
{         (segment, s)
{       keyend
{     anyend = $optional
{   linked_symbols, ls: (BY_NAME) key
{       gate, all
{     keyend = $optional
{   mode, m: (BY_NAME) key
{       template, product, mc68000
{     keyend = $optional
{   preset_value, pv: (BY_NAME) key
{       (zero, z)
{       (floating_point_indefinite, fpi)
{       (infinity, i)
{       (alternate_ones, ao)
{     keyend = $optional
{   starting_procedure, sp: (BY_NAME) program_name = $optional
{   starting_segment, ss: (BY_NAME) integer 0..osc$maximum_segment = $optional
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 34] of clt$pdt_parameter_name,
      parameters: array [1 .. 17] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$string_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 4] of clt$keyword_specification,
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 2] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 2] of clt$keyword_specification,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$list_type_qualifier,
            element_type_spec: record
              header: clt$type_specification_header,
            recend,
          recend,
        recend,
        type_size_3: clt$type_specification_size,
        element_type_spec_3: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
          recend,
        recend,
        default_value: string (4),
      recend,
      type5: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 4] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 2] of clt$keyword_specification,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$list_type_qualifier,
            element_type_spec: record
              header: clt$type_specification_header,
            recend,
          recend,
        recend,
        type_size_3: clt$type_specification_size,
        element_type_spec_3: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
          recend,
        recend,
        default_value: string (4),
      recend,
      type6: record
        header: clt$type_specification_header,
      recend,
      type7: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
      type8: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
      type9: record
        header: clt$type_specification_header,
      recend,
      type10: record
        header: clt$type_specification_header,
      recend,
      type11: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 2] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 6] of clt$keyword_specification,
          recend,
        recend,
      recend,
      type12: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 2] of clt$keyword_specification,
      recend,
      type13: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 3] of clt$keyword_specification,
      recend,
      type14: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 8] of clt$keyword_specification,
      recend,
      type15: record
        header: clt$type_specification_header,
      recend,
      type16: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
      type17: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 11, 14, 11, 38, 37, 660],
    clc$command, 34, 17, 0, 0, 0, 0, 17, 'OCM$LINVE_SETLO'], [
    ['BL                             ',clc$abbreviation_entry, 1],
    ['BUILD_LEVEL                    ',clc$nominal_entry, 1],
    ['COPS                           ',clc$abbreviation_entry, 2],
    ['CPC                            ',clc$abbreviation_entry, 3],
    ['CREATE_ONLY_PREDEFINED_SEGMENTS',clc$nominal_entry, 2],
    ['CYBIL_PARAMETER_CHECKING       ',clc$nominal_entry, 3],
    ['DCB                            ',clc$abbreviation_entry, 4],
    ['DEFER_COMMON_BLOCKS            ',clc$nominal_entry, 4],
    ['DEFER_ENTRY_POINTS             ',clc$nominal_entry, 5],
    ['DEP                            ',clc$abbreviation_entry, 5],
    ['EPV                            ',clc$abbreviation_entry, 6],
    ['EXCHANGE_PACKAGE_VARIABLE      ',clc$nominal_entry, 6],
    ['GATE_RING_LEVEL                ',clc$nominal_entry, 7],
    ['GRL                            ',clc$abbreviation_entry, 7],
    ['HEAP_SIZE                      ',clc$nominal_entry, 8],
    ['HS                             ',clc$abbreviation_entry, 8],
    ['IGNORE_SECTION_NAMES           ',clc$nominal_entry, 9],
    ['ISN                            ',clc$abbreviation_entry, 9],
    ['LINKED_SYMBOLS                 ',clc$nominal_entry, 12],
    ['LINK_MAP                       ',clc$nominal_entry, 10],
    ['LINK_MAP_OPTION                ',clc$nominal_entry, 11],
    ['LINK_MAP_OPTIONS               ',clc$alias_entry, 11],
    ['LM                             ',clc$abbreviation_entry, 10],
    ['LMO                            ',clc$abbreviation_entry, 11],
    ['LS                             ',clc$abbreviation_entry, 12],
    ['M                              ',clc$abbreviation_entry, 13],
    ['MODE                           ',clc$nominal_entry, 13],
    ['PRESET_VALUE                   ',clc$nominal_entry, 14],
    ['PV                             ',clc$abbreviation_entry, 14],
    ['SP                             ',clc$abbreviation_entry, 15],
    ['SS                             ',clc$abbreviation_entry, 16],
    ['STARTING_PROCEDURE             ',clc$nominal_entry, 15],
    ['STARTING_SEGMENT               ',clc$nominal_entry, 16],
    ['STATUS                         ',clc$nominal_entry, 17]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$optional_parameter, 0
  , 0],
{ PARAMETER 2
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$optional_parameter, 0
  , 0],
{ PARAMETER 3
    [6, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 155,
  clc$optional_parameter, 0, 0],
{ PARAMETER 4
    [8, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 303,
  clc$optional_default_parameter, 0, 4],
{ PARAMETER 5
    [9, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 377,
  clc$optional_default_parameter, 0, 4],
{ PARAMETER 6
    [12, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$optional_parameter, 0
  , 0],
{ PARAMETER 7
    [13, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 20, clc$optional_parameter,
  0, 0],
{ PARAMETER 8
    [15, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 20, clc$optional_parameter,
  0, 0],
{ PARAMETER 9
    [17, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$optional_parameter, 0
  , 0],
{ PARAMETER 10
    [20, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$optional_parameter, 0
  , 0],
{ PARAMETER 11
    [21, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 346,
  clc$optional_parameter, 0, 0],
{ PARAMETER 12
    [19, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 81, clc$optional_parameter,
  0, 0],
{ PARAMETER 13
    [27, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 118,
  clc$optional_parameter, 0, 0],
{ PARAMETER 14
    [28, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 303,
  clc$optional_parameter, 0, 0],
{ PARAMETER 15
    [32, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$optional_parameter, 0
  , 0],
{ PARAMETER 16
    [33, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 20, clc$optional_parameter,
  0, 0],
{ PARAMETER 17
    [34, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$string_type], [1, 22, FALSE]],
{ PARAMETER 2
    [[1, 0, clc$boolean_type]],
{ PARAMETER 3
    [[1, 0, clc$keyword_type], [4], [
    ['O                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['OBJECT                         ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['S                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['SOURCE                         ', clc$nominal_entry, clc$normal_usage_entry, 1]]
    ],
{ PARAMETER 4
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$list_type, clc$record_type],
    FALSE, 3],
    81, [[1, 0, clc$keyword_type], [2], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['NONE                           ', clc$nominal_entry, clc$normal_usage_entry, 2]]
      ],
    179, [[1, 0, clc$record_type], [2],
      ['ACTION                         ', clc$required_field, 81], [[1, 0, clc$keyword_type], [2], [
        ['$DAE                           ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['$DEFER_ALL_EXCEPT              ', clc$nominal_entry, clc$normal_usage_entry, 1]]
        ],
      ['COMMON_BLOCKS                  ', clc$required_field, 19], [[1, 0, clc$list_type], [3, 0,
  clc$max_list_size, TRUE],
          [[1, 0, clc$program_name_type]]
        ]
      ],
    19, [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$program_name_type]]
      ]
    ,
    'none'],
{ PARAMETER 5
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$list_type, clc$record_type],
    FALSE, 3],
    155, [[1, 0, clc$keyword_type], [4], [
      ['$NOT_RETAINED                  ', clc$nominal_entry, clc$normal_usage_entry, 3],
      ['$NR                            ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['NONE                           ', clc$nominal_entry, clc$normal_usage_entry, 2]]
      ],
    179, [[1, 0, clc$record_type], [2],
      ['ACTION                         ', clc$required_field, 81], [[1, 0, clc$keyword_type], [2], [
        ['$DAE                           ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['$DEFER_ALL_EXCEPT              ', clc$nominal_entry, clc$normal_usage_entry, 1]]
        ],
      ['ENTRY_POINTS                   ', clc$required_field, 19], [[1, 0, clc$list_type], [3, 0,
  clc$max_list_size, TRUE],
          [[1, 0, clc$program_name_type]]
        ]
      ],
    19, [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$program_name_type]]
      ]
    ,
    'none'],
{ PARAMETER 6
    [[1, 0, clc$program_name_type]],
{ PARAMETER 7
    [[1, 0, clc$integer_type], [osc$min_ring, osc$max_ring, 10]],
{ PARAMETER 8
    [[1, 0, clc$integer_type], [0, osc$max_segment_length, 10]],
{ PARAMETER 9
    [[1, 0, clc$boolean_type]],
{ PARAMETER 10
    [[1, 0, clc$file_type]],
{ PARAMETER 11
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$list_type],
    FALSE, 2],
    81, [[1, 0, clc$keyword_type], [2], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['NONE                           ', clc$nominal_entry, clc$normal_usage_entry, 2]]
      ],
    245, [[1, 0, clc$list_type], [229, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$keyword_type], [6], [
        ['B                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['BLOCK                          ', clc$nominal_entry, clc$normal_usage_entry, 1],
        ['ENTRY_POINT                    ', clc$nominal_entry, clc$normal_usage_entry, 2],
        ['EP                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
        ['S                              ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
        ['SEGMENT                        ', clc$nominal_entry, clc$normal_usage_entry, 3]]
        ]
      ]
    ],
{ PARAMETER 12
    [[1, 0, clc$keyword_type], [2], [
    ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['GATE                           ', clc$nominal_entry, clc$normal_usage_entry, 1]]
    ],
{ PARAMETER 13
    [[1, 0, clc$keyword_type], [3], [
    ['MC68000                        ', clc$nominal_entry, clc$normal_usage_entry, 3],
    ['PRODUCT                        ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['TEMPLATE                       ', clc$nominal_entry, clc$normal_usage_entry, 1]]
    ],
{ PARAMETER 14
    [[1, 0, clc$keyword_type], [8], [
    ['ALTERNATE_ONES                 ', clc$nominal_entry, clc$normal_usage_entry, 4],
    ['AO                             ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
    ['FLOATING_POINT_INDEFINITE      ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['FPI                            ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['I                              ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
    ['INFINITY                       ', clc$nominal_entry, clc$normal_usage_entry, 3],
    ['Z                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['ZERO                           ', clc$nominal_entry, clc$normal_usage_entry, 1]]
    ],
{ PARAMETER 15
    [[1, 0, clc$program_name_type]],
{ PARAMETER 16
    [[1, 0, clc$integer_type], [0, osc$maximum_segment, 10]],
{ PARAMETER 17
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$build_level = 1,
      p$create_only_predefined_segmen = 2 {CREATE_ONLY_PREDEFINED_SEGMENTS} ,
      p$cybil_parameter_checking = 3,
      p$defer_common_blocks = 4,
      p$defer_entry_points = 5,
      p$exchange_package_variable = 6,
      p$gate_ring_level = 7,
      p$heap_size = 8,
      p$ignore_section_names = 9,
      p$link_map = 10,
      p$link_map_option = 11,
      p$linked_symbols = 12,
      p$mode = 13,
      p$preset_value = 14,
      p$starting_procedure = 15,
      p$starting_segment = 16,
      p$status = 17;

    VAR
      pvt: array [1 .. 17] of clt$parameter_value;

    VAR
      common_block: ^oct$defer_list,
      data_value: ^clt$data_value,
      defer_common_blocks: ^oct$defer_name_list,
      defer_entry_points: ^oct$defer_name_list,
      entry_point: ^oct$defer_list,
      local_parameters: oct$link_parameters,
      name: ost$name,
      previous_link: ^^oct$defer_list,
      segment: amt$segment_pointer;

    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    local_parameters := link_parameters;

    IF pvt [p$link_map].specified THEN
      IF ocp$duplicate_file (pvt [p$link_map].value^.file_value^, ocv$known_file_list) THEN
        osp$set_status_abnormal ('OC', oce$e_duplicate_file_named, pvt [p$link_map].value^.file_value^,
              status);
        RETURN;
      ELSE
        NEXT local_parameters.map_file: [STRLENGTH (pvt [p$link_map].value^.file_value^)] IN
              ocv$vel_scratch_seq;
        IF local_parameters.map_file = NIL THEN
          osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH3', status);
          RETURN;
        IFEND;
        local_parameters.map_file^ := pvt [p$link_map].value^.file_value^;
      IFEND;
    IFEND;

    crack_map_options_parameter (pvt [p$link_map_option], local_parameters.map_options, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF pvt [p$starting_segment].specified THEN
      local_parameters.starting_segment := pvt [p$starting_segment].value^.integer_value.value;
    IFEND;

    IF pvt [p$starting_procedure].specified THEN
      local_parameters.starting_procedure := pvt [p$starting_procedure].value^.program_name_value;
    IFEND;

    IF pvt [p$linked_symbols].specified THEN
      local_parameters.linked_symbols := pvt [p$linked_symbols].value^.keyword_value;
    IFEND;

    IF pvt [p$gate_ring_level].specified THEN
      IF local_parameters.linked_symbols <> 'GATE' THEN
        osp$set_status_condition (oce$e_linked_symbols_not_gate, status);
        RETURN;
      IFEND;
      local_parameters.gate_ring_level := pvt [p$gate_ring_level].value^.integer_value.value;
    IFEND;

    IF pvt [p$heap_size].specified THEN
      local_parameters.heap_size_specified := TRUE;
      local_parameters.heap_size := pvt [p$heap_size].value^.integer_value.value;
    IFEND;

    IF pvt [p$build_level].specified THEN
      local_parameters.build_level := pvt [p$build_level].value^.string_value^;
    IFEND;

    IF pvt [p$exchange_package_variable].specified THEN
      local_parameters.exchange_package_variable := pvt [p$exchange_package_variable].value^.
            program_name_value;
    IFEND;

    IF pvt [p$ignore_section_names].specified THEN
      local_parameters.ignore_section_names := pvt [p$ignore_section_names].value^.boolean_value.value;
    IFEND;

    IF pvt [p$mode].specified THEN
      IF pvt [p$mode].value^.keyword_value = 'TEMPLATE' THEN
        local_parameters.mode := occ$template;
        IF (ocv$next_available_segment = mmc$first_loader_predefined_seg) THEN
          ocv$next_available_segment := occ$initial_segment_number;
        IFEND;
      ELSEIF pvt [p$mode].value^.keyword_value = 'PRODUCT' THEN
        local_parameters.mode := occ$product;
        IF (ocv$next_available_segment = occ$initial_segment_number) THEN
          ocv$next_available_segment := mmc$first_loader_predefined_seg;
        IFEND;
      ELSE {mode = mc68000
        IF link_parameters.mode <> occ$mc68000 THEN
          pmp$get_unique_name (name, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;

          ocp$open_output_segment (name, local_parameters.mc68000_id, segment, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;

          local_parameters.mc68000_seq := segment.sequence_pointer;
          local_parameters.mode := occ$mc68000;
        IFEND;
      IFEND;
    IFEND;

    IF pvt [p$preset_value].specified THEN
      IF pvt [p$preset_value].value^.keyword_value = 'ZERO' THEN
        local_parameters.preset_value := pmc$initialize_to_zero;
      ELSEIF pvt [p$preset_value].value^.keyword_value = 'FLOATING_POINT_INDEFINITE' THEN
        local_parameters.preset_value := pmc$initialize_to_indefinite;
      ELSEIF pvt [p$preset_value].value^.keyword_value = 'INFINITY' THEN
        local_parameters.preset_value := pmc$initialize_to_infinity;
      ELSE {IF pvt$p$preset_value].value^.keyword_value = 'ALTERNATE_ONES' THEN
        local_parameters.preset_value := pmc$initialize_to_alt_ones;
      IFEND;
    IFEND;

    IF pvt [p$cybil_parameter_checking].specified THEN
      local_parameters.cybil_parameter_checking := pvt [p$cybil_parameter_checking].value^.keyword_value;
    IFEND;

    IF pvt [p$create_only_predefined_segmen].specified THEN
      local_parameters.create_only_predefined_segments := pvt [p$create_only_predefined_segmen].value^.
            boolean_value.value;
    IFEND;

    IF pvt [p$defer_entry_points].specified THEN
      NEXT defer_entry_points IN ocv$vel_scratch_seq;
      IF defer_entry_points = NIL THEN
        osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH4', status);
        RETURN;
      IFEND;

      CASE pvt [p$defer_entry_points].value^.kind OF
      = clc$keyword =
        IF pvt [p$defer_entry_points].value^.keyword_value = 'NONE' THEN
          RESET ocv$vel_scratch_seq TO defer_entry_points;
          defer_entry_points := NIL;
        ELSEIF pvt [p$defer_entry_points].value^.keyword_value = 'ALL' THEN
          defer_entry_points^.defer := occ$defer_all;
        ELSE { pvt [p$defer_entry_points].value^.keyword_value = '$NOT_RETAINED' THEN
          defer_entry_points^.defer := occ$defer_non_retained;
        IFEND;
      = clc$list =
        defer_entry_points^.defer := occ$defer;
        defer_entry_points^.name_list := NIL;
        previous_link := ^defer_entry_points^.name_list;

        data_value := pvt [p$defer_entry_points].value;
        WHILE data_value <> NIL DO
          NEXT entry_point IN ocv$vel_scratch_seq;
          IF entry_point = NIL THEN
            osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH5', status);
            RETURN;
          IFEND;
          entry_point^.name := data_value^.element_value^.program_name_value;
          entry_point^.name_found := FALSE;
          entry_point^.link := NIL;
          previous_link^ := entry_point;
          previous_link := ^entry_point^.link;

          data_value := data_value^.link;
        WHILEND;
      = clc$record =
        defer_entry_points^.defer := occ$defer_all_except;
        defer_entry_points^.name_list := NIL;
        previous_link := ^defer_entry_points^.name_list;

        data_value := pvt [p$defer_entry_points].value^.field_values^ [2].value;
        WHILE data_value <> NIL DO
          NEXT entry_point IN ocv$vel_scratch_seq;
          IF entry_point = NIL THEN
            osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH6', status);
            RETURN;
          IFEND;
          entry_point^.name := data_value^.element_value^.program_name_value;
          entry_point^.name_found := FALSE;
          entry_point^.link := NIL;
          previous_link^ := entry_point;
          previous_link := ^entry_point^.link;

          data_value := data_value^.link;
        WHILEND;
      ELSE
        ;
      CASEND;

      local_parameters.defer_entry_points := defer_entry_points;
    IFEND;

    IF pvt [p$defer_common_blocks].specified THEN
      NEXT defer_common_blocks IN ocv$vel_scratch_seq;
      IF defer_common_blocks = NIL THEN
        osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH7', status);
        RETURN;
      IFEND;

      CASE pvt [p$defer_common_blocks].value^.kind OF
      = clc$keyword =
        IF pvt [p$defer_common_blocks].value^.keyword_value = 'NONE' THEN
          RESET ocv$vel_scratch_seq TO defer_common_blocks;
          defer_common_blocks := NIL;
        ELSE { pvt [p$defer_common_blocks].value^.keyword_value = 'ALL' THEN
          defer_common_blocks^.defer := occ$defer_all;
        IFEND;
      = clc$list =
        defer_common_blocks^.defer := occ$defer;
        defer_common_blocks^.name_list := NIL;
        previous_link := ^defer_common_blocks^.name_list;

        data_value := pvt [p$defer_common_blocks].value;
        WHILE data_value <> NIL DO
          NEXT common_block IN ocv$vel_scratch_seq;
          IF common_block = NIL THEN
            osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH8', status);
            RETURN;
          IFEND;
          common_block^.name := data_value^.element_value^.program_name_value;
          common_block^.name_found := FALSE;
          common_block^.link := NIL;
          previous_link^ := common_block;
          previous_link := ^common_block^.link;

          data_value := data_value^.link;
        WHILEND;
      = clc$record =
        defer_common_blocks^.defer := occ$defer_all_except;
        defer_common_blocks^.name_list := NIL;
        previous_link := ^defer_common_blocks^.name_list;

        data_value := pvt [p$defer_common_blocks].value^.field_values^ [2].value;
        WHILE data_value <> NIL DO
          NEXT common_block IN ocv$vel_scratch_seq;
          IF common_block = NIL THEN
            osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH9', status);
            RETURN;
          IFEND;
          common_block^.name := data_value^.element_value^.program_name_value;
          common_block^.name_found := FALSE;
          common_block^.link := NIL;
          previous_link^ := common_block;
          previous_link := ^common_block^.link;

          data_value := data_value^.link;
        WHILEND;
      ELSE
        ;
      CASEND;

      local_parameters.defer_common_blocks := defer_common_blocks;
    IFEND;

    ocv$known_file_list.name := local_parameters.map_file;
    link_parameters := local_parameters;

    ve_generator_not_executed := TRUE;


  PROCEND set_link_options;
?? OLDTITLE ??
?? NEWTITLE := 'define_segment', EJECT ??

  PROCEDURE define_segment
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (ocm$linve_defs) define_segment, defs (
{   attribute, attributes, a: list of key
{       rd, rk, bi, wt, wk, ex, lp, gp, cb, et, wr, sh, fx, st, rt, fb, na
{     keyend = $required
{   ring_brackets, rb: record
{       r1: integer osc$invalid_ring..osc$max_ring
{       r2: integer osc$invalid_ring..osc$max_ring
{       r3: integer osc$invalid_ring..osc$max_ring
{     recend = $optional
{   number, n: integer 0..osc$maximum_segment = $optional
{   section_name, section_names, sn: list of program_name = $optional
{   global_local_key, glk: record
{       global: integer 0..3f(16)
{       local: integer 0..3f(16)
{     recend = (0, 0)
{   inhibit_binding_check, ibc: boolean = false
{   first_byte_offset, fbo: integer 0..(osc$max_segment_length - 1) = $optional
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 17] of clt$pdt_parameter_name,
      parameters: array [1 .. 8] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 17] of clt$keyword_specification,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$record_type_qualifier,
        field_spec_1: clt$field_specification,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        field_spec_2: clt$field_specification,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        field_spec_3: clt$field_specification,
        element_type_spec_3: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
        recend,
      recend,
      type5: record
        header: clt$type_specification_header,
        qualifier: clt$record_type_qualifier,
        field_spec_1: clt$field_specification,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        field_spec_2: clt$field_specification,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        default_value: string (6),
      recend,
      type6: record
        header: clt$type_specification_header,
        default_value: string (5),
      recend,
      type7: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
      type8: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 13, 12, 9, 42, 287],
    clc$command, 17, 8, 1, 0, 0, 0, 8, 'OCM$LINVE_DEFS'], [
    ['A                              ',clc$abbreviation_entry, 1],
    ['ATTRIBUTE                      ',clc$nominal_entry, 1],
    ['ATTRIBUTES                     ',clc$alias_entry, 1],
    ['FBO                            ',clc$abbreviation_entry, 7],
    ['FIRST_BYTE_OFFSET              ',clc$nominal_entry, 7],
    ['GLK                            ',clc$abbreviation_entry, 5],
    ['GLOBAL_LOCAL_KEY               ',clc$nominal_entry, 5],
    ['IBC                            ',clc$abbreviation_entry, 6],
    ['INHIBIT_BINDING_CHECK          ',clc$nominal_entry, 6],
    ['N                              ',clc$abbreviation_entry, 3],
    ['NUMBER                         ',clc$nominal_entry, 3],
    ['RB                             ',clc$abbreviation_entry, 2],
    ['RING_BRACKETS                  ',clc$nominal_entry, 2],
    ['SECTION_NAME                   ',clc$nominal_entry, 4],
    ['SECTION_NAMES                  ',clc$alias_entry, 4],
    ['SN                             ',clc$abbreviation_entry, 4],
    ['STATUS                         ',clc$nominal_entry, 8]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 652,
  clc$required_parameter, 0, 0],
{ PARAMETER 2
    [13, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 175,
  clc$optional_parameter, 0, 0],
{ PARAMETER 3
    [11, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 20, clc$optional_parameter,
  0, 0],
{ PARAMETER 4
    [14, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 19, clc$optional_parameter,
  0, 0],
{ PARAMETER 5
    [7, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 119,
  clc$optional_default_parameter, 0, 6],
{ PARAMETER 6
    [9, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_default_parameter, 0, 5],
{ PARAMETER 7
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 20, clc$optional_parameter,
  0, 0],
{ PARAMETER 8
    [17, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$list_type], [636, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$keyword_type], [17], [
      ['BI                             ', clc$nominal_entry, clc$normal_usage_entry, 3],
      ['CB                             ', clc$nominal_entry, clc$normal_usage_entry, 9],
      ['ET                             ', clc$nominal_entry, clc$normal_usage_entry, 10],
      ['EX                             ', clc$nominal_entry, clc$normal_usage_entry, 6],
      ['FB                             ', clc$nominal_entry, clc$normal_usage_entry, 16],
      ['FX                             ', clc$nominal_entry, clc$normal_usage_entry, 13],
      ['GP                             ', clc$nominal_entry, clc$normal_usage_entry, 8],
      ['LP                             ', clc$nominal_entry, clc$normal_usage_entry, 7],
      ['NA                             ', clc$nominal_entry, clc$normal_usage_entry, 17],
      ['RD                             ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['RK                             ', clc$nominal_entry, clc$normal_usage_entry, 2],
      ['RT                             ', clc$nominal_entry, clc$normal_usage_entry, 15],
      ['SH                             ', clc$nominal_entry, clc$normal_usage_entry, 12],
      ['ST                             ', clc$nominal_entry, clc$normal_usage_entry, 14],
      ['WK                             ', clc$nominal_entry, clc$normal_usage_entry, 5],
      ['WR                             ', clc$nominal_entry, clc$normal_usage_entry, 11],
      ['WT                             ', clc$nominal_entry, clc$normal_usage_entry, 4]]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$record_type], [3],
    ['R1                             ', clc$required_field, 20], [[1, 0, clc$integer_type], [osc$invalid_ring
  , osc$max_ring, 10]],
    ['R2                             ', clc$required_field, 20], [[1, 0, clc$integer_type], [osc$invalid_ring
  , osc$max_ring, 10]],
    ['R3                             ', clc$required_field, 20], [[1, 0, clc$integer_type], [osc$invalid_ring
  , osc$max_ring, 10]]
    ],
{ PARAMETER 3
    [[1, 0, clc$integer_type], [0, osc$maximum_segment, 10]],
{ PARAMETER 4
    [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$program_name_type]]
    ],
{ PARAMETER 5
    [[1, 0, clc$record_type], [2],
    ['GLOBAL                         ', clc$required_field, 20], [[1, 0, clc$integer_type], [0, 3f(16), 10]],
    ['LOCAL                          ', clc$required_field, 20], [[1, 0, clc$integer_type], [0, 3f(16), 10]]
    ,
    '(0, 0)'],
{ PARAMETER 6
    [[1, 0, clc$boolean_type],
    'false'],
{ PARAMETER 7
    [[1, 0, clc$integer_type], [0, (osc$max_segment_length - 1), 10]],
{ PARAMETER 8
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$attribute = 1,
      p$ring_brackets = 2,
      p$number = 3,
      p$section_name = 4,
      p$global_local_key = 5,
      p$inhibit_binding_check = 6,
      p$first_byte_offset = 7,
      p$status = 8;

    VAR
      pvt: array [1 .. 8] of clt$parameter_value;

    VAR
      sd: oct$output_segment_descriptor,
      section_names: ^oct$section_name_list,
      space: ^SEQ ( * );


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    sd.link := NIL;
    sd.sections_allocated.link := NIL;

    crack_ring_brackets_parameter (pvt [p$ring_brackets], sd.r1, sd.r2, sd.r3, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    crack_key_lock_parameter (pvt [p$global_local_key], sd.global_key, sd.local_key, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    crack_segment_number_parameter (pvt [p$number], sd.number_predefined, sd.number, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    crack_section_name_parameter (pvt [p$section_name], section_names, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    sd.inhibit_binding_check := pvt [p$inhibit_binding_check].value^.boolean_value.value;

    crack_segment_attributes_param (pvt [p$attribute], sd.inhibit_binding_check, sd.used_attributes,
          sd.unused_attributes, sd.extensible_attribute, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    CASE link_parameters.mode OF
    = occ$template, occ$product =
      pmp$get_unique_name (sd.name, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      ocp$open_output_segment (sd.name, sd.id, sd.segment, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

    ELSE { = occ$mc68000 =

      sd.segment.kind := amc$sequence_pointer;
      sd.segment.sequence_pointer := link_parameters.mc68000_seq;
      sd.offset := 0;

      IF pvt [p$first_byte_offset].specified THEN

        sd.offset := pvt [p$first_byte_offset].value^.integer_value.value;

        IF sd.offset <> 0 THEN
          NEXT space: [[REP sd.offset OF cell]] IN sd.segment.sequence_pointer;
        IFEND;
      IFEND;
    CASEND;

    sd.retained_common_block := FALSE;
    sd.relocation_list.link := NIL;
    sd.binding_section_encountered := FALSE;
    sd.binding_section_segment := 0;
    sd.binding_section_offset := 0;
    sd.number_of_bytes_written := 0;
    sd.cybil_default_heap := FALSE;

    ocp$add_to_predefined_segments (^sd, section_names, status);
    IF NOT status.normal THEN
      ocp$close_predefined_segments (^sd);
      RETURN;
    IFEND;

    ve_generator_not_executed := TRUE;


  PROCEND define_segment;
?? OLDTITLE ??
?? NEWTITLE := 'add_object_file', EJECT ??

  PROCEDURE add_object_file
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (ocm$linve_addof) add_object_file, addof (
{   file, f: file = $required
{   ring_brackets, rb: record
{       r1: integer osc$invalid_ring..osc$max_ring
{       r2: integer osc$invalid_ring..osc$max_ring
{       r3: integer osc$invalid_ring..osc$max_ring
{     recend = $optional
{   global_local_key, glk: record
{       global: integer 0..3f(16)
{       local: integer 0..3f(16)
{     recend = (0, 0)
{   execute_privilege, ep: key
{       (execute, e)
{       (local, l)
{       (global, g)
{     keyend = execute
{   default_section, default_sections, ds: list of record
{       section_name: program_name
{       section_attributes: list rest of key
{         (read, r)
{         (write, w)
{         (execute, e)
{         (binding, b)
{       keyend
{     recend = $optional
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 12] of clt$pdt_parameter_name,
      parameters: array [1 .. 6] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$record_type_qualifier,
        field_spec_1: clt$field_specification,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        field_spec_2: clt$field_specification,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        field_spec_3: clt$field_specification,
        element_type_spec_3: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$record_type_qualifier,
        field_spec_1: clt$field_specification,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        field_spec_2: clt$field_specification,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        default_value: string (6),
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 6] of clt$keyword_specification,
        default_value: string (7),
      recend,
      type5: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$list_type_qualifier,
            element_type_spec: record
              header: clt$type_specification_header,
              qualifier: clt$keyword_type_qualifier,
              keyword_specs: array [1 .. 8] of clt$keyword_specification,
            recend,
          recend,
        recend,
      recend,
      type6: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 13, 12, 10, 46, 503],
    clc$command, 12, 6, 1, 0, 0, 0, 6, 'OCM$LINVE_ADDOF'], [
    ['DEFAULT_SECTION                ',clc$nominal_entry, 5],
    ['DEFAULT_SECTIONS               ',clc$alias_entry, 5],
    ['DS                             ',clc$abbreviation_entry, 5],
    ['EP                             ',clc$abbreviation_entry, 4],
    ['EXECUTE_PRIVILEGE              ',clc$nominal_entry, 4],
    ['F                              ',clc$abbreviation_entry, 1],
    ['FILE                           ',clc$nominal_entry, 1],
    ['GLK                            ',clc$abbreviation_entry, 3],
    ['GLOBAL_LOCAL_KEY               ',clc$nominal_entry, 3],
    ['RB                             ',clc$abbreviation_entry, 2],
    ['RING_BRACKETS                  ',clc$nominal_entry, 2],
    ['STATUS                         ',clc$nominal_entry, 6]],
    [
{ PARAMETER 1
    [7, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [11, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 175,
  clc$optional_parameter, 0, 0],
{ PARAMETER 3
    [9, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 119,
  clc$optional_default_parameter, 0, 6],
{ PARAMETER 4
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 229,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 5
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 417,
  clc$optional_parameter, 0, 0],
{ PARAMETER 6
    [12, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$file_type]],
{ PARAMETER 2
    [[1, 0, clc$record_type], [3],
    ['R1                             ', clc$required_field, 20], [[1, 0, clc$integer_type], [osc$invalid_ring
  , osc$max_ring, 10]],
    ['R2                             ', clc$required_field, 20], [[1, 0, clc$integer_type], [osc$invalid_ring
  , osc$max_ring, 10]],
    ['R3                             ', clc$required_field, 20], [[1, 0, clc$integer_type], [osc$invalid_ring
  , osc$max_ring, 10]]
    ],
{ PARAMETER 3
    [[1, 0, clc$record_type], [2],
    ['GLOBAL                         ', clc$required_field, 20], [[1, 0, clc$integer_type], [0, 3f(16), 10]],
    ['LOCAL                          ', clc$required_field, 20], [[1, 0, clc$integer_type], [0, 3f(16), 10]]
    ,
    '(0, 0)'],
{ PARAMETER 4
    [[1, 0, clc$keyword_type], [6], [
    ['E                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['EXECUTE                        ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['G                              ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
    ['GLOBAL                         ', clc$nominal_entry, clc$normal_usage_entry, 3],
    ['L                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['LOCAL                          ', clc$nominal_entry, clc$normal_usage_entry, 2]]
    ,
    'execute'],
{ PARAMETER 5
    [[1, 0, clc$list_type], [401, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$record_type], [2],
      ['SECTION_NAME                   ', clc$required_field, 3], [[1, 0, clc$program_name_type]],
      ['SECTION_ATTRIBUTES             ', clc$required_field, 319], [[1, 0, clc$list_type], [303, 0,
  clc$max_list_size, TRUE],
          [[1, 0, clc$keyword_type], [8], [
          ['B                              ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
          ['BINDING                        ', clc$nominal_entry, clc$normal_usage_entry, 4],
          ['E                              ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
          ['EXECUTE                        ', clc$nominal_entry, clc$normal_usage_entry, 3],
          ['R                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
          ['READ                           ', clc$nominal_entry, clc$normal_usage_entry, 1],
          ['W                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
          ['WRITE                          ', clc$nominal_entry, clc$normal_usage_entry, 2]]
          ]
        ]
      ]
    ],
{ PARAMETER 6
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$file = 1,
      p$ring_brackets = 2,
      p$global_local_key = 3,
      p$execute_privilege = 4,
      p$default_section = 5,
      p$status = 6;

    VAR
      pvt: array [1 .. 6] of clt$parameter_value;

    VAR
      ofd: oct$object_file_descriptor;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF ocp$duplicate_file (pvt [p$file].value^.file_value^, ocv$known_file_list) THEN
      osp$set_status_abnormal ('OC', oce$e_duplicate_file_named, pvt [p$file].value^.file_value^, status);
      RETURN;
    IFEND;

    NEXT ofd.name: [STRLENGTH (pvt [p$file].value^.file_value^)] IN ocv$vel_scratch_seq;
    IF ofd.name = NIL THEN
      osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH10', status);
      RETURN;
    IFEND;
    ofd.name^ := pvt [p$file].value^.file_value^;
    ofd.link := NIL;

    crack_ring_brackets_parameter (pvt [p$ring_brackets], ofd.r1, ofd.r2, ofd.r3, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    crack_key_lock_parameter (pvt [p$global_local_key], ofd.global_key, ofd.local_key, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    crack_execute_privilege_param (pvt [p$execute_privilege], ofd.execute_privilege);

    crack_default_section_parameter (pvt [p$default_section], ofd.default_sections, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    ocp$open_linker_object_file (^ofd, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    ocp$add_to_object_file_list (^ofd, ^link_parameters.object_files_to_add, status);
    IF NOT status.normal THEN
      ocp$close_linker_object_files (^ofd);
      RETURN;
    IFEND;

    ocp$add_to_known_files (pvt [p$file].value^.file_value^, ocv$known_file_list, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    ve_generator_not_executed := TRUE;

  PROCEND add_object_file;
?? OLDTITLE ??
?? NEWTITLE := 'add_object_module', EJECT ??

  PROCEDURE add_object_module
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_addom) add_object_module, add_object_modules, addom (
{   module, modules, m: list of program_name = $required
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 22, 19, 953],
    clc$command, 4, 2, 1, 0, 0, 0, 2, 'OCM$LINVE_ADDOM'], [
    ['M                              ',clc$abbreviation_entry, 1],
    ['MODULE                         ',clc$nominal_entry, 1],
    ['MODULES                        ',clc$alias_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 19, clc$required_parameter,
  0, 0],
{ PARAMETER 2
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$program_name_type]]
    ],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$module = 1,
      p$status = 2;

    VAR
      pvt: array [1 .. 2] of clt$parameter_value;

    VAR
      data_value: ^clt$data_value,
      last_module: ^oct$program_name_list,
      module_found: boolean,
      module_name: pmt$program_name,
      new_modules: oct$program_name_list;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    new_modules.link := NIL;

    data_value := pvt [p$module].value;
    WHILE data_value <> NIL DO
      module_name := data_value^.element_value^.program_name_value;

      ocp$search_modules_to_add (link_parameters.modules_to_add, module_name, module_found, last_module);
      IF module_found THEN
        osp$set_status_abnormal ('OC', oce$e_duplicate_module_named, module_name, status);
        RETURN;
      IFEND;

      ocp$search_modules_to_add (new_modules, module_name, module_found, last_module);
      IF module_found THEN
        osp$set_status_abnormal ('OC', oce$e_duplicate_module_named, module_name, status);
        RETURN;
      IFEND;

      NEXT last_module^.link IN ocv$vel_scratch_seq;
      last_module := last_module^.link;
      IF last_module = NIL THEN
        osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH11', status);
        RETURN;
      IFEND;

      last_module^.name := module_name;
      last_module^.link := NIL;

      data_value := data_value^.link;
    WHILEND;

    ocp$search_modules_to_add (link_parameters.modules_to_add, osc$null_name, module_found, last_module);
    last_module^.link := new_modules.link;

    ve_generator_not_executed := TRUE;


  PROCEND add_object_module;
?? OLDTITLE ??
?? NEWTITLE := 'use_object_library', EJECT ??

  PROCEDURE use_object_library
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (ocm$linve_useol) use_object_library, use_object_libraries, useol (
{   library, libraries, l: list of file = $required
{   ring_brackets, rb: record
{       r1: integer osc$invalid_ring..osc$max_ring
{       r2: integer osc$invalid_ring..osc$max_ring
{       r3: integer osc$invalid_ring..osc$max_ring
{     recend = $optional
{   global_local_key, glk: record
{       global: integer 0..3f(16)
{       local: integer 0..3f(16)
{     recend = (0, 0)
{   execute_privilege, ep: key
{       (execute, e)
{       (local, l)
{       (global, g)
{     keyend = execute
{   default_section, default_sections, ds: list of record
{       section_name: program_name
{       section_attributes: list rest of key
{         (read, r)
{         (write, w)
{         (execute, e)
{         (binding, b)
{       keyend
{     recend = $optional
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 13] of clt$pdt_parameter_name,
      parameters: array [1 .. 6] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$record_type_qualifier,
        field_spec_1: clt$field_specification,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        field_spec_2: clt$field_specification,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        field_spec_3: clt$field_specification,
        element_type_spec_3: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$record_type_qualifier,
        field_spec_1: clt$field_specification,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        field_spec_2: clt$field_specification,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        default_value: string (6),
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 6] of clt$keyword_specification,
        default_value: string (7),
      recend,
      type5: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$list_type_qualifier,
            element_type_spec: record
              header: clt$type_specification_header,
              qualifier: clt$keyword_type_qualifier,
              keyword_specs: array [1 .. 8] of clt$keyword_specification,
            recend,
          recend,
        recend,
      recend,
      type6: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 13, 12, 11, 42, 282],
    clc$command, 13, 6, 1, 0, 0, 0, 6, 'OCM$LINVE_USEOL'], [
    ['DEFAULT_SECTION                ',clc$nominal_entry, 5],
    ['DEFAULT_SECTIONS               ',clc$alias_entry, 5],
    ['DS                             ',clc$abbreviation_entry, 5],
    ['EP                             ',clc$abbreviation_entry, 4],
    ['EXECUTE_PRIVILEGE              ',clc$nominal_entry, 4],
    ['GLK                            ',clc$abbreviation_entry, 3],
    ['GLOBAL_LOCAL_KEY               ',clc$nominal_entry, 3],
    ['L                              ',clc$abbreviation_entry, 1],
    ['LIBRARIES                      ',clc$alias_entry, 1],
    ['LIBRARY                        ',clc$nominal_entry, 1],
    ['RB                             ',clc$abbreviation_entry, 2],
    ['RING_BRACKETS                  ',clc$nominal_entry, 2],
    ['STATUS                         ',clc$nominal_entry, 6]],
    [
{ PARAMETER 1
    [10, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 19, clc$required_parameter,
  0, 0],
{ PARAMETER 2
    [12, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 175,
  clc$optional_parameter, 0, 0],
{ PARAMETER 3
    [7, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 119,
  clc$optional_default_parameter, 0, 6],
{ PARAMETER 4
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 229,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 5
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 417,
  clc$optional_parameter, 0, 0],
{ PARAMETER 6
    [13, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$file_type]]
    ],
{ PARAMETER 2
    [[1, 0, clc$record_type], [3],
    ['R1                             ', clc$required_field, 20], [[1, 0, clc$integer_type], [osc$invalid_ring
  , osc$max_ring, 10]],
    ['R2                             ', clc$required_field, 20], [[1, 0, clc$integer_type], [osc$invalid_ring
  , osc$max_ring, 10]],
    ['R3                             ', clc$required_field, 20], [[1, 0, clc$integer_type], [osc$invalid_ring
  , osc$max_ring, 10]]
    ],
{ PARAMETER 3
    [[1, 0, clc$record_type], [2],
    ['GLOBAL                         ', clc$required_field, 20], [[1, 0, clc$integer_type], [0, 3f(16), 10]],
    ['LOCAL                          ', clc$required_field, 20], [[1, 0, clc$integer_type], [0, 3f(16), 10]]
    ,
    '(0, 0)'],
{ PARAMETER 4
    [[1, 0, clc$keyword_type], [6], [
    ['E                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['EXECUTE                        ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['G                              ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
    ['GLOBAL                         ', clc$nominal_entry, clc$normal_usage_entry, 3],
    ['L                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['LOCAL                          ', clc$nominal_entry, clc$normal_usage_entry, 2]]
    ,
    'execute'],
{ PARAMETER 5
    [[1, 0, clc$list_type], [401, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$record_type], [2],
      ['SECTION_NAME                   ', clc$required_field, 3], [[1, 0, clc$program_name_type]],
      ['SECTION_ATTRIBUTES             ', clc$required_field, 319], [[1, 0, clc$list_type], [303, 0,
  clc$max_list_size, TRUE],
          [[1, 0, clc$keyword_type], [8], [
          ['B                              ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
          ['BINDING                        ', clc$nominal_entry, clc$normal_usage_entry, 4],
          ['E                              ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
          ['EXECUTE                        ', clc$nominal_entry, clc$normal_usage_entry, 3],
          ['R                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
          ['READ                           ', clc$nominal_entry, clc$normal_usage_entry, 1],
          ['W                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
          ['WRITE                          ', clc$nominal_entry, clc$normal_usage_entry, 2]]
          ]
        ]
      ]
    ],
{ PARAMETER 6
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$library = 1,
      p$ring_brackets = 2,
      p$global_local_key = 3,
      p$execute_privilege = 4,
      p$default_section = 5,
      p$status = 6;

    VAR
      pvt: array [1 .. 6] of clt$parameter_value;

    VAR
      data_value: ^clt$data_value,
      last_library_descriptor: ^oct$object_file_descriptor,
      last_library_name: ^oct$known_file_list,
      new_library_list: oct$object_file_descriptor,
      new_library_names: oct$known_file_list,
      ofd: oct$object_file_descriptor;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    crack_ring_brackets_parameter (pvt [p$ring_brackets], ofd.r1, ofd.r2, ofd.r3, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    crack_key_lock_parameter (pvt [p$global_local_key], ofd.global_key, ofd.local_key, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    crack_execute_privilege_param (pvt [p$execute_privilege], ofd.execute_privilege);

    crack_default_section_parameter (pvt [p$default_section], ofd.default_sections, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    new_library_list.link := NIL;
    new_library_names.name := NIL;
    new_library_names.link := NIL;

    data_value := pvt [p$library].value;

    WHILE data_value <> NIL DO
      NEXT ofd.name: [STRLENGTH (data_value^.element_value^.file_value^)] IN ocv$vel_scratch_seq;
      IF ofd.name = NIL THEN
        osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH12', status);
        ocp$close_linker_object_files (new_library_list.link);
        RETURN;
      IFEND;
      ofd.name^ := data_value^.element_value^.file_value^;
      ofd.link := NIL;

      IF ocp$duplicate_file (ofd.name^, ocv$known_file_list) OR
            ocp$duplicate_file (ofd.name^, new_library_names) THEN
        osp$set_status_abnormal ('OC', oce$e_duplicate_file_named, ofd.name^, status);
        ocp$close_linker_object_files (new_library_list.link);
        RETURN;
      IFEND;

      ocp$add_to_known_files (ofd.name^, new_library_names, status);
      IF NOT status.normal THEN
        ocp$close_linker_object_files (new_library_list.link);
        RETURN;
      IFEND;

      ocp$open_linker_object_file (^ofd, status);
      IF NOT status.normal THEN
        ocp$close_linker_object_files (new_library_list.link);
        RETURN;
      IFEND;

      IF NOT ofd.is_a_library THEN
        osp$set_status_abnormal ('OC', oce$e_file_is_not_library, ofd.name^, status);
        ocp$close_linker_object_files (^ofd);
        ocp$close_linker_object_files (new_library_list.link);
        RETURN;
      IFEND;

      ocp$add_to_object_file_list (^ofd, ^new_library_list, status);
      IF NOT status.normal THEN
        ocp$close_linker_object_files (new_library_list.link);
        RETURN;
      IFEND;

      data_value := data_value^.link;
    WHILEND;

    last_library_descriptor := ^link_parameters.object_libraries_to_use;
    WHILE (last_library_descriptor^.link <> NIL) DO
      last_library_descriptor := last_library_descriptor^.link;
    WHILEND;
    last_library_descriptor^.link := new_library_list.link;

    last_library_name := ^ocv$known_file_list;
    WHILE last_library_name^.link <> NIL DO
      last_library_name := last_library_name^.link;
    WHILEND;
    last_library_name^.link := new_library_names.link;

    ve_generator_not_executed := TRUE;


  PROCEND use_object_library;
?? OLDTITLE ??
?? NEWTITLE := 'use_symbol_table', EJECT ??

  PROCEDURE use_symbol_table
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_usest) use_symbol_table, use_symbol_tables, usest (
{   symbol_table, symbol_tables, st: list of file = $required
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 22, 51, 810],
    clc$command, 4, 2, 1, 0, 0, 0, 2, 'OCM$LINVE_USEST'], [
    ['ST                             ',clc$abbreviation_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2],
    ['SYMBOL_TABLE                   ',clc$nominal_entry, 1],
    ['SYMBOL_TABLES                  ',clc$alias_entry, 1]],
    [
{ PARAMETER 1
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 19, clc$required_parameter,
  0, 0],
{ PARAMETER 2
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$file_type]]
    ],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$symbol_table = 1,
      p$status = 2;

    VAR
      pvt: array [1 .. 2] of clt$parameter_value;

    VAR
      data_value: ^clt$data_value,
      last_symbol_table_descriptor: ^oct$symbol_table_descriptor,
      last_symbol_table_name: ^oct$known_file_list,
      new_linker_symbol_tables: oct$symbol_table_descriptor,
      new_symbol_table_names: oct$known_file_list,
      std: oct$symbol_table_descriptor;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    new_linker_symbol_tables.link := NIL;
    new_symbol_table_names.name := NIL;
    new_symbol_table_names.link := NIL;

    data_value := pvt [p$symbol_table].value;

    WHILE data_value <> NIL DO
      NEXT std.name: [STRLENGTH (data_value^.element_value^.file_value^)] IN ocv$vel_scratch_seq;
      IF std.name = NIL THEN
        osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH13', status);
        ocp$close_linker_symbol_tables (new_linker_symbol_tables.link);
        RETURN;
      IFEND;
      std.name^ := data_value^.element_value^.file_value^;
      std.link := NIL;

      IF ocp$duplicate_file (std.name^, ocv$known_file_list) OR
            ocp$duplicate_file (std.name^, new_symbol_table_names) THEN
        osp$set_status_abnormal ('OC', oce$e_duplicate_file_named, std.name^, status);
        ocp$close_linker_symbol_tables (new_linker_symbol_tables.link);
        RETURN;
      IFEND;

      ocp$add_to_known_files (std.name^, new_symbol_table_names, status);
      IF NOT status.normal THEN
        ocp$close_linker_symbol_tables (new_linker_symbol_tables.link);
        RETURN;
      IFEND;

      ocp$open_linker_symbol_table (^std, status);
      IF NOT status.normal THEN
        ocp$close_linker_symbol_tables (new_linker_symbol_tables.link);
        RETURN;
      IFEND;

      ocp$add_to_symbol_table_list (^std, ^new_linker_symbol_tables, status);
      IF NOT status.normal THEN
        ocp$close_linker_symbol_tables (^std);
        ocp$close_linker_symbol_tables (new_linker_symbol_tables.link);
        RETURN;
      IFEND;

      data_value := data_value^.link;
    WHILEND;

    last_symbol_table_descriptor := ^link_parameters.symbol_tables_to_use;
    WHILE last_symbol_table_descriptor^.link <> NIL DO
      last_symbol_table_descriptor := last_symbol_table_descriptor^.link;
    WHILEND;
    last_symbol_table_descriptor^.link := new_linker_symbol_tables.link;

    last_symbol_table_name := ^ocv$known_file_list;
    WHILE last_symbol_table_name^.link <> NIL DO
      last_symbol_table_name := last_symbol_table_name^.link;
    WHILEND;
    last_symbol_table_name^.link := new_symbol_table_names.link;

    ve_generator_not_executed := TRUE;

  PROCEND use_symbol_table;
?? OLDTITLE ??
?? NEWTITLE := 'retain_common_blocks', EJECT ??

  PROCEDURE retain_common_blocks
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_retcb) retain_common_blocks, retain_common_block, retcb (
{   name, names, n: list of program_name = $required
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 23, 2, 866],
    clc$command, 4, 2, 1, 0, 0, 0, 2, 'OCM$LINVE_RETCB'], [
    ['N                              ',clc$abbreviation_entry, 1],
    ['NAME                           ',clc$nominal_entry, 1],
    ['NAMES                          ',clc$alias_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 19, clc$required_parameter,
  0, 0],
{ PARAMETER 2
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$program_name_type]]
    ],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$name = 1,
      p$status = 2;

    VAR
      pvt: array [1 .. 2] of clt$parameter_value;

    VAR
      data_value: ^clt$data_value,
      last_common_block: ^oct$program_name_list,
      name: pmt$program_name,
      new_common_blocks: oct$program_name_list;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF (link_parameters.common_blocks_to_retain.name = occ$retain_all_common_blocks) THEN
      RETURN; { ---->
    IFEND;

    new_common_blocks.link := NIL;
    last_common_block := ^new_common_blocks;

    data_value := pvt [p$name].value;

  /get_common_block_names/
    WHILE data_value <> NIL DO
      name := data_value^.element_value^.program_name_value;

      IF (name = 'ALL') THEN
        link_parameters.common_blocks_to_retain.name := occ$retain_all_common_blocks;
        link_parameters.common_blocks_to_retain.link := NIL;
        new_common_blocks.link := NIL;
        EXIT /get_common_block_names/;
      IFEND;

      NEXT last_common_block^.link IN ocv$vel_scratch_seq;
      last_common_block := last_common_block^.link;
      IF last_common_block = NIL THEN
        osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH14', status);
        RETURN;
      IFEND;

      last_common_block^.name := name;
      last_common_block^.link := NIL;

      data_value := data_value^.link;
    WHILEND /get_common_block_names/;

    last_common_block := ^link_parameters.common_blocks_to_retain;
    WHILE last_common_block^.link <> NIL DO
      last_common_block := last_common_block^.link;
    WHILEND;

    last_common_block^.link := new_common_blocks.link;

    ve_generator_not_executed := TRUE;


  PROCEND retain_common_blocks;
?? OLDTITLE ??
?? NEWTITLE := 'include_linked_symbols', EJECT ??

  PROCEDURE include_linked_symbols
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_incls) include_linked_symbols, incls (
{   pointer, p: program_name = $required
{   section, s: program_name = $required
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 5] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 23, 23, 709],
    clc$command, 5, 3, 2, 0, 0, 0, 3, 'OCM$LINVE_INCLS'], [
    ['P                              ',clc$abbreviation_entry, 1],
    ['POINTER                        ',clc$nominal_entry, 1],
    ['S                              ',clc$abbreviation_entry, 2],
    ['SECTION                        ',clc$nominal_entry, 2],
    ['STATUS                         ',clc$nominal_entry, 3]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 3
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$program_name_type]],
{ PARAMETER 2
    [[1, 0, clc$program_name_type]],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$pointer = 1,
      p$section = 2,
      p$status = 3;

    VAR
      pvt: array [1 .. 3] of clt$parameter_value;

    VAR
      last: ^oct$pointer_list,
      pointer: ^oct$pointer_list;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    NEXT pointer IN ocv$vel_scratch_seq;
    IF pointer = NIL THEN
      osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH15', status);
      RETURN;
    IFEND;

    pointer^.name := pvt [p$pointer].value^.program_name_value;
    pointer^.section_name := pvt [p$section].value^.program_name_value;
    pointer^.link := NIL;

    last := ^link_parameters.symbol_table_pointers;
    WHILE last^.link <> NIL DO
      last := last^.link;
    WHILEND;

    last^.link := pointer;

    ve_generator_not_executed := TRUE;


  PROCEND include_linked_symbols;
?? OLDTITLE ??
?? NEWTITLE := 'include_message_module', EJECT ??

  PROCEDURE include_message_module
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_incmm) include_message_module, incmm (
{   module, m: program_name = $required
{   pointer, p: program_name = $required
{   section, s: program_name = $required
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 7] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 24, 18, 542],
    clc$command, 7, 4, 3, 0, 0, 0, 4, 'OCM$LINVE_INCMM'], [
    ['M                              ',clc$abbreviation_entry, 1],
    ['MODULE                         ',clc$nominal_entry, 1],
    ['P                              ',clc$abbreviation_entry, 2],
    ['POINTER                        ',clc$nominal_entry, 2],
    ['S                              ',clc$abbreviation_entry, 3],
    ['SECTION                        ',clc$nominal_entry, 3],
    ['STATUS                         ',clc$nominal_entry, 4]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 3
    [6, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 4
    [7, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$program_name_type]],
{ PARAMETER 2
    [[1, 0, clc$program_name_type]],
{ PARAMETER 3
    [[1, 0, clc$program_name_type]],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$module = 1,
      p$pointer = 2,
      p$section = 3,
      p$status = 4;

    VAR
      pvt: array [1 .. 4] of clt$parameter_value;

    VAR
      last: ^^oct$message_module_list,
      pointer: ^oct$message_module_list;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    NEXT pointer IN ocv$vel_scratch_seq;
    IF pointer = NIL THEN
      osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH16', status);
      RETURN;
    IFEND;

    pointer^.module_name := pvt [p$module].value^.program_name_value;
    pointer^.pointer_name := pvt [p$pointer].value^.program_name_value;
    pointer^.section_name := pvt [p$section].value^.program_name_value;

    pointer^.link := NIL;

    last := ^link_parameters.message_module_list;
    WHILE last^ <> NIL DO
      last := ^last^^.link;
    WHILEND;
    last^ := pointer;

    ve_generator_not_executed := TRUE;


  PROCEND include_message_module;
?? OLDTITLE ??
?? NEWTITLE := 'include_recovery_name_table', EJECT ??

  PROCEDURE include_recovery_name_table
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_incrnt) include_recovery_name_table, incrnt (
{   pointer, p: program_name = $required
{   section, s: program_name = $required
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 5] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 24, 34, 598],
    clc$command, 5, 3, 2, 0, 0, 0, 3, 'OCM$LINVE_INCRNT'], [
    ['P                              ',clc$abbreviation_entry, 1],
    ['POINTER                        ',clc$nominal_entry, 1],
    ['S                              ',clc$abbreviation_entry, 2],
    ['SECTION                        ',clc$nominal_entry, 2],
    ['STATUS                         ',clc$nominal_entry, 3]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 3
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$program_name_type]],
{ PARAMETER 2
    [[1, 0, clc$program_name_type]],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$pointer = 1,
      p$section = 2,
      p$status = 3;

    VAR
      pvt: array [1 .. 3] of clt$parameter_value;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    link_parameters.recovery_name_table_pointer.name := pvt [p$pointer].value^.program_name_value;
    link_parameters.recovery_name_table_pointer.section_name := pvt [p$section].value^.program_name_value;

    ve_generator_not_executed := TRUE;


  PROCEND include_recovery_name_table;
?? OLDTITLE ??
?? NEWTITLE := 'add_recovery_addresses', EJECT ??

  PROCEDURE add_recovery_addresses
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_addra) add_recovery_addresses, add_recovery_address, addra (
{   name, names, n: list of program_name = $required
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 24, 51, 907],
    clc$command, 4, 2, 1, 0, 0, 0, 2, 'OCM$LINVE_ADDRA'], [
    ['N                              ',clc$abbreviation_entry, 1],
    ['NAME                           ',clc$nominal_entry, 1],
    ['NAMES                          ',clc$alias_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 19, clc$required_parameter,
  0, 0],
{ PARAMETER 2
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$program_name_type]]
    ],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$name = 1,
      p$status = 2;

    VAR
      pvt: array [1 .. 2] of clt$parameter_value;

    VAR
      data_value: ^clt$data_value,
      last_address: ^oct$program_name_list,
      new_addresses: oct$program_name_list;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    new_addresses.link := NIL;
    last_address := ^new_addresses;

    data_value := pvt [p$name].value;
    WHILE data_value <> NIL DO
      NEXT last_address^.link IN ocv$vel_scratch_seq;
      last_address := last_address^.link;
      IF last_address = NIL THEN
        osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH17', status);
        RETURN;
      IFEND;

      last_address^.name := data_value^.element_value^.program_name_value;
      last_address^.link := NIL;

      data_value := data_value^.link;
    WHILEND;

    last_address := ^link_parameters.recovery_addresses;
    WHILE last_address^.link <> NIL DO
      last_address := last_address^.link;
    WHILEND;

    last_address^.link := new_addresses.link;

    ve_generator_not_executed := TRUE;

  PROCEND add_recovery_addresses;
?? OLDTITLE ??
?? NEWTITLE := 'initailize_heap_pointer', EJECT ??

  PROCEDURE initialize_heap_pointer
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_inihp) initialize_heap_pointer, inihp (
{   pointer, p: program_name = $required
{   section, s: program_name = $optional
{   segment_number, sn: integer 0..osc$maximum_segment = $optional
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 7] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 25, 10, 516],
    clc$command, 7, 4, 1, 0, 0, 0, 4, 'OCM$LINVE_INIHP'], [
    ['P                              ',clc$abbreviation_entry, 1],
    ['POINTER                        ',clc$nominal_entry, 1],
    ['S                              ',clc$abbreviation_entry, 2],
    ['SECTION                        ',clc$nominal_entry, 2],
    ['SEGMENT_NUMBER                 ',clc$nominal_entry, 3],
    ['SN                             ',clc$abbreviation_entry, 3],
    ['STATUS                         ',clc$nominal_entry, 4]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$optional_parameter, 0
  , 0],
{ PARAMETER 3
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 20, clc$optional_parameter,
  0, 0],
{ PARAMETER 4
    [7, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$program_name_type]],
{ PARAMETER 2
    [[1, 0, clc$program_name_type]],
{ PARAMETER 3
    [[1, 0, clc$integer_type], [0, osc$maximum_segment, 10]],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$pointer = 1,
      p$section = 2,
      p$segment_number = 3,
      p$status = 4;

    VAR
      pvt: array [1 .. 4] of clt$parameter_value;

    VAR
      last: ^oct$pointer_list,
      pointer: ^oct$pointer_list;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    NEXT pointer IN ocv$vel_scratch_seq;
    IF pointer = NIL THEN
      osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH18', status);
      RETURN;
    IFEND;

    pointer^.name := pvt [p$pointer].value^.program_name_value;

    IF pvt [p$section].specified THEN
      pointer^.section_name := pvt [p$section].value^.program_name_value;
    ELSE
      pointer^.section_name := osc$null_name;
    IFEND;

    IF pvt [p$segment_number].specified THEN
      IF pointer^.section_name = osc$null_name THEN
        pointer^.segment_number := pvt [p$segment_number].value^.integer_value.value;
      ELSE
        osp$set_status_condition (oce$e_section_segment_together, status);
        RETURN;
      IFEND;
    ELSE
      IF pointer^.section_name = osc$null_name THEN
        osp$set_status_condition (oce$e_missing_section_segment, status);
        RETURN;
      IFEND;
    IFEND;

    pointer^.link := NIL;

    last := ^link_parameters.heap_pointers;
    WHILE last^.link <> NIL DO
      last := last^.link;
    WHILEND;

    last^.link := pointer;

    ve_generator_not_executed := TRUE;


  PROCEND initialize_heap_pointer;
?? OLDTITLE ??
?? NEWTITLE := 'use_debug_table', EJECT ??

  PROCEDURE use_debug_table
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_usedt) use_debug_table, usedt (
{   debug_table, dt: file = $required
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 3] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 25, 25, 875],
    clc$command, 3, 2, 1, 0, 0, 0, 2, 'OCM$LINVE_USEDT'], [
    ['DEBUG_TABLE                    ',clc$nominal_entry, 1],
    ['DT                             ',clc$abbreviation_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$file_type]],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$debug_table = 1,
      p$status = 2;

    VAR
      pvt: array [1 .. 2] of clt$parameter_value;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    NEXT link_parameters.input_debug_table: [STRLENGTH (pvt [p$debug_table].value^.file_value^)] IN
          ocv$vel_scratch_seq;
    IF link_parameters.input_debug_table = NIL THEN
      osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH19', status);
      RETURN;
    IFEND;
    link_parameters.input_debug_table^ := pvt [p$debug_table].value^.file_value^;

    ve_generator_not_executed := TRUE;

  PROCEND use_debug_table;
?? OLDTITLE ??
?? NEWTITLE := 'include_debug_table', EJECT ??

  PROCEDURE include_debug_table
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_incdt) include_debug_table, incdt (
{   pointer, p: program_name = $required
{   section, s: program_name = $required
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 5] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 25, 39, 35],
    clc$command, 5, 3, 2, 0, 0, 0, 3, 'OCM$LINVE_INCDT'], [
    ['P                              ',clc$abbreviation_entry, 1],
    ['POINTER                        ',clc$nominal_entry, 1],
    ['S                              ',clc$abbreviation_entry, 2],
    ['SECTION                        ',clc$nominal_entry, 2],
    ['STATUS                         ',clc$nominal_entry, 3]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 3
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$program_name_type]],
{ PARAMETER 2
    [[1, 0, clc$program_name_type]],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$pointer = 1,
      p$section = 2,
      p$status = 3;

    VAR
      pvt: array [1 .. 3] of clt$parameter_value;

    VAR
      pointer: ^oct$pointer_list;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    NEXT pointer IN ocv$vel_scratch_seq;
    IF pointer = NIL THEN
      osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH20', status);
      RETURN;
    IFEND;

    pointer^.name := pvt [p$pointer].value^.program_name_value;
    pointer^.section_name := pvt [p$section].value^.program_name_value;

    pointer^.link := NIL;
    link_parameters.debug_table_pointers.link := pointer;

    ve_generator_not_executed := TRUE;


  PROCEND include_debug_table;
?? OLDTITLE ??
?? NEWTITLE := 'set_symbol_table_id', EJECT ??

  PROCEDURE set_symbol_table_id
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_setsti) set_symbol_table_id, setsti (
{   symbol_table, st: file = $required
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 3] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 26, 38, 610],
    clc$command, 3, 2, 1, 0, 0, 0, 2, 'OCM$LINVE_SETSTI'], [
    ['ST                             ',clc$abbreviation_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2],
    ['SYMBOL_TABLE                   ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$file_type]],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$symbol_table = 1,
      p$status = 2;

    VAR
      pvt: array [1 .. 2] of clt$parameter_value;

    VAR
      std: ^oct$symbol_table_descriptor;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    std := link_parameters.symbol_tables_to_use.link;

    WHILE (std <> NIL) AND (pvt [p$symbol_table].value^.file_value^ <> std^.name^) DO
      std := std^.link;
    WHILEND;

    IF std = NIL THEN
      osp$set_status_abnormal ('OC', oce$e_symbol_table_not_defined, pvt [p$symbol_table].value^.file_value^,
            status);

    ELSE
      link_parameters.symbol_table_id := std^.header^.id;
      ve_generator_not_executed := TRUE;
    IFEND;

  PROCEND set_symbol_table_id;
?? OLDTITLE ??
?? NEWTITLE := 'initialize_symbol_table_id', EJECT ??

  PROCEDURE initialize_symbol_table_id
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_inisti) initialize_symbol_table_id, inisti (
{   id, i: program_name = $required
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 3] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 26, 50, 79],
    clc$command, 3, 2, 1, 0, 0, 0, 2, 'OCM$LINVE_INISTI'], [
    ['I                              ',clc$abbreviation_entry, 1],
    ['ID                             ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$program_name_type]],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$id = 1,
      p$status = 2;

    VAR
      pvt: array [1 .. 2] of clt$parameter_value;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    link_parameters.symbol_table_id_variable := pvt [p$id].value^.program_name_value;

    ve_generator_not_executed := TRUE;


  PROCEND initialize_symbol_table_id;
?? OLDTITLE ??
?? NEWTITLE := 'initialize_build_level', EJECT ??

  PROCEDURE initialize_build_level
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_inibl) initialize_build_level, inibl (
{   name, names, n: list of program_name = $required
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 27, 1, 499],
    clc$command, 4, 2, 1, 0, 0, 0, 2, 'OCM$LINVE_INIBL'], [
    ['N                              ',clc$abbreviation_entry, 1],
    ['NAME                           ',clc$nominal_entry, 1],
    ['NAMES                          ',clc$alias_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 19, clc$required_parameter,
  0, 0],
{ PARAMETER 2
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$program_name_type]]
    ],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$name = 1,
      p$status = 2;

    VAR
      pvt: array [1 .. 2] of clt$parameter_value;

    VAR
      data_value: ^clt$data_value,
      last_variable: ^oct$program_name_list,
      new_variables: oct$program_name_list;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    new_variables.link := NIL;
    last_variable := ^new_variables;

    data_value := pvt [p$name].value;
    WHILE data_value <> NIL DO
      NEXT last_variable^.link IN ocv$vel_scratch_seq;
      last_variable := last_variable^.link;
      IF last_variable = NIL THEN
        osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH21', status);
        RETURN;
      IFEND;

      last_variable^.name := data_value^.element_value^.program_name_value;
      last_variable^.link := NIL;

      data_value := data_value^.link;
    WHILEND;

    last_variable := ^link_parameters.build_level_variables;
    WHILE last_variable^.link <> NIL DO
      last_variable := last_variable^.link;
    WHILEND;

    last_variable^.link := new_variables.link;

    ve_generator_not_executed := TRUE;


  PROCEND initialize_build_level;
?? OLDTITLE ??
?? NEWTITLE := 'delete_declaration_matching', EJECT ??

  PROCEDURE delete_declaration_matching
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_deldm) delete_declaration_matching, deldm (
{   entry_points, entry_point, ep: list of program_name = $required
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 27, 23, 461],
    clc$command, 4, 2, 1, 0, 0, 0, 2, 'OCM$LINVE_DELDM'], [
    ['ENTRY_POINT                    ',clc$alias_entry, 1],
    ['ENTRY_POINTS                   ',clc$nominal_entry, 1],
    ['EP                             ',clc$abbreviation_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 19, clc$required_parameter,
  0, 0],
{ PARAMETER 2
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$program_name_type]]
    ],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$entry_points = 1,
      p$status = 2;

    VAR
      pvt: array [1 .. 2] of clt$parameter_value;

    VAR
      data_value: ^clt$data_value,
      last_entry_point: ^oct$program_name_list,
      new_entry_points: oct$program_name_list;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    new_entry_points.link := NIL;
    last_entry_point := ^new_entry_points;

    data_value := pvt [p$entry_points].value;
    WHILE data_value <> NIL DO
      NEXT last_entry_point^.link IN ocv$vel_scratch_seq;
      last_entry_point := last_entry_point^.link;
      IF last_entry_point = NIL THEN
        osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH22', status);
        RETURN;
      IFEND;

      last_entry_point^.name := data_value^.element_value^.program_name_value;
      last_entry_point^.link := NIL;

      data_value := data_value^.link;
    WHILEND;

    last_entry_point := ^link_parameters.delete_declaration_matching;
    WHILE last_entry_point^.link <> NIL DO
      last_entry_point := last_entry_point^.link;
    WHILEND;

    last_entry_point^.link := new_entry_points.link;

    ve_generator_not_executed := TRUE;

  PROCEND delete_declaration_matching;
?? OLDTITLE ??
?? NEWTITLE := 've_generate', EJECT ??

  PROCEDURE ve_generate
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_genvm) generate_virtual_memory, genvm (
{   virtual_image, vm: file = $required
{   symbol_table, st: file = $optional
{   debug_table, dt: file = $optional
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 7] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 27, 45, 216],
    clc$command, 7, 4, 1, 0, 0, 0, 4, 'OCM$LINVE_GENVM'], [
    ['DEBUG_TABLE                    ',clc$nominal_entry, 3],
    ['DT                             ',clc$abbreviation_entry, 3],
    ['ST                             ',clc$abbreviation_entry, 2],
    ['STATUS                         ',clc$nominal_entry, 4],
    ['SYMBOL_TABLE                   ',clc$nominal_entry, 2],
    ['VIRTUAL_IMAGE                  ',clc$nominal_entry, 1],
    ['VM                             ',clc$abbreviation_entry, 1]],
    [
{ PARAMETER 1
    [6, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$optional_parameter, 0
  , 0],
{ PARAMETER 3
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$optional_parameter, 0
  , 0],
{ PARAMETER 4
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$file_type]],
{ PARAMETER 2
    [[1, 0, clc$file_type]],
{ PARAMETER 3
    [[1, 0, clc$file_type]],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$virtual_image = 1,
      p$symbol_table = 2,
      p$debug_table = 3,
      p$status = 4;

    VAR
      pvt: array [1 .. 4] of clt$parameter_value;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    NEXT link_parameters.virtual_image: [STRLENGTH (pvt [p$virtual_image].value^.file_value^)] IN
          ocv$vel_scratch_seq;
    IF link_parameters.virtual_image = NIL THEN
      osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH23', status);
      RETURN;
    IFEND;
    link_parameters.virtual_image^ := pvt [p$virtual_image].value^.file_value^;

    IF pvt [p$symbol_table].specified THEN
      NEXT link_parameters.symbol_table: [STRLENGTH (pvt [p$symbol_table].value^.file_value^)] IN
            ocv$vel_scratch_seq;
      IF link_parameters.symbol_table = NIL THEN
        osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH24', status);
        RETURN;
      IFEND;
      link_parameters.symbol_table^ := pvt [p$symbol_table].value^.file_value^;
    IFEND;

    IF pvt [p$debug_table].specified THEN
      NEXT link_parameters.debug_table: [STRLENGTH (pvt [p$debug_table].value^.file_value^)] IN
            ocv$vel_scratch_seq;
      IF link_parameters.debug_table = NIL THEN
        osp$set_status_abnormal ('OC', oce$e_storage_allocation_failed, 'LCH25', status);
        RETURN;
      IFEND;
      link_parameters.debug_table^ := pvt [p$debug_table].value^.file_value^;
    IFEND;

    IF ((link_parameters.symbol_table <> NIL) AND (link_parameters.symbol_table^ =
          link_parameters.virtual_image^)) OR ((link_parameters.debug_table <> NIL) AND
          (link_parameters.debug_table^ = link_parameters.virtual_image^)) THEN
      osp$set_status_abnormal ('OC', oce$e_duplicate_file_named, link_parameters.virtual_image^, status);
      RETURN;
    ELSEIF (link_parameters.symbol_table <> NIL) AND (link_parameters.debug_table <> NIL) AND
          (link_parameters.symbol_table^ = link_parameters.debug_table^) THEN
      osp$set_status_abnormal ('OC', oce$e_duplicate_file_named, link_parameters.symbol_table^, status);
      RETURN;
    IFEND;

    ocp$execute_the_ve_linker (link_parameters, status);

    IF status.condition <> oce$e_generate_status THEN
      ocp$close_linker_object_files (link_parameters.object_files_to_add.link);
      ocp$close_linker_object_files (link_parameters.object_libraries_to_use.link);
      ocp$close_linker_symbol_tables (link_parameters.symbol_tables_to_use.link);
      initialize_the_linker;
    IFEND;

  PROCEND ve_generate;
?? OLDTITLE ??
?? NEWTITLE := 'quit', EJECT ??

  PROCEDURE quit
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve_qui) quit, qui (
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 3, 14, 12, 28, 24, 178],
    clc$command, 1, 1, 0, 0, 0, 0, 1, 'OCM$LINVE_QUI'], [
    ['STATUS                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$status = 1;

    VAR
      pvt: array [1 .. 1] of clt$parameter_value;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$end_include (utility_name, status);

  PROCEND quit;
?? OLDTITLE ??
?? NEWTITLE := 'next_available_segment', EJECT ??

  PROCEDURE next_available_segment
    (    parameter_list: clt$parameter_list;
     VAR work_area { input, output } : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (ocm$linve_nexas) $next_available_segment

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
    recend := [
    [1,
    [89, 3, 14, 12, 21, 5, 87],
    clc$function, 0, 0, 0, 0, 0, 0, 0, 'OCM$LINVE_NEXAS']];

?? FMT (FORMAT := ON) ??
?? POP ??

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$make_integer_value (ocv$next_available_segment, {radix} 10, {radix_specified} FALSE, work_area,
          result);

  PROCEND next_available_segment;
?? OLDTITLE ??
?? NEWTITLE := 'ocp$_link_virtual_environment', EJECT ??

  PROGRAM ocp$_link_virtual_environment
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (ocm$linve) link_virtual_environment, linve (
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 1, 6, 8, 39, 11, 245],
    clc$command, 1, 1, 0, 0, 0, 0, 1, 'OCM$LINVE'], [
    ['STATUS                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$status = 1;

    VAR
      pvt: array [1 .. 1] of clt$parameter_value;

{ table name=linkve_command_list type=command section_name=read_only scope=local
{ command (set_link_options              ,set_link_option,  setlo) p=set_link_options cm=local
{ command (define_segment                ,defs) p=define_segment cm=local
{ command (add_object_file               ,addof) p=add_object_file cm=local
{ command (add_object_module             ,add_object_modules,  addom) p=add_object_module cm=local
{ command (use_object_library            ,use_object_libraries,  useol) p=use_object_library cm=local
{ command (use_symbol_table              ,use_symbol_tables,  usest) p=use_symbol_table cm=local
{ command (retain_common_blocks          ,retain_common_block, retcb) p=retain_common_blocks cm=local
{ command (include_linked_symbols        ,incls) p=include_linked_symbols cm=local
{ command (include_message_module        ,incmm) p=include_message_module cm=local
{ command (include_recovery_name_table   ,incrnt) p=include_recovery_name_table cm=local
{ command (initialize_heap_pointer       ,inihp) p=initialize_heap_pointer cm=local
{ command (set_symbol_table_id           ,setsti, setsi) p=set_symbol_table_id cm=local
{ command (initialize_symbol_table_id    ,inisti) p=initialize_symbol_table_id cm=local
{ command (include_debug_table           ,incdt) p=include_debug_table cm=local
{ command (use_debug_table               ,usedt) p=use_debug_table cm=local
{ command (initialize_build_level        ,inibl) p=initialize_build_level cm=local
{ command (delete_declaration_matching   ,deldm) p=delete_declaration_matching cm=local
{ command (generate_virtual_memory       ,genvm) p=ve_generate cm=local
{ command (quit                          ,qui) p=quit cm=local
{ tablend

?? PUSH (LISTEXT := ON) ??

    VAR
      linkve_command_list: [STATIC, READ, read_only] ^clt$command_table := ^linkve_command_list_entries,

      linkve_command_list_entries: [STATIC, READ, read_only] array [1 .. 44] of clt$command_table_entry := [
            {} ['ADDOF                          ', clc$abbreviation_entry, clc$normal_usage_entry, 3,
            clc$automatically_log, clc$linked_call, ^add_object_file],
            {} ['ADDOM                          ', clc$abbreviation_entry, clc$normal_usage_entry, 4,
            clc$automatically_log, clc$linked_call, ^add_object_module],
            {} ['ADD_OBJECT_FILE                ', clc$nominal_entry, clc$normal_usage_entry, 3,
            clc$automatically_log, clc$linked_call, ^add_object_file],
            {} ['ADD_OBJECT_MODULE              ', clc$nominal_entry, clc$normal_usage_entry, 4,
            clc$automatically_log, clc$linked_call, ^add_object_module],
            {} ['ADD_OBJECT_MODULES             ', clc$alias_entry, clc$normal_usage_entry, 4,
            clc$automatically_log, clc$linked_call, ^add_object_module],
            {} ['DEFINE_SEGMENT                 ', clc$nominal_entry, clc$normal_usage_entry, 2,
            clc$automatically_log, clc$linked_call, ^define_segment],
            {} ['DEFS                           ', clc$abbreviation_entry, clc$normal_usage_entry, 2,
            clc$automatically_log, clc$linked_call, ^define_segment],
            {} ['DELDM                          ', clc$abbreviation_entry, clc$normal_usage_entry, 17,
            clc$automatically_log, clc$linked_call, ^delete_declaration_matching],
            {} ['DELETE_DECLARATION_MATCHING    ', clc$nominal_entry, clc$normal_usage_entry, 17,
            clc$automatically_log, clc$linked_call, ^delete_declaration_matching],
            {} ['GENERATE_VIRTUAL_MEMORY        ', clc$nominal_entry, clc$normal_usage_entry, 18,
            clc$automatically_log, clc$linked_call, ^ve_generate],
            {} ['GENVM                          ', clc$abbreviation_entry, clc$normal_usage_entry, 18,
            clc$automatically_log, clc$linked_call, ^ve_generate],
            {} ['INCDT                          ', clc$abbreviation_entry, clc$normal_usage_entry, 14,
            clc$automatically_log, clc$linked_call, ^include_debug_table],
            {} ['INCLS                          ', clc$abbreviation_entry, clc$normal_usage_entry, 8,
            clc$automatically_log, clc$linked_call, ^include_linked_symbols],
            {} ['INCLUDE_DEBUG_TABLE            ', clc$nominal_entry, clc$normal_usage_entry, 14,
            clc$automatically_log, clc$linked_call, ^include_debug_table],
            {} ['INCLUDE_LINKED_SYMBOLS         ', clc$nominal_entry, clc$normal_usage_entry, 8,
            clc$automatically_log, clc$linked_call, ^include_linked_symbols],
            {} ['INCLUDE_MESSAGE_MODULE         ', clc$nominal_entry, clc$normal_usage_entry, 9,
            clc$automatically_log, clc$linked_call, ^include_message_module],
            {} ['INCLUDE_RECOVERY_NAME_TABLE    ', clc$nominal_entry, clc$normal_usage_entry, 10,
            clc$automatically_log, clc$linked_call, ^include_recovery_name_table],
            {} ['INCMM                          ', clc$abbreviation_entry, clc$normal_usage_entry, 9,
            clc$automatically_log, clc$linked_call, ^include_message_module],
            {} ['INCRNT                         ', clc$abbreviation_entry, clc$normal_usage_entry, 10,
            clc$automatically_log, clc$linked_call, ^include_recovery_name_table],
            {} ['INIBL                          ', clc$abbreviation_entry, clc$normal_usage_entry, 16,
            clc$automatically_log, clc$linked_call, ^initialize_build_level],
            {} ['INIHP                          ', clc$abbreviation_entry, clc$normal_usage_entry, 11,
            clc$automatically_log, clc$linked_call, ^initialize_heap_pointer],
            {} ['INISTI                         ', clc$abbreviation_entry, clc$normal_usage_entry, 13,
            clc$automatically_log, clc$linked_call, ^initialize_symbol_table_id],
            {} ['INITIALIZE_BUILD_LEVEL         ', clc$nominal_entry, clc$normal_usage_entry, 16,
            clc$automatically_log, clc$linked_call, ^initialize_build_level],
            {} ['INITIALIZE_HEAP_POINTER        ', clc$nominal_entry, clc$normal_usage_entry, 11,
            clc$automatically_log, clc$linked_call, ^initialize_heap_pointer],
            {} ['INITIALIZE_SYMBOL_TABLE_ID     ', clc$nominal_entry, clc$normal_usage_entry, 13,
            clc$automatically_log, clc$linked_call, ^initialize_symbol_table_id],
            {} ['QUI                            ', clc$abbreviation_entry, clc$normal_usage_entry, 19,
            clc$automatically_log, clc$linked_call, ^quit],
            {} ['QUIT                           ', clc$nominal_entry, clc$normal_usage_entry, 19,
            clc$automatically_log, clc$linked_call, ^quit],
            {} ['RETAIN_COMMON_BLOCK            ', clc$alias_entry, clc$normal_usage_entry, 7,
            clc$automatically_log, clc$linked_call, ^retain_common_blocks],
            {} ['RETAIN_COMMON_BLOCKS           ', clc$nominal_entry, clc$normal_usage_entry, 7,
            clc$automatically_log, clc$linked_call, ^retain_common_blocks],
            {} ['RETCB                          ', clc$abbreviation_entry, clc$normal_usage_entry, 7,
            clc$automatically_log, clc$linked_call, ^retain_common_blocks],
            {} ['SETLO                          ', clc$abbreviation_entry, clc$normal_usage_entry, 1,
            clc$automatically_log, clc$linked_call, ^set_link_options],
            {} ['SETSI                          ', clc$abbreviation_entry, clc$normal_usage_entry, 12,
            clc$automatically_log, clc$linked_call, ^set_symbol_table_id],
            {} ['SETSTI                         ', clc$alias_entry, clc$normal_usage_entry, 12,
            clc$automatically_log, clc$linked_call, ^set_symbol_table_id],
            {} ['SET_LINK_OPTION                ', clc$alias_entry, clc$normal_usage_entry, 1,
            clc$automatically_log, clc$linked_call, ^set_link_options],
            {} ['SET_LINK_OPTIONS               ', clc$nominal_entry, clc$normal_usage_entry, 1,
            clc$automatically_log, clc$linked_call, ^set_link_options],
            {} ['SET_SYMBOL_TABLE_ID            ', clc$nominal_entry, clc$normal_usage_entry, 12,
            clc$automatically_log, clc$linked_call, ^set_symbol_table_id],
            {} ['USEDT                          ', clc$abbreviation_entry, clc$normal_usage_entry, 15,
            clc$automatically_log, clc$linked_call, ^use_debug_table],
            {} ['USEOL                          ', clc$abbreviation_entry, clc$normal_usage_entry, 5,
            clc$automatically_log, clc$linked_call, ^use_object_library],
            {} ['USEST                          ', clc$abbreviation_entry, clc$normal_usage_entry, 6,
            clc$automatically_log, clc$linked_call, ^use_symbol_table],
            {} ['USE_DEBUG_TABLE                ', clc$nominal_entry, clc$normal_usage_entry, 15,
            clc$automatically_log, clc$linked_call, ^use_debug_table],
            {} ['USE_OBJECT_LIBRARIES           ', clc$alias_entry, clc$normal_usage_entry, 5,
            clc$automatically_log, clc$linked_call, ^use_object_library],
            {} ['USE_OBJECT_LIBRARY             ', clc$nominal_entry, clc$normal_usage_entry, 5,
            clc$automatically_log, clc$linked_call, ^use_object_library],
            {} ['USE_SYMBOL_TABLE               ', clc$nominal_entry, clc$normal_usage_entry, 6,
            clc$automatically_log, clc$linked_call, ^use_symbol_table],
            {} ['USE_SYMBOL_TABLES              ', clc$alias_entry, clc$normal_usage_entry, 6,
            clc$automatically_log, clc$linked_call, ^use_symbol_table]];

?? POP ??

{ table linkve_function_table type=function section_name=read_only
{ function $next_available_segment processor=next_available_segment cm=local
{ tablend

?? PUSH (LISTEXT := ON) ??

    VAR
      linkve_function_table: [STATIC, READ, read_only] ^clt$function_processor_table :=
            ^linkve_function_table_entries,

      linkve_function_table_entries: [STATIC, READ, read_only] array [1 .. 1] of
            clt$function_proc_table_entry := [
            {} ['$NEXT_AVAILABLE_SEGMENT        ', clc$nominal_entry, clc$normal_usage_entry, 1,
            clc$linked_call, ^next_available_segment]];

?? POP ??

    VAR
      local_status: ost$status,
      segment_pointer: amt$segment_pointer,
      utility_attributes: array [1 .. 3] of clt$utility_attribute;


    status.normal := TRUE;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    utility_attributes [1].key := clc$utility_command_table;
    utility_attributes [1].command_table := linkve_command_list;
    utility_attributes [2].key := clc$utility_function_proc_table;
    utility_attributes [2].function_processor_table := linkve_function_table;
    utility_attributes [3].key := clc$utility_prompt;
    utility_attributes [3].prompt.value := utility_prompt;
    utility_attributes [3].prompt.size := utility_prompt_length;

    ocp$create_transient_segment (amc$sequence_pointer, segment_pointer, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    ocv$vel_scratch_seq := segment_pointer.sequence_pointer;

    initialize_the_linker;

    clp$begin_utility (utility_name, utility_attributes, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$include_file (clc$current_command_input, utility_prompt, utility_name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF ve_generator_not_executed THEN
      osp$set_status_condition (oce$w_generator_not_executed, status);
    IFEND;

    clp$end_utility (utility_name, local_status);
    IF (NOT local_status.normal) AND status.normal THEN
      status := local_status;
    IFEND;

  PROCEND ocp$_link_virtual_environment;
?? OLDTITLE ??

MODEND ocm$ve_linker_command_handlers;
