Hi,

I've ported over Gforth-EC to the mikymist, running on top of the Bios.
If you want to give it a try, just boot this file via netboot or
serialboot (testing here w/ serialboot only):

  http://downloads.qi-hardware.com/people/dvdkhlng/gforth-lm32.bin

When run, this gives a Gforth terminal on the serial console into which
you can paste forth code to compile&execute.  As it doesn't use uart
buffering nor irq handling, you'll have to add some delay in between
lines when sending multi-line code-fragments, else some text will be
swallowed.  Try e.g.

gtkterm -p /dev/ttyUSB0 -s 115200 -d 50

for 50 ms inter-line delay.  Here are some example lines of forth code:

$e0001000 constant gpio-in
$e0001004 constant gpio-out
: testin  base @ hex  begin gpio-in @ cr .  key? until  base ! ;
: testout  0 begin 1+ 3 and dup gpio-out ! 10000 ms key? until  drop ;

Then running 'testout' blinks the LEDs, while 'testin' shows button
status.  BTW there's also a tetris-like game included, enter 'tt' :)

Source code here [1] or browse there [2].  The image was compiled
directly from Gforth, no binutils, GCC nor LLVM was involved :)

cheers,

David

[1] 
http://downloads.qi-hardware.com/people/dvdkhlng/gforth-0.7.9-20120209.tar.gz

[2] http://www.complang.tuwien.ac.at/cvsweb/cgi-bin/cvsweb/gforth/arch/lm32/
-- 
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

Attachment: pgp9ymKccRrzW.pgp
Description: PGP signature

_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkymist@Freenode

Reply via email to