If you can’t beat ‘em, join ‘em
I’ve had fun making the little DCPU emulator (past couple of posts: 1, 2), but sadly, I’ve had no time to make a Forth for it. But hey, Matt Hellige has already done it! I just took his GoForth and got it up and going. Just grab the image from here and load it up:
let image = File.ReadAllBytes @"..\..\goforth.img"for i in 0 .. 2 .. image.Length - 1
do
memory.[i / 2] <- (uint16 image.[i]) <<< 8 ||| uint16 image.[i + 1]<br>cycle ()
Viola, a nice little interactive Forth!
Take it for a spin!
This sure beats assembly (even with a nice IDE) and, for interactivity, it even beats the C tool chain. Running interactively on the target machine is invaluable!
Now we need Notch to get around to spec’ing all the ship sensors and actuators!
(BTW, the code for the little 100-line F# emulator is at my github)
Comments
- Anonymous
April 19, 2012
Try it out here too: http://0x10co.de/cyya3 - Anonymous
April 21, 2012
Very nice. A few people mentioned they're working on DCPU Forth and I wondered who'd get there first :-)