buf[j] = 0x80;
buf[j] |= 0x80;
Xboot(){	int dev, part, st;	char *buf = (void *)0x7c00;	if(cmd.argc != 2) {		printf("machine boot {fd,hd}[0123][abcd]\n");		return 0;	}	/* Check arg */	if(cmd.argv[1][0] != 'f' && cmd.argv[1][0] != 'h')		goto bad;	if(cmd.argv[1][1] != 'd')		goto bad;	if(cmd.argv[1][2] < '0' || cmd.argv[1][2] > '3')		goto bad;	if(cmd.argv[1][3] < 'a' || cmd.argv[1][3] > 'd')		goto bad;	printf("Booting from %s ", cmd.argv[1]);	dev = (cmd.argv[1][0] == 'h')?0x80:0;	dev += (cmd.argv[1][2] - '0');	part = (cmd.argv[1][3] - 'a');	printf("[%x,%d]\n", dev, part);	/* Read boot sector from device */	st = biosd_io(F_READ, dev, 0, 0, 1, 1, buf);	if(st) goto bad;	/* Frob boot flag in buffer from HD */	if(dev & 0x80){		int i, j;		for(i = 0, j = DOSPARTOFF; i < 4; i++, j += 16)			if(part == i)				buf[j] = 0x80;			else				buf[j] = 0x00;	}	printf("%x %x %x %x %x\n", buf[0], buf[1], buf[2], buf[3], buf[4]);	/* Load %dl, ljmp */	bootbuf(dev, part);bad:	printf("Invalid device!\n");	return 0;}