[<<][staapl][>>][..]
Mon Nov 15 11:52:19 EST 2010

Picking up again

I'd like to pick it up again, probably restructuring and documenting
the code.  The goal is to work towards a USB driver for the PIC18 with
a middle point that implements a proper debugging interface and emacs
bridge.

Meaning, the compiler seems to be working fine, now make the
interaction system a bit less messy.

First, what's with this module business?

A "staapl pic18/serial" line is equivalent to "(require (planet
zwizwa/staapl/pic18/serial))".

This defines a couple of macros like "macro/async.>tx" and target
words like "target/async.>tx"

The macros are code generation/transformation functions while the
target words are compiled target code.

One of the most important features of modules is to make sure all
names are bound at compile time.  I.e. I just converted an old usb.f
file to __usb.ss including the top line:

#lang planet zwizwa/staapl/pic18 \ -*- forth -*-

This then allows compilation with "mzc __usb.ss", giving an error in
my case:


mzc ~/staapl/staapl/pic18/__usb.ss
/home/tom/staapl/staapl/pic18/__usb.ss:23:6: compile: unbound identifier in module in: macro/UIE




[Reply][About]
[<<][staapl][>>][..]