PROCEDURE dum$display_faus, display_faus, display_fau, disfau (
  address, a: integer = 30000c900(16)
  table_length, tl: integer 0..100000 = 200
  lower_bound, lb: integer 0..100000 = 1
  element_length, el: integer 0..100 = 4
  output, o: file = $output
  status)

  addr = $value(address)
  array_start = addr + 18
  next_addr = $mem(addr, 6)
  next_tl = $mem(addr+6, 4)
  next_lb = $mem(addr+10, 4)
  next_el = $mem(addr+14, 4)
  crev state k=string d=0..5
  state(0) = '  state = fau free'
  state(1) = '  state = invalid'
  state(2) = '  state = invalid and flawed'
  state(3) = '  state = initialized'
  state(4) = '  state = initialized and flawed'
  state(5) = '  state = initialization in progress'
  fau_num = $value(lower_bound)
  num_entries = $value(table_length) / $value(element_length)

  IF $file($value(output) open_position) = '$BOI' THEN
    outfile = $string($value(output))//'.$asis'
  ELSE
    outfile = $string($value(output))
  IFEND

  outline = '   NEXT FAUS = '//..
$strrep(next_addr, 16)//' '//$strrep(next_tl, 16)//' '//$strrep(next_lb, 16)// ' '//$strrep(next_el, 16)

  put_line outline o=$fname(outfile)

  FOR i = 0 TO (num_entries - 1) DO
    outline = '  '//$strrep(fau_num)//'.  '
    fau_num = fau_num + 1
    dau = $mem(array_start+(i*4), 3)
    outline = outline//$strrep(dau, 16)//'(16)'
    outline = outline//state($mem(array_start+(i*4)+3, 1))

    put_line outline o=$fname(outfile)

  FOREND

  IF NOT $nil_pva(next_addr) THEN
    display_faus next_addr next_tl next_lb next_el o=$fname(outfile)
  IFEND

PROCEND dum$display_faus
