[plt-scheme] Writing directly to a floppy

From: Jens Axel S?gaard (jensaxel at soegaard.net)
Date: Sun Nov 9 07:09:50 EST 2003

Dor Kleiman wrote:
> I am writing a compiler to help me program a small (floppy) OS.
> I want to be able to write directly into the diskette, how is that possible?
> I mean something like writing to a sector, directly to the device as a 
> stream, or one byte as an address.

What OS are you using?

On Linux:

   Mount the floppy as a block device and do what you want.
   [I know no details what-so-ever]
   Look at ount and dd.

On Windows:

   - Figure out the format of a "disk image".
   - Use Scheme to make the image file.
   - Use the utility rawrite.exe to write the image to disk
     (on the Redhat CD - to make Linux boot disks on DOS/Windows)

To get ideas, see:

Jens Axel S?gaard

Posted on the users mailing list.