[<<][staapl][>>][..]Thu May 17 12:50:00 EDT 2012
Datastructures (named offsets / addresses)
For getting USB to work, first problem is handling datastructures.
The idea that came out of previous notes is to solve the namespace
problem by using positional pattern matching: bind macros to fields.
I.e. like in Haskell:
dataGet1 (DataStructure d1 d2 d2) = d1
Note that accessors in Haskell also don't use hierarchical namespaces.
Everything is solved with modules.
Underlying idea: the power of Staapl is in the macro system, which is
The question is then, how to represent it? This might need references
to datastructures on the macro level, which are eventually flattened
to raw memory accesses?
Basically, this is a wrapper around:
0 hard-coded addresses (static memory)
1 indirect objects
On the PIC18 this would be implemented the "a" register. The question
is then how to avoid contention with operations that use "a" directly?
This is a bunch of loose ideas that doesn't quite fit together
clearly. Let's go back to the basic app.