
char w1[] = "   Program is hidden logical disk";
char w2[] = "   HIDDEN v1.1 (c)Copyright 1990 by Alis Nevsky";
char w3[] = "   Usage: HIDDEN <drive name> [R]";
char w5[] = "   Key R is restore logical disk";

main(int argc,char **argv)

   { int asd,i[1],bx,offset,zxc = 68;
     char value,al;
     long qwe;

/**************  Check command string *****************************/

     if(argc==1) printf("\n%s\n%s\n%s\n%s\n",w2,w1,w3,w5),exit();

/**************  Find logical disks table  **********************/

      _AH = 0x52;
      asm int 21h
      bx = _BX,
      i[0] = peek(_ES,bx+24),
      i[1] = peek(_ES,bx+26),

/**************  Check Dos version *******************************/

     _AH = 0x30;
     asm int 21h
     al = _AL;
     if(al == 3)
       { value = peekb(i[0],i[1]);
	 if(value == '\0')         offset = 14, zxc = 0;  /* DR DOS v3.x */
	 else if(value == '\x41')  offset = 81;           /* MS DOS v3.x */
       }
     else if(al == 4 || al == 5) offset = 88;     /* MS DOS v4.x or 5.x */

/****************************************************************/

     printf("\n%s",w2);
     if(argv[1][0] > 0x5A) argv[1][0] -= 0x20;
     if(argv[1][0] < 0x41 || argv[1][0]> 0x5A ) printf("Incorrect parameter !"),exit();
     asd = argv[1][0] - 0x41;

     if(argc == 3 && (argv[2][0] == 'r' || argv[2][0] == 'R'))
	  {if(zxc == 0) value = asd;
	   else         value = 0x40;      /* Delit this block for delit */
	  }				   /* key R */

     else {if(zxc == 0) value = 0xFF;
	   else         value = 0x00;
	  }

     pokeb(i[0],(i[1] + (asd * offset) + zxc),value);

    }