Hi Mark,
> This sounds great! Figgy is turning into quite a sophisticated Forth
> machine!
>
> Thumbs up!
Thanks for that :-)
Sometimes it requires a lot of effort to add things which don't seem
to provide much functionality, but at other times you can add
relatively little and gain significant functionality.
The Disk driver to Forth conversion is definitively in the former
case. It adds nothing to the functionality of FIGnition - it's the
same algorithms! However, it's important because at a practical level
it adds the space I need for a few other, valuable features (like
stack checking). But also, philosophically it's good because from the
beginning I envisaged FIGnition becoming more Forthy, because ideally
Forth is the system and everything should be done through the core set
of words. The 'C'/Assembler/Forth hybrid nature of FIGnition's
firmware messes with that somewhat, mostly because the Forth system
doesn't have any real access to 'C' and 'C' can't call Forth. So where
it doesn't impact, I've been shifting things to Forth. For example,
the editor was re-done in Forth (which actually does add useful
functionality) and the start-up screen was shifted to Forth too.
Ultimately most of the video initialization can be shifted to Forth,
which will help when I add a no-video mode to FIGnition : -1 vmode
(better for embedded real-time applications).
VDisk is a really good example of how FIGnition's firmware has
changed. The earliest version (which wasn't called VDisk) expected
users to supply physical Flash blocks to write to, which meant that
users had to keep allocating a new physical page every time they
wanted to edit a page. Then it was quickly enhanced to support a
simple virtual table of pages, but without purging. This meant that
users would eventually run out of flash simply by editing the same
sectors over and over. The most recent version includes purging and I
love its tiny algorithm! The Forth version could be easily converted
to support a raw Flash-chip based disk system on a retro computer;
including both parallel and serial Flash variants [ A 29F040 would
give you a similar amount of storage as with FIGnition, 512Kb-34Kb or
so]. Anyway, I digress!
On the other hand, it only requires minor changes for the editor to
support >512b of text. In fact you can already use boxed to edit any
amount of text, I did that in order to test FIGkeys 1.1.
-cheers from Julz