XO-1.75 OpenFirmware serial terminal

John Watlington wad at laptop.org
Wed Mar 28 22:44:15 EDT 2012


On Mar 27, 2012, at 5:52 AM, James Cameron wrote:

> This is a serial terminal implementation for an XO-1.75 using Open Firmware.

Useful --- the computer science equivalent of the voltmeter.
Educational --- I learned that OFW has structs, and some new primitives (/n, ukey).

> Credit to the existing Open Firmware serial port FIFO queue
> implementation.  Couldn't have made it stable without it.

Nice.  It is cool to see a Forth version of what I wrote so many
variations of in C.

My favorite two lines (for simplicity) in the terminal emulator were:
\ serial interrupt handler for received data
: si ( -- )  ukey read-q enque  ;

I'd love to see serial terminal preloaded, but also acknowledge that I'm the
one pushing against a 2MB SPI Flash ROM.   How about specifying
a location in the main build, where another 20KB of example OFW code
isn't as important ?   Say:

devalias lib int:2          # build a pointer to the library into OFW

dir lib:\ofwlib\              # See what is available (anyway to avoid the dir name ?)
fload lib:\ofwlib\serial.fth
serial

We could also move some of the existing non-essential OFW utilities there as
SPI Flash ROM space gets tighter, such as emacs.

Cheers,
wad




More information about the Devel mailing list