[syslinux] Syslinux Bootsector

Michael K Ter Louw mterlo1 at uic.edu
Wed May 15 16:13:59 PDT 2002


> 
> Looks sensible.  In fact, that particular poking directly on the
floppy
> controller has been bugging me for quite a while... it's simply not
the
> Right Thing to do since you don't know for sure that the int 13h
device
> and the hardware floppy is the same thing, especially not in the
> presence of IDE/USB floppy or things like MEMDISK.
> 
> 	-hpa
> 


I can't remember where exactly I borrowed this from (some os boot
loader), but it works and it tricks the BIOS into shutting down the
motor (therefore no knowledge of the underlying hardware is necessary).

	mov cx, 100		; advance BIOS counter 100 times

.shut_down_floppy_motor:

	int 8			; call the PIT's interrupt handler
	loop .shut_down_floppy_motor		; make BIOS think time
is ticking

You can vary cx as you see fit, and preserve/restore the tick count in
the BIOS data segment if you're worried about artificially advancing the
timer.

Another case where programming the FDC directly won't work is on the
Toshiba Libretto, where the floppy disk is a PCMCIA device.  The ports
mapped to the PC card are not the standard FDC ports.







More information about the Syslinux mailing list