[plt-scheme] Writing directly to a floppy

From: Dor Kleiman (dor at ntr.co.il)
Date: Sun Nov 9 08:09:57 EST 2003

On linux I could simply open the output file /dev/fd0... The problem is I'm using Windows.
I know rewrite, but is there a way to do it without an external program?
If not, how do I start rawrite?

-----Original Message-----
From: Jens Axel S?gaard [mailto:jensaxel at soegaard.net]
Sent: Sunday, November 09, 2003 2:10 PM
Cc: PLT-scheme mailing-list (E-mail)
Subject: Re: [plt-scheme] Writing directly to a floppy

  For list-related administrative tasks:

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.