rem: KPrintF( "Congiguring.\n" );
context: initRoutine( REG( d0, struct ISAPNPBase* res ),             REG( a0, APTR                    seglist ),             REG( a6, struct ExecBase*        sysbase ) ){  SysBase = sysbase;  if( ! OpenLibs() )  {    // No libraries?KPrintF( "No libraries?.\n" );  }  else  {    ULONG                 actual;    struct CurrentBinding current_binding;KPrintF( "Getting binding.\n" );        actual = GetCurrentBinding( &current_binding,                                 sizeof( current_binding ) );    if( actual < sizeof( current_binding ) )    {      // No legal CurrentBinding structureKPrintF( "No legal CurrentBinding structure.\n" );    }    else    {      struct ConfigDev* cd = current_binding.cb_ConfigDev;      if( cd == NULL )      {        // No card foundKPrintF( "No card found.\n" );      }      else      {        if( cd->cd_Rom.er_Manufacturer != 2150 ||            cd->cd_Rom.er_Product      != 1 )        {          // Unsupported ISA bridgeKPrintF( "Unsupported ISA bridge: %ld/%ld.\n",          cd->cd_Rom.er_Manufacturer, cd->cd_Rom.er_Product );        }        else        {          if( cd->cd_BoardAddr == NULL )          {            // No board address?KPrintF( "No board address?\n" );          }          else          {KPrintF( "Congiguring.\n" );            // Set up the ISAPNPBase structure            res->m_Library.lib_Node.ln_Type = NT_RESOURCE;            res->m_Library.lib_Node.ln_Name = (STRPTR) ResName;            res->m_Library.lib_Flags        = LIBF_SUMUSED | LIBF_CHANGED;            res->m_Library.lib_Version      = VERSION;            res->m_Library.lib_Revision     = REVISION;            res->m_Library.lib_IdString     = (STRPTR) IDString;            NewList( &res->m_Cards );            res->m_Base        = cd->cd_BoardAddr;            res->m_RegReadData = 0x0000;            res->m_ConfigDev   = cd;            if( ! ISAPNP_ScanCards( res ) )            {              // No cards foundKPrintF( "No cards found.\n" );            }            else            {              // Let's see if we're to disable any cards or devices              if( ! HandleToolTypes( current_binding.cb_ToolTypes, res ) )              {KPrintF( "Unable to handle tool types.\n" );              }              else              {                if( ! ISAPNP_ConfigureCards( res ) )                {                  // Unable to configure cardsKPrintF( "Unable to configure cards.\n" );                }                else                {                  cd->cd_Flags  &= ~CDF_CONFIGME;                  cd->cd_Driver  = res;                  ISAPNPBase = res;                }              }            }          }        }      }    }  }  return ISAPNPBase;}