#include <iostream.h>
#include <ctype.h>
#include "daemon.h"
#include "client.h"
#include <stdlib.h>

int main(int argc, char **argv) {
  if (server_init() < 0) {
    exit(-1);
  }
  
  HI(ax) = 0x36;
  if (argc == 1)
    LO(dx) = 0;
  else {
    LO(dx) = tolower(argv[1][0]) - 'a' + 1;
  }
  Daemon_int86(0x21);
  cout << "sectors per cluster\t = \t" << DOS_AX << endl;
  cout << "available clusters \t = \t" << DOS_BX << endl;
  cout << "bytes per sector   \t = \t" << DOS_CX << endl;
  cout << "total clusters     \t = \t" << DOS_DX << endl;
  
  cout << "total space = " << (DOS_AX * DOS_CX * DOS_DX/1024) << "K" << endl;
  cout << "available space = " << (DOS_AX * DOS_BX * DOS_CX/1024) <<"K" << endl;
  server_exit();
}
