?? RIGHT := 110 ??                                                                                            
?? NEWTITLE := 'NOS/VE Dump Analyzer : Display Exchange Package Command' ??                                   
MODULE dum$display_exchange_package;                                                                          
                                                                                                              
{ PURPOSE:                                                                                                    
{   This module contains the code for the display_exchange_package command.                                   
                                                                                                              
?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??                                      
?? PUSH (LISTEXT := ON) ??                                                                                    
*copyc due$exception_condition_codes                                                                          
*copyc dut$condition_registers                                                                                
?? POP ??                                                                                                     
*copyc clp$close_display                                                                                      
*copyc clp$convert_integer_to_rjstring                                                                        
*copyc clp$horizontal_tab_display                                                                             
*copyc clp$new_display_line                                                                                   
*copyc clp$open_display_reference                                                                             
*copyc clp$put_display                                                                                        
*copyc dup$determine_dump_information                                                                         
*copyc dup$display_message                                                                                    
*copyc dup$evaluate_parameters                                                                                
*copyc dup$new_page_procedure                                                                                 
*copyc dup$put_item                                                                                           
*copyc dup$retrieve_exchange_package                                                                          
*copyc ocp$find_debug_address                                                                                 
*copyc osp$disestablish_cond_handler                                                                          
*copyc osp$establish_block_exit_hndlr                                                                         
*copyc osp$set_status_abnormal                                                                                
?? EJECT ??                                                                                                   
*copyc duv$dump_environment_p                                                                                 
*copyc duv$execution_environment                                                                              
*copyc duv$title_data                                                                                         
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'dup$display_exchange_package', EJECT ??                                                       
                                                                                                              
{ PURPOSE:                                                                                                    
{   This procedure displays the exchange package to the output file.                                          
                                                                                                              
  PROCEDURE [XDCL] dup$display_exchange_package                                                               
    (    exchange_package: dut$exchange_package;                                                              
         full_display: boolean;                                                                               
     VAR display_control: clt$display_control;                                                                
     VAR status: ost$status);                                                                                 
                                                                                                              
    TYPE                                                                                                      
      t$ascii_characters = SET OF 0 .. 255;                                                                   
                                                                                                              
    VAR                                                                                                       
      blank: t$ascii_characters,                                                                              
      current_tos_register: 1 .. 0f(16),                                                                      
      display_string: string (osc$max_string_size),                                                           
      exchange_package_cell_p: ^cell,                                                                         
      found: boolean,                                                                                         
      found_blank: boolean,                                                                                   
      ignore_status: ost$status,                                                                              
      index: integer,                                                                                         
      local_status: ost$status,                                                                               
      module_name: pmt$program_name,                                                                          
      monitor_condition: ost$monitor_condition,                                                               
      monitor_conditions: ost$monitor_conditions,                                                             
      offset_in_section: ost$segment_offset,                                                                  
      section_name: pmt$program_name,                                                                         
      string_3: string (3),                                                                                   
      string_length: integer,                                                                                 
      user_condition: ost$user_condition,                                                                     
      user_conditions: ost$user_conditions,                                                                   
      xp_p: ^dut$ee_xp;                                                                                       
                                                                                                              
    status.normal := TRUE;                                                                                    
    clp$new_display_line (display_control, 1, ignore_status);                                                 
    dup$put_item ('Exchange package: ', clc$no_trim, amc$start, display_control);                             
                                                                                                              
    ocp$find_debug_address (exchange_package.p_register.pva.seg, exchange_package.p_register.pva.offset,      
          found, module_name, section_name, offset_in_section, status);                                       
    IF NOT status.normal THEN                                                                                 
      IF status.condition <> oce$e_debug_table_not_open THEN                                                  
        RETURN;  {---->                                                                                       
      IFEND;                                                                                                  
      status.normal := TRUE;                                                                                  
      found := FALSE;                                                                                         
    IFEND;                                                                                                    
                                                                                                              
    IF found THEN                                                                                             
      blank := $t$ascii_characters[$INTEGER(' ')];                                                            
      #SCAN (blank, section_name, index, found_blank);                                                        
      STRINGREP (display_string, string_length, section_name (1, index - 1), ' +', offset_in_section: #(16),  
            '(16)');                                                                                          
      dup$put_item (display_string (1, string_length), clc$no_trim, amc$continue, display_control);           
      STRINGREP (display_string, string_length, ' in ', module_name);                                         
      dup$put_item (display_string (1, string_length), clc$trim, amc$terminate, display_control);             
    ELSE                                                                                                      
      STRINGREP (display_string, string_length, ' P = ', exchange_package.p_register.pva.ring: 2: #(16),      
            exchange_package.p_register.pva.seg: 4: #(16), exchange_package.p_register.pva.offset: 10: #(16));
      dup$put_item (display_string (1, string_length), clc$no_trim, amc$terminate, display_control);          
    IFEND;                                                                                                    
                                                                                                              
    IF exchange_package.vmid = osc$cyber_170_mode THEN                                                        
      osp$set_status_abnormal (duc$dump_analyzer_id, due$processor_in_170_mode, '', local_status);            
      dup$display_message (local_status, display_control);                                                    
    IFEND;                                                                                                    
                                                                                                              
    user_conditions := exchange_package.user_condition_register * exchange_package.user_mask;                 
    IF user_conditions <> $ost$user_conditions [ ] THEN                                                       
      dup$put_item ('user conditions:', clc$no_trim, amc$start, display_control);                             
      FOR user_condition := osc$privileged_instruction TO osc$invalid_bdp_data DO                             
        IF user_condition IN user_conditions THEN                                                             
          clp$horizontal_tab_display (display_control, 21, ignore_status);                                    
          dup$put_item (duv$cr_user_condition_reg_def [(duc$cr_user_condition_lower_bit +                     
                    $INTEGER (user_condition))], clc$trim, amc$terminate, display_control);                   
        IFEND;                                                                                                
      FOREND;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
    monitor_conditions := exchange_package.monitor_condition_register * exchange_package.monitor_mask;        
    IF monitor_conditions <> $ost$monitor_conditions [ ] THEN                                                 
      dup$put_item ('monitor conditions:', clc$no_trim, amc$start, display_control);                          
      FOR monitor_condition := osc$detected_uncorrected_err TO osc$trap_exception DO                          
        IF monitor_condition IN monitor_conditions THEN                                                       
          clp$horizontal_tab_display (display_control, 21, ignore_status);                                    
          dup$put_item (duv$cr_mtr_condition_reg_def [(duc$cr_mtr_condition_lower_bit +                       
                    $INTEGER (monitor_condition))], clc$trim, amc$terminate, display_control);                
        IFEND;                                                                                                
      FOREND;                                                                                                 
    IFEND;                                                                                                    
                                                                                                              
    IF NOT full_display THEN                                                                                  
      RETURN;  {---->                                                                                         
    IFEND;                                                                                                    
                                                                                                              
    exchange_package_cell_p := ^exchange_package;                                                             
    xp_p := exchange_package_cell_p;                                                                          
                                                                                                              
    { Display the P register information.                                                                     
                                                                                                              
    clp$new_display_line (display_control, 1, ignore_status);                                                 
    clp$horizontal_tab_display (display_control, 14, ignore_status);                                          
    display_string := ' ';                                                                                    
    clp$convert_integer_to_rjstring (xp_p^.p_register.two_bytes, 16, FALSE, '0', display_string (1, 4),       
          ignore_status);                                                                                     
    dup$put_item (display_string (1, 4), clc$no_trim, amc$continue, display_control);                         
    clp$horizontal_tab_display (display_control, 24, ignore_status);                                          
    STRINGREP (display_string, string_length, 'P  ', xp_p^.p_register.pva.ring: 2: #(16),                     
          xp_p^.p_register.pva.seg: 4: #(16), xp_p^.p_register.pva.offset: 10: #(16));                        
    dup$put_item (display_string (1, string_length), clc$no_trim, amc$terminate, display_control);            
                                                                                                              
    dup$display_xp_registers (xp_p^.data, display_control);                                                   
                                                                                                              
    { Display the MAX RING words.                                                                             
                                                                                                              
    dup$put_item ('max ring', clc$no_trim, amc$start, display_control);                                       
                                                                                                              
    FOR current_tos_register := 1 TO 0f(16) DO                                                                
      clp$horizontal_tab_display (display_control, 14, ignore_status);                                        
      clp$convert_integer_to_rjstring (xp_p^.tos_registers [current_tos_register].two_bytes, 16, FALSE,       
            '0', display_string (1, 4), ignore_status);                                                       
      dup$put_item (display_string (1, 4), clc$no_trim, amc$continue, display_control);                       
      STRINGREP (string_3, string_length, current_tos_register: 3);                                           
      STRINGREP (display_string, string_length, '  tos ', string_3 (2, 2));                                   
      dup$put_item (display_string (1, string_length), clc$no_trim, amc$continue, display_control);           
      clp$horizontal_tab_display (display_control, 27, ignore_status);                                        
      STRINGREP (display_string, string_length,                                                               
            xp_p^.tos_registers [current_tos_register].pva.ring: 2: #(16),                                    
            xp_p^.tos_registers [current_tos_register].pva.seg: 4: #(16),                                     
            xp_p^.tos_registers [current_tos_register].pva.offset: 10: #(16));                                
      dup$put_item (display_string (1, string_length), clc$trim, amc$terminate, display_control);             
    FOREND;                                                                                                   
                                                                                                              
  PROCEND dup$display_exchange_package;                                                                       
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'dup$display_exchange_pkg_cmd' ??                                                              
                                                                                                              
{ PURPOSE:                                                                                                    
{   This procedure processes the display_exchange_package command.                                            
                                                                                                              
  PROCEDURE [XDCL] dup$display_exchange_pkg_cmd                                                               
    (    parameter_list: clt$parameter_list;                                                                  
     VAR status: ost$status);                                                                                 
                                                                                                              
{ PROCEDURE display_exchange_package, disep (                                                                 
{   exchange, e: any of                                                                                       
{       key                                                                                                   
{         (active a) (monitor m) (job j)                                                                      
{       keyend                                                                                                
{       integer 0..0ffffffff(16)                                                                              
{     anyend = 0ffffffff(16)                                                                                  
{   processor, p: integer 0..3 = 0                                                                            
{   title, t: string 1..31 = 'display_exchange_package'                                                       
{   output, o: file = $optional                                                                               
{   status)                                                                                                   
                                                                                                              
?? PUSH (LISTEXT := ON) ??                                                                                    
?? FMT (FORMAT := OFF) ??                                                                                     
  VAR                                                                                                         
    pdt: [STATIC, READ, cls$declaration_section] record                                                       
      header: clt$pdt_header,                                                                                 
      names: array [1 .. 9] of clt$pdt_parameter_name,                                                        
      parameters: array [1 .. 5] of clt$pdt_parameter,                                                        
      type1: 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 .. 6] of clt$keyword_specification,                                         
        recend,                                                                                               
        type_size_2: clt$type_specification_size,                                                             
        element_type_spec_2: record                                                                           
          header: clt$type_specification_header,                                                              
          qualifier: clt$integer_type_qualifier,                                                              
        recend,                                                                                               
        default_value: string (13),                                                                           
      recend,                                                                                                 
      type2: record                                                                                           
        header: clt$type_specification_header,                                                                
        qualifier: clt$integer_type_qualifier,                                                                
        default_value: string (1),                                                                            
      recend,                                                                                                 
      type3: record                                                                                           
        header: clt$type_specification_header,                                                                
        qualifier: clt$string_type_qualifier,                                                                 
        default_value: string (26),                                                                           
      recend,                                                                                                 
      type4: record                                                                                           
        header: clt$type_specification_header,                                                                
      recend,                                                                                                 
      type5: record                                                                                           
        header: clt$type_specification_header,                                                                
      recend,                                                                                                 
    recend := [                                                                                               
    [1,                                                                                                       
    [90, 4, 16, 9, 44, 0, 745],                                                                               
    clc$command, 9, 5, 0, 0, 0, 0, 5, ''], [                                                                  
    ['E                              ',clc$abbreviation_entry, 1],                                            
    ['EXCHANGE                       ',clc$nominal_entry, 1],                                                 
    ['O                              ',clc$abbreviation_entry, 4],                                            
    ['OUTPUT                         ',clc$nominal_entry, 4],                                                 
    ['P                              ',clc$abbreviation_entry, 2],                                            
    ['PROCESSOR                      ',clc$nominal_entry, 2],                                                 
    ['STATUS                         ',clc$nominal_entry, 5],                                                 
    ['T                              ',clc$abbreviation_entry, 3],                                            
    ['TITLE                          ',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, 269,                        
  clc$optional_default_parameter, 0, 13],                                                                     
{ PARAMETER 2                                                                                                 
    [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, 20,                         
  clc$optional_default_parameter, 0, 1],                                                                      
{ 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, 8,                          
  clc$optional_default_parameter, 0, 26],                                                                     
{ PARAMETER 4                                                                                                 
    [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 5                                                                                                 
    [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$union_type], [[clc$integer_type, clc$keyword_type],                                           
    FALSE, 2],                                                                                                
    229, [[1, 0, clc$keyword_type], [6], [                                                                    
      ['A                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],                 
      ['ACTIVE                         ', clc$nominal_entry, clc$normal_usage_entry, 1],                      
      ['J                              ', clc$abbreviation_entry, clc$normal_usage_entry, 3],                 
      ['JOB                            ', clc$nominal_entry, clc$normal_usage_entry, 3],                      
      ['M                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],                 
      ['MONITOR                        ', clc$nominal_entry, clc$normal_usage_entry, 2]]                      
      ],                                                                                                      
    20, [[1, 0, clc$integer_type], [0, 0ffffffff(16), 10]]                                                    
    ,                                                                                                         
    '0ffffffff(16)'],                                                                                         
{ PARAMETER 2                                                                                                 
    [[1, 0, clc$integer_type], [0, 3, 10],                                                                    
    '0'],                                                                                                     
{ PARAMETER 3                                                                                                 
    [[1, 0, clc$string_type], [1, 31, FALSE],                                                                 
    '''display_exchange_package'''],                                                                          
{ PARAMETER 4                                                                                                 
    [[1, 0, clc$file_type]],                                                                                  
{ PARAMETER 5                                                                                                 
    [[1, 0, clc$status_type]]];                                                                               
?? FMT (FORMAT := ON) ??                                                                                      
?? POP ??                                                                                                     
                                                                                                              
    CONST                                                                                                     
      p$exchange = 1,                                                                                         
      p$processor = 2,                                                                                        
      p$title = 3,                                                                                            
      p$output = 4,                                                                                           
      p$status = 5;                                                                                           
                                                                                                              
    VAR                                                                                                       
      pvt: array [1 .. 5] of clt$parameter_value;                                                             
                                                                                                              
    VAR                                                                                                       
      default_list: ARRAY [1 .. 2] OF dut$default_change_list_entry,                                          
      display_control: clt$display_control,                                                                   
      display_string: string (osc$max_string_size),                                                           
      dump_information: dut$dump_information,                                                                 
      exchange_package_p: ^dut$exchange_package,                                                              
      ignore_status: ost$status,                                                                              
      output_display_opened: boolean,                                                                         
      processor: 0 .. duc$de_maximum_processors,                                                              
      ring_attributes: amt$ring_attributes,                                                                   
      string_length: integer;                                                                                 
                                                                                                              
*copy dup$abort_handler                                                                                       
?? NEWTITLE := 'clean_up', EJECT ??                                                                           
                                                                                                              
{ PURPOSE:                                                                                                    
{   This procedure is called from the abort handler to close the file.                                        
                                                                                                              
    PROCEDURE [INLINE] clean_up;                                                                              
                                                                                                              
      VAR                                                                                                     
        ignore_status: ost$status;                                                                            
                                                                                                              
      IF output_display_opened THEN                                                                           
        clp$close_display (display_control, ignore_status);                                                   
      IFEND;                                                                                                  
                                                                                                              
    PROCEND clean_up;                                                                                         
?? OLDTITLE, EJECT ??                                                                                         
                                                                                                              
    status.normal := TRUE;                                                                                    
                                                                                                              
    { Change the default value for the PROCESSOR and EXCHANGE parameters.                                     
                                                                                                              
    default_list [1].default_name := duc$dp_processor;                                                        
    default_list [1].number := p$processor;                                                                   
    default_list [2].default_name := duc$dp_exchange;                                                         
    default_list [2].number := p$exchange;                                                                    
    dup$evaluate_parameters (parameter_list, default_list, #SEQ (pdt), ^pvt, status);                         
    IF NOT status.normal THEN                                                                                 
      RETURN;  {---->                                                                                         
    IFEND;                                                                                                    
                                                                                                              
    IF duv$dump_environment_p = NIL THEN                                                                      
      osp$set_status_abnormal (duc$dump_analyzer_id, due$no_restart_file, '', status);                        
      RETURN;  {---->                                                                                         
    IFEND;                                                                                                    
                                                                                                              
    processor := pvt [p$processor].value^.integer_value.value;                                                
                                                                                                              
    output_display_opened := FALSE;                                                                           
    osp$establish_block_exit_hndlr (^abort_handler);                                                          
                                                                                                              
   /display_opened/                                                                                           
    BEGIN                                                                                                     
                                                                                                              
      { Prepare the output display file.                                                                      
                                                                                                              
      IF pvt [p$output].specified THEN                                                                        
        ring_attributes.r1 := #RING (^ring_attributes);                                                       
        ring_attributes.r2 := #RING (^ring_attributes);                                                       
        ring_attributes.r3 := #RING (^ring_attributes);                                                       
        clp$open_display_reference (pvt [p$output].value^.file_value^, ^dup$new_page_procedure, fsc$list,     
              ring_attributes, display_control, status);                                                      
        IF NOT status.normal THEN                                                                             
          EXIT /display_opened/;  {---->                                                                      
        IFEND;                                                                                                
        output_display_opened := TRUE;                                                                        
      ELSE                                                                                                    
        display_control := duv$execution_environment.output_file.display_control;                             
        display_control.line_number := display_control.page_length + 1;                                       
      IFEND;                                                                                                  
                                                                                                              
      duv$title_data.build_title := TRUE;                                                                     
      duv$title_data.command_name := pvt [p$title].value^.string_value^;                                      
                                                                                                              
      dup$retrieve_exchange_package (processor, pvt [p$exchange].value^, exchange_package_p, status);         
      IF NOT status.normal THEN                                                                               
        EXIT /display_opened/;  {---->                                                                        
      IFEND;                                                                                                  
                                                                                                              
      dup$determine_dump_information (dump_information);                                                      
                                                                                                              
      IF pvt [p$exchange].value^.kind = clc$keyword THEN                                                      
        IF pvt [p$exchange].value^.keyword_value = 'ACTIVE' THEN                                              
          IF ((dump_information.dump_type = duc$di_dt_cy2000) AND (duc$ee_cy_monitor_mode IN                  
                duv$execution_environment.processor_registers [processor].status_summary.cy2000)) OR          
                (duc$ee_gen_180_monitor_mode IN                                                               
                duv$execution_environment.processor_registers [processor].status_summary.general) THEN        
            clp$put_display (display_control, 'Active exchange package selected: CPU is in 180 monitor mode.',
                  clc$no_trim, ignore_status);                                                                
          ELSE                                                                                                
            clp$put_display (display_control, 'Active exchange package selected: CPU is in job mode.',        
                  clc$no_trim, ignore_status);                                                                
          IFEND;                                                                                              
        ELSEIF pvt [p$exchange].value^.keyword_value = 'MONITOR' THEN                                         
          STRINGREP (display_string, string_length, 'Exchange address = ',                                    
                duv$execution_environment.processor_registers [processor].monitor_process_state: #(16),       
                '(16)');                                                                                      
          clp$put_display (display_control, display_string (1, string_length), clc$trim, ignore_status);      
        ELSE  { pvt [p$exchange].value^.keyword_value = 'JOB' }                                               
          STRINGREP (display_string, string_length, 'Exchange address = ',                                    
                duv$execution_environment.processor_registers [processor].job_process_state: #(16), '(16)');  
          clp$put_display (display_control, display_string (1, string_length), clc$trim, ignore_status);      
        IFEND;                                                                                                
      IFEND;                                                                                                  
                                                                                                              
      dup$display_exchange_package (exchange_package_p^, TRUE, display_control, status);                      
    END /display_opened/;                                                                                     
                                                                                                              
    IF output_display_opened THEN                                                                             
      clp$close_display (display_control, ignore_status);                                                     
    IFEND;                                                                                                    
    osp$disestablish_cond_handler;                                                                            
                                                                                                              
  PROCEND dup$display_exchange_pkg_cmd;                                                                       
?? OLDTITLE ??                                                                                                
?? NEWTITLE := 'dup$display_xp_registers', EJECT ??                                                           
                                                                                                              
{ PURPOSE:                                                                                                    
{   This procedure displays the A and X register portion of the exchange package to the output file.          
                                                                                                              
  PROCEDURE [XDCL] dup$display_xp_registers                                                                   
    (    xp_data: dut$ee_xp_data;                                                                             
     VAR display_control: clt$display_control);                                                               
                                                                                                              
    VAR                                                                                                       
      current_a_register: ost$register_number,                                                                
      current_x_register: ost$register_number,                                                                
      display_string: string (osc$max_string_size),                                                           
      ignore_status: ost$status,                                                                              
      string_3: string (3),                                                                                   
      string_length: integer,                                                                                 
      xp_labels: [READ, STATIC] ARRAY [ost$register_number] OF string (12) :=                                 
            ['vmid/uvmid', 'flags/te', 'user mask', 'monitor mask', 'ucr', 'mcr', 'kypt cl/lpid',             
             'kypt mask', 'kypt code', ' ', 'pit', ' ', 'base const', ' ', 'md flags', 'stl'],                
      x_part: 0 .. 3;                                                                                         
                                                                                                              
    { Display all of the A registers.                                                                         
                                                                                                              
    FOR current_a_register := 0 TO 0f(16) DO                                                                  
      dup$put_item (xp_labels [current_a_register], clc$no_trim, amc$start, display_control);                 
      clp$horizontal_tab_display (display_control, 14, ignore_status);                                        
      clp$convert_integer_to_rjstring (xp_data.a_regs [current_a_register].two_bytes, 16, FALSE, '0',         
            display_string (1, 4), ignore_status);                                                            
      dup$put_item (display_string (1, 4), clc$no_trim, amc$continue, display_control);                       
      clp$horizontal_tab_display (display_control, 24, ignore_status);                                        
      STRINGREP (string_3, string_length, current_a_register: 2: #(16));                                      
      STRINGREP (display_string, string_length, 'A', string_3 (2), ' ',                                       
            xp_data.a_regs [current_a_register].pva.ring: 2: #(16),                                           
            xp_data.a_regs [current_a_register].pva.seg: 4: #(16),                                            
            xp_data.a_regs [current_a_register].pva.offset: 10: #(16));                                       
      dup$put_item (display_string (1, string_length), clc$trim, amc$terminate, display_control);             
    FOREND;                                                                                                   
    clp$new_display_line (display_control, 1, ignore_status);                                                 
                                                                                                              
    { Display all of the X registers.                                                                         
                                                                                                              
    FOR current_x_register := 0 TO 0f(16) DO                                                                  
      clp$horizontal_tab_display (display_control, 11, ignore_status);                                        
      display_string := ' ';                                                                                  
      STRINGREP (display_string (1, 2), string_length, current_x_register: 2: #(16));                         
      display_string (1) := 'X';                                                                              
      FOR x_part := 0 TO 3 DO                                                                                 
        clp$convert_integer_to_rjstring (xp_data.x_regs [current_x_register].part [x_part], 16, FALSE, '0',   
              display_string (4 + x_part * 5, 4), ignore_status);                                             
      FOREND;                                                                                                 
      dup$put_item (display_string (1, 22), clc$no_trim, amc$terminate, display_control);                     
    FOREND;                                                                                                   
    clp$new_display_line (display_control, 1, ignore_status);                                                 
                                                                                                              
    { Display the MD word.                                                                                    
                                                                                                              
    dup$put_item ('md word', clc$no_trim, amc$start, display_control);                                        
    clp$horizontal_tab_display (display_control, 14, ignore_status);                                          
    display_string := ' ';                                                                                    
    FOR x_part := 0 TO 3 DO                                                                                   
      clp$convert_integer_to_rjstring (xp_data.mdw.part [x_part], 16, FALSE, '0',                             
            display_string (1 + x_part * 5, 4), ignore_status);                                               
    FOREND;                                                                                                   
    dup$put_item (display_string (1, 19), clc$no_trim, amc$terminate, display_control);                       
    clp$new_display_line (display_control, 1, ignore_status);                                                 
                                                                                                              
    { Display the STA word.                                                                                   
                                                                                                              
    dup$put_item ('sta', clc$no_trim, amc$start, display_control);                                            
    clp$horizontal_tab_display (display_control, 14, ignore_status);                                          
    clp$convert_integer_to_rjstring (xp_data.sta1.two_bytes, 16, FALSE, '0', display_string (1, 4),           
          ignore_status);                                                                                     
    dup$put_item (display_string (1, 4), clc$no_trim, amc$continue, display_control);                         
                                                                                                              
    { Display the UTP word.                                                                                   
                                                                                                              
    dup$put_item ('  utp', clc$no_trim, amc$continue, display_control);                                       
    clp$horizontal_tab_display (display_control, 27, ignore_status);                                          
    STRINGREP (display_string, string_length, xp_data.sta1.pva.ring: 2: #(16), xp_data.sta1.pva.seg: 4: #(16),
          xp_data.sta1.pva.offset: 10: #(16));                                                                
    dup$put_item (display_string (1, string_length), clc$trim, amc$terminate, display_control);               
    clp$horizontal_tab_display (display_control, 14, ignore_status);                                          
    clp$convert_integer_to_rjstring (xp_data.sta2.two_bytes, 16, FALSE, '0', display_string (1, 4),           
          ignore_status);                                                                                     
    dup$put_item (display_string (1, 4), clc$no_trim, amc$continue, display_control);                         
                                                                                                              
    { Display the TRAP word.                                                                                  
                                                                                                              
    dup$put_item ('  trap', clc$no_trim, amc$continue, display_control);                                      
    clp$horizontal_tab_display (display_control, 27, ignore_status);                                          
    STRINGREP (display_string, string_length, xp_data.sta2.pva.ring: 2: #(16), xp_data.sta2.pva.seg: 4: #(16),
          xp_data.sta2.pva.offset: 10: #(16));                                                                
    dup$put_item (display_string (1, string_length), clc$trim, amc$terminate, display_control);               
                                                                                                              
    { Display the DB IND/MASK word.                                                                           
                                                                                                              
    dup$put_item ('db ind/mask', clc$no_trim, amc$start, display_control);                                    
    clp$horizontal_tab_display (display_control, 14, ignore_status);                                          
    clp$convert_integer_to_rjstring (xp_data.debug_word.two_bytes, 16, FALSE, '0', display_string (1, 4),     
          ignore_status);                                                                                     
    dup$put_item (display_string (1, 4), clc$no_trim, amc$continue, display_control);                         
                                                                                                              
    { Display the DB LIST word.                                                                               
                                                                                                              
    dup$put_item ('  db list', clc$no_trim, amc$continue, display_control);                                   
    clp$horizontal_tab_display (display_control, 27, ignore_status);                                          
    STRINGREP (display_string, string_length, xp_data.debug_word.pva.ring: 2: #(16),                          
          xp_data.debug_word.pva.seg: 4: #(16), xp_data.debug_word.pva.offset: 10: #(16));                    
    dup$put_item (display_string (1, string_length), clc$trim, amc$terminate, display_control);               
    clp$new_display_line (display_control, 1, ignore_status);                                                 
                                                                                                              
  PROCEND dup$display_xp_registers;                                                                           
MODEND dum$display_exchange_package;                                                                          
