12.31.2010

NBC has a horrible documentation if it comes to actual how-to-use details. Fortunately, there are enough example programs I can abuse to my liking. The syntax itself is very easy and once you found your way through the JustTooRawAndUseless(TM)-alike documentation, you can actually get stuff to work without much problems. But I really don't want to make real code using it. I'm much more of a C/C++-oriented guy, so I guess I either need to fight my through it (I don't like to fight) or create a language that's much comftable and translates to NBC code. That shouldn't be hard, since it already give you essential things like structures, subroutines and threads. Besides a static amount of memory for global variables, you also also get a limited support for dynamic memory allocation in form of arrays. So somehow there seems to be enough functionality in the firmware to make some limited, procedural programming languages possible using NBC. Only drawback I don't like that you can't really abuse them as adresses or pointers. So there won't be any "dynamic" content structure, you can only use pre-defined and you can only use these. I read an informative paper a Logo implementation using NBC. As far as I can remember, they just wrote that they used NBC for making it, so it's either a bytecode interpreter occupying the whole 32k memory to garbagecollect it, or they actually wrote a converter. But I guess they wrote an interpreter (I'm not in the mood to further dig into it), cause it'd be hard to integrate certain features with standard NBC.

After some more tests I'll guess I'll design a language I can easily parse, manage and code. I don't to have something too fancy with too strict rules, just some basic elements covering NBCs feature list (and firmware system calls, of course, too). So I can rely on NBC doing it's work as long as I capture all syntax and logic mistakes BEFORE it get's compiled via NBC.

No comments: