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

main() {
  if (server_init() < 0) {
    exit(-1);
  }
  DOS_AX = 0;
  DOS_BX = 0;
  Daemon_int86 (0xe6);
  
  int major, minor;
  
  DOS_AX = server->daemon_comm.ax;
  
  cout << "DOS_AX = " << (void *)DOS_AX << endl;
  cout << "DOS_BX = " << (void *)DOS_BX << endl;

  
  if (DOS_AX == 0xaa55) {
    minor = DOS_BX & 0xf;
    major = DOS_BX >> 4;
    cout.form ("dosemu found ... version 0.%d%d", major, minor) << endl;
  }
  else
    cout << "not running under dosemu" << endl;
  server_exit();
}
