
John Hansen has released an updated NBC beta. NBC allows users to program the LEGO Mindstorms NXT using textual code with assembly language syntax.
This beta release introduces support for two new languages related to NBC. The NPG language is a very simple 5 step declarative language for writing RPG (NXT Program) executables. NPG programs simple list the 5 steps with compiler support for C++-style comments interspersed. Unlike the built-in NXT menu system mechanism for writing NXT Programs which require alternating move and wait commands, programs written using NPG can sequence the 5 commands in any order except that the EndStop and EndLoop commands can only occur as the last step. See test.npg for a small sample. These programs require the RPGReader.sys program on the NXT. This executable is 14kb in size but a replacement version which nearly identical functionality will soon be available on the NBC site which is only ~2.5kb.
NBC also now supports a very early version of the NXC programming language. This language is a lot like NQC syntax-wise. It is still in its infancy so it is subject to substantial change and improvement. The NBC compiler converts the NXC code to NBC code and then compiles it as it would any other NBC program. See test.nxc for a basic example.
The NXTDefs.h header file has been split into NXCDefs.h and NXTDefs.h. NBC programs should still #include “NXTDefs.h” but NXC programs should #include “NXCDefs.h”.
This release also fixes a problem with unix-style line endings which made it so that multiline macros written on non-Windows platforms would not work correctly.