#include<stdio.h>
#include<dos.h>
union REGS in;
main()
{
 unsigned m,d,p,q,e,b;
 FILE *fp;
 char bu[0x400];
 m=_ES;
 disable();
 _AH=0x52;
 geninterrupt(0x21);
 e=_ES;b=_BX;
 p=peek(e,b-2);
 while(peek(p,0x26)!=(p+1))
  p+=peek(p,3)+1;
 d=p+1;
 while(peekb(p,0)!=0x5a)
  {
   q=peek(p,1);
   if(q&&(q!=d)&&(q!=m)) freemem(p+1);
   p+=peek(p,3)+1;
  }
 if((fp=fopen("duzhou.mem","rb"))==NULL)
   {
    printf("duzhou.mem not found! Please read readme.\n");
    abort();
   }
 fread(bu,1000,1,fp);
 fclose(fp);
 movedata(_DS,bu,0,0,1000);
 _AH=0;
 geninterrupt(0x10);
 in.h.ah=0;
 in.h.al=3;
 int86(0x10,&in,&in);
 enable();

}
