RETRO bootsector

Tom Novelli tcn@tunes.org
Thu, 10 Feb 2000 19:40:49 -0500 (EST)


On Tue, 8 Feb 100, Rick Hohensee wrote:
> Hi. Rick Hohensee here.
> 
> I've written a 3-stack Forth variant, "H3sm", Hohensee's 3-stack machine,
> and I'm thinking it might be fun if it was bootable. Your boot.asm is
> very nice. Better commented than Linux bootsect.S I think. I have a 
> little proto-bootsector of my own, but reading many sectors off floppy
> is well beyond my x86 abilities, so I'll be converting boot.asm to 
> GNU as. What I'm hoping is that I can write stage_2 in 32 bit, mostly
> C I hope. My bootsector.S does the 1 -> cr0 without crashing. Doesn't
> do much else either, but...
> 
> Is the read_sects thing in boot.asm limited to 128k? i.e. does the BIOS
> only look at the low byte of the pertinent count register?
> Is there something besides loading "stage 2" that ABSOLUTELY has to be 
> done in real mode, or by the BIOS?
> Any other comments? Suggestions?
> 
> You might find H3sm interesting, BTW. It's VERY low-level C. I call it 
> "<C" :o)  Also, it was a lot of work to write a unique VM, and the 
> result I think was worth it as an experiment. H3sm has two stacks for
> Forth's parameter stack. H3sm has a pointer stack and a data stack.
> Data is vectored by a "Size" virtual register, such that primitives
> that act on data stack items are inately operations on from 1 to 256
> bytes. "Operator vectoring", which I suspect is much more efficient
> than overloading. 
> ftp://linux01.gwdg.de/pub/cLIeNUX/interim   and get H3sm<version>.
> 
> H3sm is about 33k with 49 Linux syscalls, about 25k without them.
> It doesn't use libc. 3 stacks doesn't eliminate stack-dancing, but you
> don't miss stuff like PICK at all.

Well, you only need a very simple bootloader for a <64k image.  There
really is no limit... I think one of John Fine's loaders can handle 4M.

My newest version of Retro (not yet released) has a few simple drivers and
a Forth interpreter in about 10k.  With an ELF or XCOM loader you could
load H3sm... of course you'd need to modify it to call my drivers instead
of the Linux system calls.  I'll have a look at it..


BTW, nice Linux system you've put together.. I've been looking for
something like that.

Tom Novelli