


PROC qcm$display_dct, disdct (
  output, o: FILE = output
  status)

  crev cnt
  crev dsp k=string d=0..16
  dsp(0) = 'NULL PTT ENTRIES'
  dsp(1) = 'UNDEFINED '
  dsp(2) = 'PRIORITY 1 = MIN DISPATCHING PRIORITY'
  dsp(3) = 'PRIORITY 2'
  dsp(4) = 'PRIORITY 3'
  dsp(5) = 'PRIORITY 4'
  dsp(6) = 'PRIORITY 5'
  dsp(7) = 'PRIORITY 6'
  dsp(8) = 'PRIORITY 7 = SYSTEM JOB, VOLUME SPACE MANAGER'
  dsp(9) = 'PRIORITY 8 = JOB SCHEDULER'
  dsp(10) = 'PRIORITY 9 = SPLIT ALLOC,  ADMINISTER LOG, MLI HELPER'
  dsp(11) = 'PRIORITY 10'
  dsp(12) = 'PRIORITY 11'
  dsp(13) = 'PRIORITY 12'
  dsp(14) = 'PRIORITY 13'
  dsp(15) = 'PRIORITY 14'
  dsp(16) = 'MAX DISPATCHING RIORITY'

  dct_base = $sa(tmv$dct)
  dct_entry_length = 8(16) "due to alignment"
  true_dct_entry_length = 4(16)
  ptl_base = $mem($sa(tmv$ptl_p))
  ptl_entry_length = 20(16)


    putl '-'
    putl   '         Dispatch Control Table  1.4.1/1.4.2'
    FOR i = 0 TO 16 DO

      queue_head = $mem(dct_base+(dct_entry_length*i) 2)
      queue_tail = $mem(dct_base+(dct_entry_length*i)+2 2)

      putl '0DCT: Priority = '//dsp(i)

      task_index = queue_head

         IF task_index <> 0 THEN
           cnt = 1
         ELSE
           cnt = 0
         IFEND

          WHILE task_index <> queue_tail
          cnt = cnt + 1
          task_index = $mem(ptl_base+(ptl_entry_length * task_index) 2)
          WHILEND

          putl '      Task Count = '//$strrep(cnt,10)
     FOREND


PROCEND qcm$display_dct
