?jumptomain SHORT
?resize FALSE
?use80386
?alignword FALSE
?startaddress 0x7c00

?include "WRITE.H--"
byte VERS=1;	//версия
byte met="SHEKER";
?define NUMSEC sizeof(file "multboot.dat")/512+0x201	//размер файла multboot.dat/512 + 0x201
word sign=EXTRACT "multboot.dat",0,2;

main()
{
	$CLI
	AX=0;
	SS=AX;
	SP=0X7C00;
	SI=SP;
	ES=AX;
	DS=AX;
	$STI
	$CLD
	DI=0X600;
	CX=0X100;
	$REPE
	$MOVSW
	DI=5;
	do{
		BX=0X800;
		AX=NUMSEC;
		DX=0X80;
		CX=2;
		$PUSH	DI
		$INT	0X13
		$POP	DI
		$JNC	LOC_0078
		AX=0;
		$INT	0X13
		DI--;
	}while(NOTZEROFLAG);
	WRITESTR("Error loading boot manager");
LOC_005B:
	$JMP	SHORT LOC_005B
LOC_0078:
	IF(ESWORD[0X800]!=sign){
		WRITESTR("Missing boot manager");
		$JMP	SHORT LOC_005B
	}
	$DB	0XEA,0,8,0,0
}
