
{ DECK: IOT$TAPE_COMMAND_TABLE_ENTRY

  CONST
    ioc$no_of_67x_commands = 19,

{   Below are the tape hardware function codes used by the tape handler.

    ioc$67x_func_clear = 0,
    ioc$67x_func_format = 4,
    ioc$67x_func_normal_clip = 6,
    ioc$67x_func_high_clip = 46(16),
    ioc$67x_func_low_clip = 86(16),
    ioc$67x_func_hyper_clip = 0c6(16),
    ioc$67x_func_rewind = 8(16),
    ioc$67x_func_unload = 48(16),
    ioc$67x_func_forspace = 0b(16),
    ioc$67x_func_backspace = 4b(16),
    ioc$67x_func_cont_backspace = 4c(16),
    ioc$67x_func_read = 20(16),
    ioc$67x_func_read_backwards = 60(16),
    ioc$67x_func_write = 28(16),
    ioc$67x_func_short_write = 0a8(16),
    ioc$67x_func_write_tapemark = 29(16),
    ioc$67x_func_erase = 2a(16),
    ioc$67x_func_security_erase = 0aa(16),
    ioc$67x_func_loop1 = 3d(16),
    ioc$67x_func_loop2 = 7d(16),
    ioc$67x_func_loop3 = 0fd(16),
    ioc$67x_func_master_clear = 10c(16),
    ioc$67x_func_get_status = 8,
    ioc$67x_func_skip_tm_f = 0d(16),
    ioc$67x_func_skip_tm_b = 4d(16),

    ioc$tape_function_code_length = 8,

{   Below are the PP-request I/O packet lengths in bytes for various functions.
{   For data transfer functions the number is a minimum length. NOTE, the length
{   must be at least 40 and a multiple of 8 to be legal.

    ioc$tape_pkt_lng_clear = 48,
{     ioc$tape_pkt_lng_format - never a main command
{     ioc$tape_pkt_lng_normal_clip - never a main command
{     ioc$tape_pkt_lng_high_clip - never a main command
{     ioc$tape_pkt_lng_low_clip - never a main command
{     ioc$tape_pkt_lng_hyper_clip - never a main command
    ioc$tape_pkt_lng_rewind = 48,
    ioc$tape_pkt_lng_unload = 48,
    ioc$tape_pkt_lng_forspace = 48,
    ioc$tape_pkt_lng_backspace = 48,
    ioc$tape_pkt_lng_cont_backspace = 48,
    ioc$tape_pkt_lng_read = 40,
    ioc$tape_pkt_lng_read_backwards = 40,
    ioc$tape_pkt_lng_write = 40,
    ioc$tape_pkt_lng_short_write = 40,
    ioc$tape_pkt_lng_write_tapemark = 48,
    ioc$tape_pkt_lng_erase = 48,
    ioc$tape_pkt_lng_security_erase = 48,
    ioc$tape_pkt_lng_loop1 = 48,
    ioc$tape_pkt_lng_loop2 = 48,
    ioc$tape_pkt_lng_loop3 = 48,
    ioc$tape_pkt_lng_master_clear = 40,
    ioc$tape_pkt_lng_get_status = 48,
    ioc$tape_pkt_lng_skip_tm_f = 48,
    ioc$tape_pkt_lng_skip_tm_b = 48,

    ioc$length_of_67x_parameters = 5,

    ioc$format_cmd_length = 1,
    ioc$non_data_cmd_length = 1,
    ioc$write_cmd_per_block = 2,
    ioc$read_cmd_per_block = 2,

{   Below are the positions in the command chain where various hardware
{   commands go.

    ioc$67x_cmd_pos_clear = 2,
    ioc$67x_cmd_pos_format = 1,
    ioc$67x_cmd_pos_normal_clip = 2,
    ioc$67x_cmd_pos_high_clip = 2,
    ioc$67x_cmd_pos_low_clip = 2,
    ioc$67x_cmd_pos_hyper_clip = 2,
    ioc$67x_cmd_pos_rewind = 2,
    ioc$67x_cmd_pos_unload = 2,
    ioc$67x_cmd_pos_forspace = 2,
    ioc$67x_cmd_pos_backspace = 2,
    ioc$67x_cmd_pos_cont_backspace = 2,
    ioc$67x_cmd_pos_read = 2,
    ioc$67x_cmd_pos_read_backwards = 2,
    ioc$67x_cmd_pos_write = 2,
    ioc$67x_cmd_pos_short_write = 2,
    ioc$67x_cmd_pos_write_tapemark = 2,
    ioc$67x_cmd_pos_erase = 2,
    ioc$67x_cmd_pos_security_erase = 2,
    ioc$67x_cmd_pos_loop1 = 2,
    ioc$67x_cmd_pos_loop2 = 2,
    ioc$67x_cmd_pos_loop3 = 2,
    ioc$67x_cmd_pos_master_clear = 1,
    ioc$67x_cmd_pos_get_status = 2,
    ioc$67x_cmd_pos_skip_tm_f = 2,
    ioc$67x_cmd_pos_skip_tm_b = 2;

  TYPE
    iot$tape_command_index = 0..0ff(16),
    iot$tape_hardware_command = 0..01ff(16),
    iot$tape_request_length =
      0..ioc$max_tape_blocks_to_process*8*ioc$read_cmd_per_block+ioc$tape_pkt_lng_read;

{ Note that the following table must be ordered in the same manner as
{ the table iot$tape_request_types in module iom$tape_queue_manager_c.

  TYPE
    tape_command_table_entry = packed record
      index: iot$tape_command_index,
      length: iot$tape_request_length,
      hardware_command: iot$tape_hardware_command,
    recend;

*copyc IOC$MAX_NUM_TAPE_UNITS
