#include "client.h"
#include "mscdex.h"
#include <iostream.h>

main() {
  
  server_init(); // must remember to call this !!!!
  
  double ver = mscdex_ver();
  cout << "mscdex version = " << ver << endl;
  cout << "cd drive = " << (char)(firstdrv() + 'A') << ":" << endl;
  
  char mscdex_drive = firstdrv();
  
  int sector = 0;
  for (;;) {
    DOS_CMD = CALL_IRQ;
    DOS_ARG = MSCDEX_INT;
    DOS_AX  = MSCDEX_READ;
    DOS_BX  = DOS_BUFFER;
    DOS_CX  = mscdex_drive;
    DOS_DX  = 1;
    DOS_SI  = (sector) >> 16;
    DOS_DI  = (sector) & 0xffff;
//    DOS_FL  = 0;
    cout << '.' << flush;
    call_dosemu();
  }
    
  
}
