src/dps8/dps8_cable.c
// A scu is trying to attach a cable to a cpu.
//  cpu port cpu_unit_num, cpu_port_num
//  from  scu_unit_num, scu_port_num, scu_subport_num
//
A scu is trying to attach a cable to a cpu.
A scu is trying to attach a cable to a cpu .
static t_stat cable_to_cpu (int cpu_unit_num, int cpu_port_num, 
                            int scu_unit_num, int scu_port_num,
                            int scu_subport_num)
  {
    if (cpu_unit_num < 0 || cpu_unit_num >= (int) cpu_dev . numunits)
      {
        sim_printf ("cable_to_cpu: cpu_unit_num out of range <%d>\n", 
                    cpu_unit_num);
        return SCPE_ARG;
      }
    if (cpu_port_num < 0 || cpu_port_num >= N_CPU_PORTS)
      {
        sim_printf ("cable_to_cpu: cpu_port_num out of range <%d>\n", 
                    cpu_port_num);
        return SCPE_ARG;
      }
    if (scu_subport_num < 0 || scu_subport_num >= N_SCU_SUBPORTS)
      {
        sim_printf ("cable_to_cpu: scu_subport_num out of range <%d>\n", 
                    scu_subport_num);
        return SCPE_ARG;
      }
    if (cables -> cablesFromScuToCpu [cpu_unit_num] . ports [cpu_port_num] . inuse)
      {
        sim_printf ("cable_to_cpu: CPU socket in use; unit number %d, port number %d\n", cpu_unit_num, cpu_port_num);
        return SCPE_ARG;
      }
    struct cpuPort * p = 
      & cables -> cablesFromScuToCpu [cpu_unit_num] . ports [cpu_port_num];
    p -> inuse = true;
    p -> scu_unit_num = scu_unit_num;
    p -> scu_port_num = scu_port_num;
    p -> scu_subport_num = scu_subport_num;
    p -> devp = & scu_dev;
    setup_scbank_map ();
    return SCPE_OK;
  }
static t_stat cable_to_cpu ( int cpu_unit_num , int cpu_port_num , int scu_unit_num , int scu_port_num , int scu_subport_num ) { if ( cpu_unit_num < 0 || cpu_unit_num >= ( int ) cpu_dev . numunits ) { sim_printf ( " \n " , cpu_unit_num ) ; return SCPE_ARG ; } if ( cpu_port_num < 0 || cpu_port_num >= N_CPU_PORTS ) { sim_printf ( " \n " , cpu_port_num ) ; return SCPE_ARG ; } if ( scu_subport_num < 0 || scu_subport_num >= N_SCU_SUBPORTS ) { sim_printf ( " \n " , scu_subport_num ) ; return SCPE_ARG ; } if ( cables -> cablesFromScuToCpu [ cpu_unit_num ] . ports [ cpu_port_num ] . inuse ) { sim_printf ( " \n " , cpu_unit_num , cpu_port_num ) ; return SCPE_ARG ; } struct cpuPort * p = & cables -> cablesFromScuToCpu [ cpu_unit_num ] . ports [ cpu_port_num ] ; p -> inuse = true ; p -> scu_unit_num = scu_unit_num ; p -> scu_port_num = scu_port_num ; p -> scu_subport_num = scu_subport_num ; p -> devp = & scu_dev ; setup_scbank_map ( ) ; return SCPE_OK ; }
A scu is trying to attach a cable to a cpu.
A scu is trying to attach a cable to a cpu .
// Taking this out breaks the unit test segment loader.