Re: Exchanging files

From: Andy Valencia <>
Date: Wed Apr 06 2005 - 13:55:25 PDT

Antonio Maschio <> wrote:
> How can someone exchange some source block file with someone else?
> A solution I could think of is making use of dd under Linux/Unix, but
> a problem arise: I should know **exactly** the address where either put
> the data or from where retrieve the data, to avoid, in the first case,
> rewriting over existing data, and so I'd need a fast way to calculate
> the free space into ForthOS, I mean a way to obtain a series of
> contiguous block marked as free, along with an offset to them for dd.

Well, pulling contents off is easy enough; will show you the block
number. Then from UNIX just "dd bs=4k if=/dev/<whatever> iseek=<blk#> ..."
(set the output file to your UNIX filesystem file to hold it).

> Not to mention the fact that I may have a "file" under Linux, to
> transfer as "block" under ForthOS, or a "block with shadows" under
> ForthOS that I may want as "file" under another OS, and of course some
> programs to convert from one format to another.

I pushed out block utilities for this in:

Which should provide a useful starting point.

> Of course, there may be other solutions, easier and maybe already built
> into the source, but I couldn't take the time to read ALL that jazz.
> Any other suggestion?

Be careful when DD'ing source back onto ForthOS that you don't touch the
last 96 bytes of a file in a ForthOS filesystem. Since I'm almost
exclusively doing new code, interchange with the outside world hasn't
been much of an interest, but in the past I would push the blocks onto
a non-filesystem range of ForthOS blocks from UNIX, then boot ForthOS and use
copy-blocks (read the comments on this word carefully before using!)
to push the contents under a file.

Received on 6 Apr 2005 20:55:25 GMT

This archive was generated by hypermail 2.1.8 : Tue Sep 26 2006 - 09:03:06 PDT