end
  if (irqNo < 2 || irqNo > 15)
    error(message('xPCTarget:Interrupts:IRQRange'));
  end
  irq = irqNo;

  found = -1;  % will stay -1 if we don't find the name in the list
  for idx = 1:lth
    line = boardlist(idx);
    if strcmp(b_type, line.name )
      found = idx;
      break;
    end
  end

  if found == -1  % should never happen
    error(message('xPCTarget:Interrupts:InterruptBoard'));
  end
  
  str = boardlist(found);
  str.IRQ = irq;

  if (str.VendorId < 0)
    if (str.DeviceId > 0) && (length(slot) > 2)
      if strcmp( '0x', slot(1:2) )
        slot = hex2dec(slot(3:end));        % 0x.... , eval the .... part
      else
        error(message('xPCTarget:Interrupts:ISAAddr'));
      end
    else
      slot = 0;
    end
    if irqNo == 2
        str.IRQ = -1;  % indicates ISA board using AUTO, errors out in TLC.
                       % If we try to use error() here, then running the
                       % model on an ISA int with AUTO fails in TLC with
                       % a different, much less intelligible error.
    end
  else
    slot = eval(slot);  % PCI boards
    if irqNo ~= 2
       warning(message('xPCTarget:Interrupts:IRQsetting'));
    end
  end
  switch length(slot)
   case 1
    if (slot < 0) && slot ~= -1
      error(message('xPCTarget:Interrupts:Sloterror'));
    end
   case 2
    if any(slot < 0)
      error(message('xPCTarget:Interrupts:Sloterror'));
    end
    slot = 256 * slot(1) + slot(2);
   otherwise
    error(message('xPCTarget:Interrupts:Sloterror'));
  end

  str.PCISlot     = slot;
  str.Reserved = 1;
