home .. forth .. colorforth mail list archive ..

RE: [colorforth] blocks and corrupted floppies.


Hi Roger,

> i've found myself continually "patching"
> corrupted colorforth floppies, due to a byte getting written here or there
> into the wrong spot.
You are not the only one!
If you have a "then" without an "if" the value on the top of the stack is
used as the place to write the forward jump. This is probably 0, so it
corrupts the binary image. I'm sure there are other causes too...

I have defined "ss" and "uu" ( as they are easy to type ) to Save and Undo
the sector containing the currently edited block.
From cfdos3.blk block 24 ( http://www.inventio.co.uk/cfdos.htm ) :
: blk ( -a ) 0xA86 ;
: ll blk @ load ;
: sect blk @ 18 / dup 18 * block swap ;
: ss sect 1 writes /flop ;
: uu sect 1 reads /flop ;

"ll" loads the currently edited block.
Just type "ss" when you want to save your work. Bear in mind that the entire
18 block sector containing the changed block is written by "ss" ! "uu" is
useful to restore the last saved version.

I have renamed several of the colorForth primitives - you may need to modify
the names in the code above.
Also, you will need to check that the address of blk is correct for your
system.  :

Name changes to several system words to avoid clashes with ANS standard
names :

Was   is now called. function
---------------------------------
?dup  /dup           compiler ? decides whether a dup is needed
-     invert         -1 XOR
stop  /flop          turns off the floppy disk drive motor
or    xor            bitwise XOR ( New in V3 )
--    or             bitwise OR    ( New in V3 )

My top priority is to port the colorForth system from Assembler to
colorForth, then changes to make life easier would be trivial...

Good luck with colorForth! Its a lot of fun, but can be challenging ;)

Regards

Howerd

-----Original Message-----
From: rlevy [mailto:rlevy@xxxxxxxx]
Sent: 07 January 2005 19:48
To: colorforth@xxxxxxxxxxxxxxxxxx
Subject: [colorforth] blocks and corrupted floppies


I know that thinking critically about ColorForth and what improvements can
be
made is probably on noone's mind, with the recent lawsuit Chuck is involved
in. i also noticed that not many ideas are being bounced back and forth
publically. but I was just concerned about the system because in my primary
getting-aquainted-with doings, and i've really just only started 2 days ago
(but i am absolutely hooked now), i've found myself continually "patching"
corrupted colorforth floppies, due to a byte getting written here or there
into the wrong spot. i know it may be my fault, for want of experience and
understanding all the ins and outs, but i was wondering if people continue
to
have this problem even after lots of time and if it is why Chuck has
suggested the use of a "round-robin" system of floppies, a kind of analog
GoBack. it sounds like a sure bet to protect oneself against losing all
their
work but i imagine that it could lead to confusion, say if you make the
mistake of writing to them out-of-order or simply forget to save a working
copy before continuing.

I thought that maybe the problem could be softened by changing (or
extending?) the system to only save changed blocks to disk. then if the core
software is disturbed while working, it won't be a problem next time you
boot
up, saving the trouble of finding the newest working save or patching the
floppy from Windows. i think that first i need a word to save a random block
to disk (even past the original 162-block boundary) and then one in the root
block to save whatever i'm currently working on and only that. should save
some headaches. and time waiting for the disk. but it's not perfect. maybe
patching corrupted disks isn't the bother that could be made possible by
forgetting to update my custom save word. wow, these are real issues. one of
the things i love most about working in this new platform is i l so
RESPONSIBLE for myself. what a remarkable change from working in a sea of
rules and complexity that i was in before ...

so, jumping back, i wanted to know if other people have had the same
troubles
and how they deal with it.

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com



---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com