Eight primitives and a colon compiler in 512 bytes is a nice demonstration of how much you can bootstrap from almost nothing. The examples building up from there are the best part.
Really shows how approachable it would have been to have just a tiny bit more added to the API of 'PC BIOS' to make for an extremely portable driver platform system to allow OS independent arbitrary hardware drivers as Forth that the system BIOS could compile at boot and run beneath the OS. Though of course the PC BIOS API from when that mattered isn't in anything like a modern protect mode operating profile.
Sectorforth is a 16-bit x86 Forth that fits in a 512-byte boot sector (2020)
11–17 of 17 posts
Re: Sectorforth is a 16-bit x86 Forth that fits in a 512-byte boot sector (2020)
#12I love both Forth and Lisp but SectorLisp it's far better. Also, for a small demo, check Eforth under Subleq/Muxleq: https://github.com/howerj/subleq edit subleq.fth/muxleq.fth and set these options to 1: 1 constant opt.multi ( Add in large "pause" primitive ) 1 constant opt.editor ( Add in Text Editor ) 1 constant opt.info ( Add info printing function ) 0 constant opt.generate-c ( Generate C code ) 1 constant opt.be…
Any opinion on which Forth implementation is good for 8-bit CPUs, in particular 8051?
Re: Sectorforth is a 16-bit x86 Forth that fits in a 512-byte boot sector (2020)
#13Eight primitives and a colon compiler in 512 bytes is a nice demonstration of how much you can bootstrap from almost nothing. The examples building up from there are the best part.
Re: Sectorforth is a 16-bit x86 Forth that fits in a 512-byte boot sector (2020)
#14Similar to this project: https://github.com/fuzzballcat/milliForth The ZEROEQUALS function can be replaced by: pop ax; neg ax;sbb ax,ax;push ax
That said interpreting the brainfuck mandelbrot program takes several hours. On an old CP/M system I have a brainfuck compiler that converts a program to Z80 machine code, and that same mandelbrot example runs in less than two seconds.
So speed isn't great, but having brainfuck really proves a toy system is "real".
Re: Sectorforth is a 16-bit x86 Forth that fits in a 512-byte boot sector (2020)
#15I love both Forth and Lisp but SectorLisp it's far better. Also, for a small demo, check Eforth under Subleq/Muxleq: https://github.com/howerj/subleq edit subleq.fth/muxleq.fth and set these options to 1: 1 constant opt.multi ( Add in large "pause" primitive ) 1 constant opt.editor ( Add in Text Editor ) 1 constant opt.info ( Add info printing function ) 0 constant opt.generate-c ( Generate C code ) 1 constant opt.be…
Any opinion on which Forth implementation is good for 8-bit CPUs, in particular 8051?
It's impressive what you can do in the C64 with just Forth instead of C64 Basic.
For Speccy/ZX80/ZX81, I'm pretty sure they ported the Jupyter ACE one, boosting up the available RAM in the 48k and 128k making Basic almost obsolete in that platform.
Re: Sectorforth is a 16-bit x86 Forth that fits in a 512-byte boot sector (2020)
#16Re: Sectorforth is a 16-bit x86 Forth that fits in a 512-byte boot sector (2020)
#17Earlier quoted context omitted.
Your own. And I'm not joking.
No, it makes sense now that you say it. :) It's not large.