// change current dos directory
#include <iostream.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include "daemon.h"
#include "client.h"
int main (int argc, char **argv) {
  if (argc == 1) {
    cerr << "usage: " << argv[0] << " <directory>" << endl;
    return -1;
  }
  if (server_init() < 0 {
    exit(-1);
  }
  daemon_comms & dcom = server->daemon_comm;
  sprintf (dcom.buf, argv[1]);
  HI(ax) = 0x3b;
  DOS_DX = dcom.off + offsetof (daemon_comms, buf);
  Daemon_int86(0x21);
  if (LWORD(eflags) & 0x1) {
    cerr << "Carry set!!: DOS error " << DOS_AX << endl;
  }
  server_exit();
}
