     Modem_ResetCommandBuffer();
 
     C64Println();
-    DisplayBoth(F("OK"));
+    
+    if (autoConnectHost >=1 && autoConnectHost <= ADDR_HOST_ENTRIES)
+    {
+        // Phonebook dial
+        char address[ADDR_HOST_SIZE];
+        
+        strncpy(address,readEEPROMPhoneBook(ADDR_HOSTS + ((autoConnectHost-1) * ADDR_HOST_SIZE)).c_str(),ADDR_HOST_SIZE);
+
+        C64Print(F("Auto-connecting to:\n"));
+        C64Println(address);
+        
+        C64Println(F("\nPress any key to cancel..."));
+        // Wait for user to cancel
+
+        int option = PeekByte(C64Serial, 2000);
+
+        if (option != TIMEDOUT)   // Key pressed
+        {
+            ReadByte(C64Serial);    // eat character
+            DisplayBoth(F("OK"));
+        }
+        else
+            Modem_Dialout(address);
+    }
+    else
+        DisplayBoth(F("OK"));
 
     while (true)
     {

      
        wifly.close();

#ifndef HAYES        
        Modem_flowControl = EEPROM.read(ADDR_MODEM_FLOW);
        HandleAutoStart();
#endif  // HAYES
    
        C64Println();
#ifdef HAYES
        C64Println(F("Commodore Wi-Fi Modem Hayes Emulation"));
        ShowPETSCIIMode();
        ShowInfo(true);
        autoConnectHost = EEPROM.read(ADDR_HOST_AUTO);
        HayesEmulationMode();
#else
        C64Println(F("Commodore Wi-Fi Modem"));
        ShowInfo(true);

    while (1)

    C64Serial.println();
}

void C64Println()
{
    C64Serial.println();
}
