
PROCEDURE dum$display_pde, display_pde, display_path_description_entry, dispde (
  pde_offset, po: integer = $required
  display_option, d, depth, do: key
      (path_description_entry, pde)
      (cycle_description, cd)
      (full, all, f)
    keyend = path_description_entry
  output, o: file = $output
  status)

  "$FORMAT=OFF"
  VAR
    entry_type: integer
    number_of_entries: integer
    path: string
    "offsets & lengths
    cycle_description_offset: integer
    entry_type_length: integer
    entry_type_offset: integer
    gfi_offset: integer
    length: integer
    offset: integer
    "addresses
    cycle_description_address: integer
    gfi_address: integer
    pde_address: integer = (200400000000(16)+pde_offset)
    page_status: status
  VAREND
  "$FORMAT=ON"

  fmt$path_description_entry field=entry_type offset=offset length=length
  entry_type_offset = offset/8
  entry_type_length = length/8

  fmt$path_description_entry field=cycle_description offset=offset length=length
  cycle_description_offset = offset/8

  fmt$cycle_description field=global_file_information offset=offset length=length
  gfi_offset = offset/8


  display_value v=('DUM$DISPLAY_PDE') o=output
  out = output.$eoi

  dum$get_path_string pde_offset=pde_offset p=path status=page_status
  IF page_status.normal THEN
    put_line l='-path = '//$trim(path) o=out
  ELSE
    disv ' Unable to get_path ' o=out
  IFEND

  put_line l=('0 **PATH_DESCRIPTION_ENTRY**    Address = '//$strrep(pde_address, 16)) o=out
  fmt$path_description_entry a=pde_address o=out

  entry_type = $memory((pde_address+entry_type_offset), entry_type_length)
  IF (entry_type = 1) AND (display_option <> path_description_entry) THEN "file_cycle_object
    cycle_description_address = $memory((pde_address+cycle_description_offset))
    IF NOT $nil_pva(cycle_description_address) THEN
      put_line l=('0 **CYCLE_DESCRIPTION_ENTRY**    Address  = '//$strrep(cycle_description_address, 16)) ..
            o=out
      fmt$cycle_description a=cycle_description_address o=out
      IF display_option = full THEN
        gfi_address = $memory((cycle_description_address+gfi_offset))
        put_line ('0 **GLOBAL_FILE_INFORMATION**    Address  = '//$strrep(gfi_address, 16)) o=out
        bat$global_file_information a=gfi_address o=out
      IFEND
    IFEND
  IFEND

PROCEND dum$display_pde

