I'm looking for something that can boot a harddisk bootsector from DOS.
INT19 works fine, but if there is a floppy inserted it gets booted instead
(which is not what I want).

First, I checked if it's possible to make an GRUB.EXE, but that seems
quite hard. Instead I'm trying to emulate INT19 myself, making sure the HD
gets booted. I'm using NASM assembler, making an .COM-file, and this
source:

ORG 0x100

SECTION .text
        ; ES = 0
        mov ax, 0
        mov es, ax

        ; Load bootsector
        mov ah, 2       ; Function 2 = read
        mov al, 1       ; One sector
        mov bx, 0x7c00  ; Buffer 
        mov cl, 1       ; Sectornumber
        mov ch, 0       ; Cylinder 0
        mov dl, 0x80    ; HD
        mov dh, 0       ; Head 0
        int 0x13

        mov dl, 0x80    ; HD
        jmp 0x7c00      ; Jump to bootsector

...but it doesn't work, except for occasional "Hard disk error". I've
looked at Grub's ENTRY(chain_stage1), but I can't find anything conceptual
different. What conditions must be met before one can load a bootsector,
besides DL loaded with current drive? What about memory-pollution: does it
matter that the memory isn't completely cleared?

All suggestions are welcome. What I really want to do is loading NT from
DOS, but I suppose one must use MS own loader. 

/Peter Astrand <[EMAIL PROTECTED]>

Reply via email to