PROCEDURE dum$display_base_system_time, display_base_system_time, disbst (
  output, o: file = $output
  status)

  VAR
    local_status: status
    output_file: file
  VAREND

  IF $file(output open_position) = '$BOI' THEN
    delete_file f=output status=local_status
  IFEND
  output_file = output.$eoi

  " Display the OS version.

  display_os_version o=output_file

  " Display the base system time.

  bst = $symbol_address(osv$base_system_time)
  bst_second = $memory(bst, 1)
  bst_minute = $memory(bst+1, 1)
  bst_hour = $memory(bst+2, 1)
  bst_day = $memory(bst+3, 1)
  bst_month = $memory(bst+4, 1)
  bst_year = $memory(bst+5, 2)

  second = $strrep(bst_second, 10)
  second = $substr('0'//second, $strlen(second), 2)
  minute = $strrep(bst_minute, 10)
  minute = $substr('0'//minute, $strlen(minute), 2)
  hour = $strrep(bst_hour, 10)
  hour = $substr('0'//hour, $strlen(hour), 2)
  day = $strrep(bst_day, 10)
  day = $substr('0'//day, $strlen(day), 2)
  month = $strrep(bst_month, 10)
  month = $substr('0'//month, $strlen(month), 2)
  year = $strrep(bst_year, 10)

  data = ' NOS/VE deadstarted at '//hour//':'//minute//':'//second//', '
  data = data //year//'.'//month//'.'//day
  put_line l=data o=output_file

  " Complete the failure time.

  frc = $memory($symbol_address(mtv$trace_buffer), 8)
  time_string = ' '
  convert_microsecond_clock mc=frc ts=time_string
  put_line l=' NOS/VE terminated at '//time_string o=output_file

PROCEND dum$display_base_system_time
