home *** CD-ROM | disk | FTP | other *** search
- .MODEL LARGE
- .DATA ;
- .CODE ; Do not edit this file!!!
- LOCALS ;
- PUBLIC _EMP_IPL
- PUBLIC _STD_IPL
-
- _EMP_IPL PROC
- ;
- ; Dummy boot record to display message like
- ;
- ; "Partition is not bootable ..."
- ;
- ; MBR loads this boot record at 0000:7C00h
- ;
- mov ax, cs
- mov ds, ax
- mov ss, ax
- mov sp, 7C00h
- jmp short @@p3
- @@p0:
- pop si
- mov ah, 0Eh
- mov bh, 00h
- @@p1:
- cld
- lodsb
- or al, al
- jz @@p2
- int 10h
- jmp @@p1
- @@p2:
- xor ax, ax
- int 16h
- mov ax, 0E0Dh
- int 10h
- mov al, 0Ah
- int 10h
- int 19h
- ;
- @@p3:
- call @@p0
- DB 0
- _EMP_IPL ENDP
-
-
- _STD_IPL PROC NEAR
-
- ;
- ; IPL that comes with MS-DOS's fdisk.exe
- ;
-
- CLI
- XOR AX,AX
- MOV SS,AX
- MOV SP,7C00h
- MOV SI,SP
- PUSH AX
- POP ES
- PUSH AX
- POP DS
- STI
- CLD
- MOV DI,0600h
- MOV CX,0100h
- REPNZ
- MOVSW
- ; JMP 0000:061D
- DB 0EAh
- DW 061Dh, 0000h
- @@_061D:
- MOV SI,07BEh
- MOV BL,04h
- @@_0622:
- CMP BYTE PTR [SI],80h
- JZ @@_0635
- CMP BYTE PTR [SI],00h
- JNZ @@_0648
- ADD SI,10h
- DEC BL
- JNZ @@_0622
- INT 18h
- @@_0635:
- MOV DX,[SI]
- MOV CX,[SI+02]
- MOV BP,SI
- @@_063C:
- ADD SI,10h
- DEC BL
- JZ @@_065D
- CMP BYTE PTR [SI],00
- JZ @@_063C
- @@_0648:
- MOV SI,068Bh
- @@_064B:
- LODSB
- CMP AL,00
- JZ @@_065B
- PUSH SI
- MOV BX,0007
- MOV AH,0Eh
- INT 10h
- POP SI
- JMP @@_064B
- @@_065B:
- JMP @@_065B
- @@_065D:
- MOV DI,0005h
- @@_0660:
- MOV BX,7C00h
- MOV AX,0201h
- PUSH DI
- INT 13h
- POP DI
- JNB @@_0678
- XOR AX,AX
- INT 13h
- DEC DI
- JNZ @@_0660
- MOV SI,06A3h
- JMP @@_064B
- @@_0678:
- MOV SI,06C2h
- MOV DI,7DFEh
- CMP WORD PTR [DI],0AA55h
- JNZ @@_064B
- MOV SI,BP
- ; JMP 0000:7C00
- DB 0EAh
- DW 7C00h, 0000h
-
- @@_068B: DB "Invalid partition table",0
- @@_06A3: DB "Error loading operating system",0
- @@_06C2: DB "Missing operating system",0
-
- DB 293 DUP(0)
-
- _STD_IPL ENDP
-
- END
-