1NBC/NXC Release Notes 2----------------- 3 4Please send bug reports to bricxcc@comcast.net. Be sure to include 5details about what platform you are running nbc/nxc on and a sample 6file that demonstrates the bug if possible. 7 8For updates and additional documentation, visit the NBC Web Site: 9http://bricxcc.sourceforge.net/nbc/. Send emails to bricxcc@comcast.net. 10 11Version 1.2.1.r4 (2011-03-13) 12----------------------------- 13- Fixed a problem with using NBC keywords in NXC code. 14- Fixed GetBrickDataAddress defect (nested asm blocks are not supported) 15- Fixed HSMode offset in NBCCommon.h 16- Enum and switch case label fixes/changes for NXC 17- Fixed bug in StrReplace. 18- Fixed bug in FileResize subroutine 19- Compiler optimizer fix to work around standard firmware bug when output 20 variable is float 21- Fixed small problem with negative numbers as parameter default values. 22- Fixed CurrentTick and FirstTick to return unsigned value 23- Fixed bug in bcd2dec (was using signed stack instead unsigned) 24- Fixed bug in switch statement containing a continue 25- Fixed defect with OnFwdSyncPID, OnRevSyncPID, OnFwdRegExPID, and OnRevRegExPID. 26- Added support for math assignment with arrays of UDTs 27- Added support for new enhanced firmware FileTell system call function 28- Added MemoryManager system call function 29- Added API functions for the LEGO temperature sensor, HiTechnic Magnet and 30 Angle sensors, the Codatex RFID sensor, and the new MemoryManager system call. 31- Added support for setting the new BtDataMode and HsDataMode fields in the 32 Comm module IOMap 33- Added support for HS multi-NXT addressing (requires latest 1.31 enhanced 34 NBC/NXC firmware) 35- Added SizeOf API function and modified Read and ReadLn to use it. 36- Added Pos function. 37- API header file changes for fopen and other minor things 38- Moved IOCtrl module functions after Command module functions 39- StrCat and overloaded + operator changes (for string concatenation) 40- Made SetHSMode an inline function so that it checks for int-sized input 41 parameter 42- Added support for escaping in character literals 43- Added support for optional string error message in compchk opcode. 44- Added support for position regulation 45- Updated example code for GetBrickDataAddress 46- Replaced the sample programs for FlattenVar and UnflattenVar. 47- Added example file documentation 48- Added examples for the Mindsensors ACCLNx device 49- New examples for the MemoryManager system call function and limits.h constants. 50- Adding examples for new API functions. 51- New examples for FindFirstFile and FindNextFile. 52- Updated doxygen comments for several functions that no longer require constant 53 inputs 54- Many API additions and changes 55 56 57Version 1.2.1.r3 (2010-06-29) 58----------------------------- 59- Fixed a bug with the new comma operator support when using ?: in 60 function calls 61- Fixed reference count NBC optimization defect when function is defined after 62 all its callers. 63- Fixed global initialization defect when the global declaration occurs after 64 task main. 65- Renaming addr, reladdr, and addrex to be addressOf, reladdressOf, and addressOfEx. 66 67Version 1.2.1.r2 (2010-06-06) 68----------------------------- 69- Reverted changes to relation expressions so you again have to use 70 parenthesis if you want a relation on the RHS of a relation. 71- Fixed a bug with the precedence level of the ! operator. 72- Added support for comma operator. 73- Fixed regression in ReadSensorMSPlayStation and ReadSensorMSPlayStationEx 74- Added command line switch to turn off status messages. 75- Significant changes to expression parsing to correct operator precedence 76 and associativity defects. 77- Fixed string and character literal parsing bug (for the '/' character) 78- Fixed NBC sizeof operator bug (it was incorrectly padding the size of 79 byte-sized fields in structures). 80- Fixed compiler hang when a struct array member specifies a size. The size 81 now simply ignored. 82- Fixed preprocessor defect with "." in front of a preprocessor macro 83- Allow for a string to be considered an array type when passing it as 84 parameter to a function. Also return an ArrayBaseType of TOK_BYTEDEF 85 when a string is passed in and return 1 from GetArrayDimension when a 86 string is passed in. 87 88 89Version 1.2.1.r1 (2010-05-13) 90----------------------------- 91- Added support for '\' line continuation characters in NBC source code. 92- Added support for initializing structs and for declaring const structs. 93- Added Arno van der Vegt's graphics library to the standard header files. 94- Added Tone type and the PlayTones and PlaySound functions. 95- Fixed defect in DrawGraphicType structure 96- Fixed some case sensitive bugs in the NXC parser. 97- Fixed NBC sizeof to not pad 98- Add compiler status message if compile failed 99- Fixed bug in reference parameters following an array or UDT argument 100- Added support for string expressions in several API functions including StrCat. 101- Default compiler firmware version target is now 128 (used to be 105). 102- Header files now contain doxygen comments 103- Fixed a bug in atof 104- Added DisplayFont, SetDisplayFont, and addr functions 105- Added support for assignments as expressions 106- Fixed a bug with asm statements passed into function call parameters 107- Fixed a bug in for loop initialization when declaring a local variable of type float 108- Added DRAW_OPT_POLYGON_POLYLINE constant to support enhanced firmware change to 109 DrawPolygon system call 110- Improved support for math assignment operations with arrays and structs 111- Fixed defect in NXCDefs.h where float type was used outside a check for firmware > 107 112- Added ClearLine API function 113- Fixed a bug in inline functions that return a struct 114- Fixed a bug passing a UDT array expression into an inline function taking a UDT arg 115- Added reladdr and addrex functions (requires latest enhanced NBC/NXC firmware) 116- Fixed memcmp function 117- Added support for full boolean expressions on RHS of relation 118 119 120Version 1.0.1.b36 121----------------- 122- Added support for \", \', and \\ embedded in NXC and NBC strings. 123- Added -ER=n maximum compiler error switch. Filtered out duplicate errors as well. 124- Added support for 2D scalar constant array initialization using nested brace pairs. 125 e.g., int xyz[][] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; 126- Added support for global constant string initialization and subsequent usage. 127 e.g., const string g_bar = "bar"; const string g_foo = g_bar; 128- Added support for constant string array initialization using comma-separated 129 string constants within brace pairs. e.g., string msgs[] = {"hi", "there", "testing", g_bar, g_foo}; 130- Added support for multi-dimensional array indexing on both the LHS and RHS side of expressions. 131 e.g., foo[i][j] = foo[i][j] + 1; 132- Added support for returning a struct from a function. 133- Added support for #download "filename" preprocessor command in NBC/NXC 134- Added support for import keyword in RICScript 135- Added support for struct "dot" notation, e.g., mydata[0].foo = 10; int x = mydata[0].foo; 136- Added support for "typedef struct" syntax 137- Added support for byte array to string assignment in NXC 138- Fixed bug in Random() API function 139- Added support for array math operation syntax in NXC, e.g., array += 2; array = !array, etc... 140- Fixed multi-line macro parsing bugs and problems with preprocessor directives mixed in 141 with expressions. 142- Compiler is now compatible with both 1.0x firmwares and 1.2x firmwares. 143- Added API support for HiTechnic touch sensor multiplexer in NBC/NXC. 144- Added support for variadic macros. 145- Added support for macro redefinition (with warnings). 146- Added support for floats in NBC/NXC with 1.2x firmwares. 147- Improved support for unsigned long expressions. 148- Added API support for setting baud rate and mode of Hi Speed port with enhanced firmware. 149- Added API support for LEGO Color sensor 150- Fixed a preprocessor bug which broke nested #else statements 151- Added NXC API functions for enhanced firmware math opcodes (atan, ceil, exp, floor, tan, tanh, 152 cosh, sinh, log, log10, atan2, pow, trunc, frac, muldiv32, cos, acos, sin, and asin) 153- Added NBC/NXC API support for HiTechnic EOPD sensor 154- Added firmware and NBC/NXC API support for reading/setting the display Contrast 155 (SetDisplayContrast(byte contrast); and byte DisplayContrast(void);) 156- Added compiler optimization for constant shifts 157- Improved function prototype support 158- Added NXC API functions for enhanced firmware math opcodes (atand, tand, tanhd, 159 acosd, cosd, coshd, asind, sind, sinhd, atan2d) 160- Added firmware version check when downloading compiled .rxe to NXT. 161- Level 2 optimization bug fixes 162- Cross platform fixes/64-bit support 163- Support for Array and UDT expressions in parameter passing. 164- Inline functions can now call other inline functions 165- const type arguments to inline functions can now be treated as a compile-time constant. 166- fixed a bug in the preprocessor for char type #defines (e.g., #define test 'c') 167- fixed a optimizer bug that was removing safecall mutexes that should not be removed 168- Added API support for HiTechnic IRSeeker 2 and Color 2 sensors 169- Added API functions to read I2C Version, VendorId, and DeviceId values 170- Added support for optional parameters using a not exactly C syntax (delphi-like) 171- fixed bug in structs containing arrays with more than one dimension. 172- fixed defects 2902670 & 2896265. 173 http://sourceforge.net/tracker/?func=detail&aid=2902670&group_id=68600&atid=521776 174 http://sourceforge.net/tracker/?func=detail&aid=2896265&group_id=68600&atid=521776 175- Added support for enum keyword 176- Added command-line parameter to specify preprocessor recursion max depth (default is 10) 177- Fixed defect 2908377. 178 http://sourceforge.net/tracker/?func=detail&aid=2908377&group_id=68600&atid=521776 179- Added support for struct member declaration using comma-separated variable names. 180- Fixed defect 2922394. 181 http://sourceforge.net/tracker/?func=detail&aid=2922394&group_id=68600&atid=521776 182- Added compiler status output to stdout. 183 184 185Version 1.0.1.b35 186----------------- 187- Exposed the bcd2dec API function in NXC. 188- Fixed a bug when whitespace separates open parenthesis and function name 189 e.g., y = mal2 (7); 190- Added support for bitwise negation (complement) in NXC using the ~ operator. 191 This requires the enhanced NBC/NXC firmware. 192- Added support for local array initialization in NXC. Only single dimension 193 arrays of non-aggregate types are supported. 194- Fixed a bug in the symbol table output where preprocessor declarations were 195 being erroneously stripped. 196- Fixed a line number reporting problem in NXC when using #include for non-system 197 header files. 198- Added .ric file decompilation to the NBC compiler. 199- Added support for new opcodes and system calls in the latest enhanced NBC/NXC 200 firmware. The new system calls are FileFindFirst, FileFindNext, 201 FileOpenWriteLinear, FileOpenWriteNonLinear, FileOpenReadLinear, 202 CommHSControl, CommHSCheckStatus, CommHSWrite, and CommHSRead. The new 203 opcodes are arrop, acos, asin, atan, ceil, exp, fabs, floor, sqrt, tan, 204 tanh, cos, cosh, log, log10, sin, sinh, atan2, fmod, and pow. 205- Added support for all the Power Function modes via the HiTechnic iRLink I2C 206 device. See the new HTPFComboDirect, HTPFSinglePin, HTPFSingleOutputCST, 207 HTPFSingleOutputPWM, HTPFComboPWM, HTPFTrain, HTPFRawOutput, and HTPFRepeat 208 NBC and NXC API functions. 209- Added support for the IR Train receiver via the HiTechnic iRLink I2C device. 210 See the new HTPFIRTrain NBC and NXC API functions. 211- Fixed bugs in unused variable removal and mutex removal. 212- Changed compiler to use -Z1 optimization as the default optimization level. 213- Added API functions to NBC and NXC for the Mindsensors pressure sensor, obstacle 214 sensor, acceleration/tilt sensor, distance sensor, play station sensor, and the 215 NRLink sensor with RCX, Power Function, and IR Train support. 216 217Version 1.0.1.b34 218----------------- 219- Fixes a typo bug in the math API functions introduced in b33. 220 221Version 1.0.1.b33 222----------------- 223- Fixes a bug in checking type compatibility when calling a function that 224 has an array of struct as an argument. 225- Fixes a bug in asm blocks containing a structure field reference that was 226 being improperly decorated by the compiler. 227- Fixes a bug in array assignment to a local array variable at the point of 228 declaration. 229- Adds stopthread, fmtnum, and priority opcodes to NBC & NXC using the enhanced 230 NBC/NXC firmware. 231- Fixed a typo bug in the SendRemoteString API macro. 232- Fixed a bug in NXC variable decoration and the NBC __I__ and __J__ substitution 233 parameters. Case insensitivity and underscores in the decoration scheme were 234 combining to break simple NXC int i; and int j; declarations. 235- Fixed a bug in deciding whether to emit a set or a mov operation in NXC. 236- Fixed a bug in the way NXC handled local variables going out of scope. 237- Fixed a bug where the left and right shift opcodes were not guarding against 238 invalid arguments which was resulting in an access violation. 239- Fixed a bug with semicolons following asm blocks when used in expressions. 240- Fixed a bug with SetSoundState in NBC & NXC caused by macro name clashes. 241- Fixed a bug with SetSoundFlags in NBC & NXC caused by a size type error. 242- Added API functions for HiTechnic devices. 243- Added API functions for mindsensors devices. 244- Added FlattenVar and UnFlattenVar API functions to NXC. 245- Added ResizeFile API function to NBC and NXC. 246- Fixed File Error! bug in left and right shift operations if the enhanced 247 firmware is enabled. 248- Fixed a shift bug where if the output variable was a smaller type it was 249 losing precision before the shift took place. 250- Added bcd2dec function to NBC and NXC. 251- Fixed an infinite loop compiler bug when the inline keyword occurs after 252 the void keyword. 253- Fixed a compiler error line number reporting bug. 254- Changed compiler to write errors to stderr rather than stdout 255- Increased compilation speed for large programs 256- Complete overhaul of IOMAP-based API functions to support variable-based 257 IOMAP offsets in NXC and NBC. 258 259Version 1.0.1.b32 260----------------- 261- Fixes a couple NXC system call structure definition bugs. 262- Adds compchktype compile-time opcode for checking variable types in preprocessor 263 macros. 264- Changes low-level NXC syscall inline functions to use preprocessor macros with 265 type checking instead (for improved code efficiency). 266- Fixes an access violation when trying to compile user-defined type references 267 which include invalid member names. 268- Allows array opcodes to take constant array arguments 269- Reworked low level IOMap read and write NXC API functions to allow non-constant 270 arguments for ports, etc... 271- Fixed a bug in RotateMotor functions which can cause it to hang if another task 272 changes the power level while the function is waiting for the target tacho limit 273 to be reached. 274- Fixed a bug in I2CBytes and SensorUS and the NBC equivalents which made the 275 functions not work for constant port values for ports 3 and 4. 276- Fixes a bug in variable and parameter name decoration which made task & function 277 names containing an underscore not work correctly in some situations. 278- Fixes a bug in argument passing to array, struct, and reference type parameters. 279 The compiler was failing to raise an error when expressions are used in these 280 cases. 281 282Version 1.0.1.b31 283----------------- 284- Fixes a boolean expression bug which occurred when you used a numeric variable 285 or constant on its own in a logical AND operation. (e.g., if (Nsamps && x < 3)). 286- Fixes problems with reference type arguments that are arrays or user-defined 287 types. 288- Fixes problems where the compiler hangs while processing function parameters. 289- Fixes several other struct and array parameter passing problems. 290- Fixes NXTDefs.h typo bug in ResetAllTachoCounts. 291- Fixes NXCDefs.h typo bug in I2CStatus. 292- Tightened up semicolon checking so that the parser complains when they are 293 required but they are missing. 294- Fixed global array initialize when a length expression is specified and an 295 initial value is also specified. The length, in that case, is now ignored 296 since the array is statically initialized. 297- Fixed a problem with initializing multi-dimensional global or local arrays 298 where the generated nested variable type declaration was causing an NBC 299 compiler error. 300- Improved parsing of open and close parenthesis so that the compiler will 301 complain if you have an extra close parenthesis. 302- Added code in the NXC compiler to initialize a hidden graphic variables 303 array and use it when calling the GraphicOut API function so that 304 parameterized RIC files can be drawn using either GraphicOut or GraphicOutEx. 305- Added support in NBC for RICScript programs which can be used to create 306 RIC files via a simple text programming language. A source file with a .rs 307 extension will use the RICScript compiler built into NBC and the output will 308 be a .ric file if there are no compiler errors. 309- Adds the "safecall" keyword to NXC. A function or subroutine declared with 310 this keyword will automatically be wrapped in Acquire/Release with a global 311 mutex specific to that function so that multiple threads can safely call the 312 function without hanging. 313- Adds the -safecall command line switch for NXC. If a program is compiled with 314 this switch on the command line then all function calls will use the safecall 315 calling convention, i.e., they will be wrapped in Acquire/Release so that 316 multiple tasks/threads can share the subroutine safely. 317- Fixes inline functions so that they are now thread-safe. 318- Added code to the parser to complain about recursive function calls 319 since they are not supported by the NXT firmware. 320- Added code to the parser to complain about calling an inline function from 321 another inline function call. 322- Fixed a for-loop local variable nesting level bug that made for-loop variables 323 not work correctly if defined within the for-loop parenthesis. 324- Added NXC/NBC API function I2CCheckStatus and LowspeedCheckStatus which only 325 return the status (and not bytes ready). Added I2CBytesReady and 326 LowspeedBytesReady which only return the number of bytes ready but not the 327 status. (NBC does not include the I2C alias versions). 328- Added constants and structure declarations for enhanced firmware features 329 in lms_arm_jch.zip. If using the enhanced standard NXT firmware make sure 330 to pass -EF on the NBC/NXC command line. 331- Fixes a bug in struct declarations which was causing the compiler to not 332 support types with the "unsigned" type qualifier keyword prior to the type 333 name. 334- Added several low-level syscall inline functions to NXC. 335- Fixed type checking of function parameters that are user-defined types. 336 This had just been checking that the variable passed in was a UDT but it 337 now makes sure the two types of UDT are the same. 338 339Version 1.0.1.b30 340----------------- 341- Fixes a bug in the RotateMotorExPID macro in NXTDefs.h that was introduced 342 in b29. 343- Fixes error message line number problems in NBC that were introduced in b29. 344- Added NXC compiler error message when trying to use nested calls to the same 345 function (e.g., Max(3, Max(5, 6)). 346- Fixes an expression optimizer bug which was intrepeting variables that looked 347 like valid hexadecimal numbers as a constant value (e.g., xa0, x1, x03, xff). 348- Fixes a bug in the NXC compiler's support for function prototypes that was 349 introduced in b29. 350- Adds support in NXC for the "return" statement to have optional parenthesis 351 around the return expression when the return type is string. Scalar types already 352 support surrounding parenthesis as part of the expression parsing. 353- Fixes a bug in the NBC compiler support for compif/compelse/compend where 354 code that should have been ignored by the compiler was not being ignored. 355- Fixes a bug in ## handling within non-parameterized preprocessor macros. 356- *** NXC & NBC BREAKING CHANGE *** Changed the RotateMotorEx API functions 357 (in b29, actually) to take an additional boolean parameter. 358 RotateMotorExPID(ports, pwr, angle, turnpct, bsync, bStop, p, i, d) 359 RotateMotorEx(ports, pwr, angle, turnpct, bSync, bStop) 360 The new "bStop" parameter indicates whether you want the motors to come to a 361 hard stop at the end of the specified angle of rotation. 362- Fixes NXC bug with empty strings causing a compiler error. Now empty strings 363 work as expected. 364 365 366Version 1.0.1.b29 367----------------- 368- Fixes a bug with not setting the left hand side datatype correctly after 369 a user defined type is used. 370 371- Fixes reading a struct out of an array of struct. 372 373- Fixes a bug in NXC switch statements that have no default case where the 374 first case was being improperly executed. 375 376- Fixes a bug with initialized globals which was causing them to be treated as constants 377 in math expressions. 378 379- Overhauled the I2C routines and the Motor routines. The old OUT_AB, OUT_AC, 380 OUT_BC, and OUT_ABC array variables are now constants. The motor API functions 381 are now thread-safe and blocking on the motor resource(s) requested. If you call 382 RotateMotor(OUT_AB, 75, 3600) then no other thread will be able to control motors 383 A and B until the already executing RotateMotor function finishes. But now you 384 can safely call RotateMotor(OUT_A, 75, 3600) on one thread and RotateMotor(OUT_B, 385 75, 720) on another simultaneously executing thread without having program errors 386 or erratic motor behavior. The same sort of revisions occurred for the Lowspeed 387 (aka I2C) routines so that it is now safe to call I2C functions for a port on one 388 thread while calling I2C functions for a different port on another thread. Since 389 the functions do not know at compile time which port is being utilized when you 390 use a variable as the port parameter, the RotateMotor functions acquire all three 391 motor port resources for the duration of their operation in that case. So you can 392 safely call RotateMotor using a variable for the port parameter on two 393 simultaneously executing threads but one of the two calls will be blocked until 394 the first one has completed executing. 395 396- Added GraphicOutEx for NXC which takes an array of values which can change the 397 drawing behavior at runtime. 398 399- Changed NumOut and TextOut in NXC so they accept an optional 4th argument (cls) 400 which controls whether the screen is cleared or not. This makes these functions 401 consistant with the other drawing routines. 402 403- Changed NumOutEx and TextOutEx in NBC so that the cls argument is the fourth 404 argument rather than the third argument (NumOutEx(x, y, value, cls) rather than 405 NumOutEx(x, y, cls, value)). This change makes these two functions consistant 406 with the other Ex drawing routines in NBC. 407 408- Changed ArrayBuild in NXC so that instead of having ArrayBuild1..ArrayBuild4 409 defined in the NXCDefs.h header file the function is now built into the compiler 410 and it can take any number of source arguments. 411 E.G., ArrayBuild(aout, src1, ..., srcN); 412 413- Fixed a problem in the NXC preprocessor where it was incorrectly handling char 414 constants (e.g., ArrayInit(aout, 'a', 10);). 415 416- Fixed a problem in I2CBytes/ReadI2CBytes where it was returning true even when 417 an error occurred during the write/read operation. Now these functions return 418 false if any sort of error condition occurred during the I2C operation. 419 420- Added new NXC functions which are aliases for the LowspeedStatus, LowspeedRead, and 421 LowspeedWrite functions. The new NXC functions are named I2CStatus, I2CRead, and 422 I2CWrite. 423 424- Changed the behavior of the ## operator in the preprocessor. In previous versions 425 a token such as OUT_A would be left as a literal if it was concatenated with the 426 preceding value but in this version OUT_A will be evaluated as 0 before it is 427 concatenated with the preceding value. E.G., myVar##port, in previous releases 428 would have ended up as myVarOUT_A, but as of b29 it will end up as myVar0. 429 430- Changed the preprocessor to evaluate tokens until no changes occur during 431 evaluation. As of b29 if the first preprocessor evaluation produces __rotateMotor0 432 as a token then it will evaluate the result again which may expand that token 433 into a multi-line macro function expansion. This will continue until the pre- 434 evaluation value matches the post-evaluation value. This change was required to 435 implement the motor and I2C API changes mentioned above. 436 437- Changed the compiler to automatically include NXTDefs.h or NXCDefs.h (and 438 NBCCommon.h) automatically just as NQC would automatically include its API header 439 file. This can be disabled via the new -n command line switch. The header 440 files are actually compiled into the compiler executable. The contents of the 441 built-in header files can be extracted via the new -api command line switch. As 442 a result of this change it is no longer necessary to start an NBC or NXC program 443 with #include "NXTDefs.h" or #include "NXCDefs.h". 444 445- Renamed the Tamas Sorosy math functions added in b28 so that they do not conflict 446 with the compile-time expression evaluator functions of the same names. The 447 new function names are Sqrt, Sin, Cos, Asin, and Acos. 448 449- Added a -q command line switch which tells the compiler to not make the NXT beep 450 at the end of a program download operation. 451 452- Changed the compiler so that, by default, it tells the NXT to beep after 453 downloading a program. 454 455- Changed the compiler so that it stops any running program before starting to 456 download a program. 457 458- Added compif, compelse, and compend operations to the NBC compiler so that it 459 can determine at compile-time whether to ignore or include certain blocks 460 of code. This compiler processing occurs after the preprocessor is finished. 461 462- Fixed the NXC function parameter parser so that if an error occurs while 463 parsing the parameter declarations it will abort and skip to the closing 464 parenthesis. This had been a place where the parser could get into an 465 infinite loop prior to this change. 466 467 468Version 1.0.1.b28 469----------------- 470- Adds support for structs and typedefs. See struct.nxc for examples. 471- Adds Tamas Sorosy math functions (sqrt, sin, cos, asin, acos) to NBC 472 and NXC API. 473- Adds a 15 ms wait in ReadSensorUS (NBC) and SensorUS (NXC) to fix a problem 474 where when called in a tight loop a manual wait was needed to get correct 475 readings. 476- Adds preprocessor support for #if, #elif, and #error. 477- Adds support for alternate NXT firmwares which implement the wait and waitv 478 opcodes. Use the -EF switch to enable this feature. 479- Adds support for short-circuit boolean expression evaluation (for && and || 480 operators) 481- Adds a workaround in NXC for a firmware bug in the "set" opcode which is 482 triggered by setting a signed long to a negative number. 483- Fixes a preprocessor bug with nested #ifdefs. 484- Fixes a preprocessor bug with nested function macros with empty parameter 485 lists. 486- Fixes an optimizer bug which was generating bad code for the sign opcode. 487- The NXC compiler now accepts (void) in addition to () for task declarations. 488- The NXC compiler now outputs an error if the routine named "main" is declared 489 using a keyword other than "task". 490 491 492Version 1.0.1.b27 493----------------- 494- Adds pre-increment and pre-decrement (++i, --i) support. 495- Adds support for expressions as statements 496 task main() { int i=23; 0x3f; +3-i; } 497- Adds support for pre- and post-increment/decrement within expressions 498 (such as in array indexes). Increment/decrement used to only be 499 allowed in a statement. 500- Fixes some string array indexing bugs 501- Adds support for string expressions within TextOut API function 502- *** NXC BREAKING CHANGE *** Removed the "cls" argument from the NumOut and 503 TextOut functions. To update your code to work with beta 27 you will need 504 to add calls to ClearScreen() wherever you previously passed "true" to this 505 argument and remove the additional argument from each call to one of 506 these API functions. The PointOut, CircleOut, LineOut, RectOut, and GraphicOut 507 API functions all now take cls as an optional argument with a default value of 508 false. Since this argument is optional it can still be used but if you 509 are currently passing "false" to these functions you can now remove the extra 510 argument. 511- *** NBC BREAKING CHANGE *** Removed the "cls" argument from the NumOut, TextOut, 512 PointOut, CircleOut, LineOut, RectOut, and GraphicOut functions. Added NumOutEx, 513 TextOutEx, PointOutEx, CircleOutEx, LineOutEx, RectOutEx, and GraphicOutEx API 514 functions which all include the "cls" argument exactly as the non-Ex versions 515 did prior to beta 27. To update your code to work with beta 27 you will need 516 to either add calls to ClearScreen() wherever you previously passed "true" to this 517 argument and remove the additional argument from each call to one of the non-Ex 518 API functions OR you can replace your calls to the non-Ex version with calls to 519 the Ex version of the API function. 520- Adds -w- and -w+ command line switches which let you control whether 521 the compiler outputs warning messages or not. The default is - which 522 means that warnings are not output. If you want to turn on warnings then 523 add the new -w+ switch to the command line. 524- Fixes a mutex optimization bug which was incorrectly removing acquire/release 525 statements and mutex variables. 526 527 528Version 1.0.1.b26 529----------------- 530- Fixes an array indexing bug introduced in b25 531- Fixes a local variable declaration bug introduced in b25 532- Fixes a bug in the NXC and NBC Read API functions 533- Fixes a bug in the NXC and NBC WriteLnString API function 534- Adds support for asm block statements anywhere within an NXC file (not 535 just within a task or subroutine) 536- Adds a ReadLnString API function to NBC and NXC 537- Fixes a preprocessor bug where comments following a #include statement were 538 breaking the include 539 540 541Version 1.0.1.b25 542----------------- 543- Fixes string whitespace bug introduced in b22 544- Fixes division bug where 1st operand is negative and 2nd operand is unsigned 545- Fixes bugs in the NBC and NXC file I/O macros 546- Adds support in NXC for string indexing 547 string msg = "test"; 548 msg[0] = 'C'; 549 byte x = msg[2]; 550- Adds support in NXC for inline functions 551 inline int Double(const int x) { return x*2; } 552- Adds support in NXC for const and reference function argument types 553 inline bool IsFooBar(int x, int &handle) { handle = 10; x = x+1; return x > 2; } 554- Adds support in NXC for const variable declarations 555 const int myVar = 12; // myVar cannot be changed. 556- Adds support in NXC for arrays of strings 557 string myStrings[]; 558 ArrayInit(myStrings, "", 4); // set array of strings to a size of 4 (0..3) 559 myStrings[0] = "please work"; 560 myStrings[1] = "testing"; 561- Improves NXC parameter type checking in function calls 562- Adds NBC API macros to simplify NXT<->NXT bluetooth communication 563 ReceiveRemoteBool(queue, clear, bval, result) 564 ReceiveRemoteNumber(queue, clear, val, result) 565 ReceiveRemoteString(queue, clear, str, result) 566 ReceiveRemoteMessageEx(queue, clear, str, val, bval, result) 567 SendRemoteBool(conn, queue, bval, result) 568 SendRemoteNumber(conn, queue, val, result) 569 SendRemoteString(conn, queue, str, result) 570 SendResponseBool(queue, bval, result) 571 SendResponseNumber(queue, val, result) 572 SendResponseString(queue, msg, result) 573- Adds NBC API macros for sending direct commands to another NXT 574 RemoteMessageRead(conn, queue, result) 575 RemoteMessageWrite(conn, queue, msg, result) // alias for SendRemoteString 576 RemoteStartProgram(conn, filename, result) 577 RemoteStopProgram(conn, result) 578 RemotePlaySoundFile(conn, filename, bloop, result) 579 RemotePlayTone(conn, frequency, duration, result) 580 RemoteStopSound(conn, result) 581 RemoteKeepAlive(conn, result) 582 RemoteResetScaledValue(conn, port, result) 583 RemoteResetMotorPosition(conn, port, brelative, result) 584 RemoteSetInputMode(conn, port, type, mode, result) 585 RemoteSetOutputState(conn, port, speed, mode, regmode, turnpct, runstate, tacholimit, result) 586- Adds NXC API macros to simplify NXT<->NXT bluetooth communication 587 result = ReceiveRemoteBool(queue, clear, bval) 588 result = ReceiveRemoteNumber(queue, clear, val) 589 result = ReceiveRemoteString(queue, clear, str) 590 result = ReceiveRemoteMessageEx(queue, clear, str, val, bval) 591 result = SendRemoteBool(conn, queue, bval) 592 result = SendRemoteNumber(conn, queue, val) 593 result = SendRemoteString(conn, queue, str) 594 result = SendResponseBool(queue, bval) 595 result = SendResponseNumber(queue, val) 596 result = SendResponseString(queue, msg) 597- Adds NXC API macros for sending direct commands to another NXT 598 result = RemoteMessageRead(conn, queue) 599 result = RemoteMessageWrite(conn, queue, msg) // alias for SendRemoteString 600 result = RemoteStartProgram(conn, filename) 601 result = RemoteStopProgram(conn) 602 result = RemotePlaySoundFile(conn, filename, bloop) 603 result = RemotePlayTone(conn, frequency, duration) 604 result = RemoteStopSound(conn) 605 result = RemoteKeepAlive(conn) 606 result = RemoteResetScaledValue(conn, port) 607 result = RemoteResetMotorPosition(conn, port, brelative) 608 result = RemoteSetInputMode(conn, port, type, mode) 609 result = RemoteSetOutputState(conn, port, speed, mode, regmode, turnpct, runstate, tacholimit) 610 611 612Version 1.0.1.b24 613----------------- 614- Fixes a preprocessor bug in NBC and NXC that is triggered by not having a ')' 615 at the end of a macro invocation (or anywhere following in the entire program). 616- Replaced the ResetMotor macros in NBC and NXC with the following macros: 617 ResetTachoCount(p) 618 ResetBlockTachoCount(p) 619 ResetRotationCount(p) 620 ResetAllTachoCounts(p) 621- Added NBC API file i/o macros 622 Read(handle, n, result) 623 ReadLn(handle, n, result) 624 ReadBytes(handle, len, buf, result) 625 Write(handle, n, result) 626 WriteLn(handle, n, result) 627 WriteString(handle, str, cnt, result) 628 WriteLnString(handle, str, cnt, result) 629 WriteBytes(handle, buf, cnt, result) 630 WriteBytesEx(handle, len, buf, result) 631- Added NXC API file i/o macros 632 result = Read(handle, n) 633 result = ReadLn(handle, n) 634 result = ReadBytes(handle, len, buf) 635 result = Write(handle, n) 636 result = WriteLn(handle, n) 637 result = WriteString(handle, str, cnt) 638 result = WriteLnString(handle, str, cnt) 639 result = WriteBytes(handle, buf, cnt) 640 result = WriteBytesEx(handle, len, buf) 641- Replaced the code underlying the ReadSensorUS (NBC) and SensorUS (NXC) API 642 functions with a version which appears to be more reliable (and generic). 643- Added NBC and NXC API functions to give control over reseting rotation counters 644 CoastEx(ports, reset) 645 OffEx(ports, reset) 646 OnFwdEx(ports, pwr, reset) 647 OnRevEx(ports, pwr, reset) 648 OnFwdRegEx(ports, pwr, regmode, reset) 649 OnRevRegEx(ports, pwr, regmode, reset) 650 OnFwdSyncEx(ports, pwr, turnpct, reset) 651 OnRevSyncEx(ports, pwr, turnpct, reset) 652- Added NBC and NXC constants for the "Ex" motor functions 653 RESET_NONE 654 RESET_COUNT 655 RESET_BLOCK_COUNT 656 RESET_ROTATION_COUNT 657 RESET_BLOCKANDTACHO 658 RESET_ALL 659- Added NBC and NXC API functions which expose the PID parameters 660 RotateMotorPID(ports, pwr, angle, p, i, d) 661 RotateMotorExPID(ports, pwr, angle, turnpct, bsync, p, i, d) 662- Added NBC and NXC API function for clearing the screen 663 ClearScreen() 664- Added support in the NXC SetOutput function for multiple sets of field/value pairs 665 SetOutput(ports, const field1, value1, ..., const fieldN, valueN) 666- Added generic I2C read/write routine for NBC 667 ReadI2CBytes(port, inbuf, count, outbuf, result) 668- Added generic I2C read/write routine for NXC 669 result = I2CBytes(port, inbuf, count, outbuf) 670- Added NBC pseudo opcode to spawn a thread anywhere within the current thread 671 start TaskName 672- Added NXC start statement (ala NQC) 673 start TaskName; 674 675 676Version 1.0.1.b23 677----------------- 678- Adds support in NXC for nested switch statements 679- Adds support in NXC for array indexed math assignments (e.g., x[0] += 23;) 680- Adds support in NXC for using true and false in asm blocks 681- Adds support in NXC for local variable declarations anywhere within a function. 682 Local variable declarations used to be limited to the beginning of a function 683 block. Locals now honor nesting levels and go out of scope if they are declared 684 within a block statement. "for" loops can now declare a local or use an existing 685 variable: 686 687 for (i = 10; i > 0; i--) {} // i must already be in scope 688 for (int i = 0; i < 10; i++) {} // i has scope limited to for loop 689 690- Adds support in NXC for empty for loop (e.g., for ( ; ; ) ) for infinite loops 691- Adds support in NXC for scalar and string local (not global) variable 692 initialization via expressions of any form (not just constants): 693 694 int i = Random(10); 695 string msg = NumToStr(i); 696 697- Adds support in NXC for single-dimension global variable array initialization 698 using a syntax like array initialization in NBC: 699 700 // initialize X to 20 elements all equal to 1. 701 int X[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; 702 703 704- Adds support in NXC for expression optimizations (enabled with -Z1) 705- Fixes indexing of local arrays (used to only work with globals) 706- Fixes a bug in the NBC sign, shl, and shr opcodes which was triggered 707 by passing the same variable as the first and last arguments: 708 709 sign x, x 710 shl x, y, x 711 shr x, y, x 712 713 714 715Version 1.0.1.b22 716----------------- 717- Adds support in NXC switch statements for strings, constant expressions, 718 character constants, and the true and false keywords 719- Adds support in NBC for strings delimited by double quote characters 720- Fixes several motor macros in NBC/NXC so that they reset the block count 721 before executing when it is appropriate for them to do so 722- Fixes NXC ForceOff macro in NXCDefs.h 723- Fixes the RotateMotor/RotateMotorEx macros so that programs no longer 724 hang when the angle is set to zero 725- Fixes a problem in expressions which were not properly setting the zero 726 flag register variable if in a sub-expression it had already been set 727 728- NOTE: the SENSOR_n macros mentioned below are not exactly the same 729 as in NQC. They cannot be used to specify the sensor port. Instead you 730 should use S1..S4 or IN_1..IN_4. 731 732 733 734Version 1.0.1.b21 735----------------- 736- Adds NXC API macro ResetMotor(ports) 737- Adds support in NXC for the ?: expression 738- Adds support in NXC for the switch statement 739- Adds the following NQC compatibility macros in NXCDefs.h: 740 S1 741 S2 742 S3 743 S4 744 SENSOR_1 745 SENSOR_2 746 SENSOR_3 747 SENSOR_4 748 SENSOR_TYPE_NONE 749 SENSOR_TYPE_TOUCH 750 SENSOR_TYPE_TEMPERATURE 751 SENSOR_TYPE_LIGHT 752 SENSOR_TYPE_ROTATION 753 SENSOR_TYPE_LIGHT_ACTIVE 754 SENSOR_TYPE_LIGHT_INACTIVE 755 SENSOR_TYPE_SOUND_DB 756 SENSOR_TYPE_SOUND_DBA 757 SENSOR_TYPE_CUSTOM 758 SENSOR_TYPE_LOWSPEED 759 SENSOR_TYPE_LOWSPEED_9V 760 SENSOR_TYPE_HIGHSPEED 761 SENSOR_MODE_RAW 762 SENSOR_MODE_BOOL 763 SENSOR_MODE_EDGE 764 SENSOR_MODE_PULSE 765 SENSOR_MODE_PERCENT 766 SENSOR_MODE_CELSIUS 767 SENSOR_MODE_FAHRENHEIT 768 SENSOR_MODE_ROTATION 769 SENSOR_TOUCH 770 SENSOR_LIGHT 771 SENSOR_ROTATION 772 SENSOR_CELSIUS 773 SENSOR_FAHRENHEIT 774 SENSOR_PULSE 775 SENSOR_EDGE 776 SetSensor(sensor, tm) 777- Fixes an NXC shift right and shift left bug introduced in b20. 778- Fixes an NXC macro subsitution bug in the "until" macro. 779- Modifies GetOutput and GetInput API functions so that the port parameter no 780 longer accepts an expression (must be a variable or constant value) 781 782Version 1.0.1.b20 783----------------- 784- Adds support in NXC for string comparisons (==, !=, <=, >=, <, >) 785- Adds support in NXC for function return types (int, bool, char, byte, short, long, 786 unsigned versions of same, and string) 787- Adds support in NXC for "void" functions (synonymous with "sub"). 788- Adds support in NXC for comma-separated assignments in for loops. 789- Fixes an NXC bug in | and ^ expressions which was putting the parser into an 790 infinite loop. 791- Fixes an NXC bug in the subroutine calling mechanism which is triggered by leaving 792 off the () characters when calling the subroutine. It was causing an infinite 793 parser loop. 794- Fixes an NXC bug in relational expressions which were not setting the main register 795 to a boolean value. 796 797 798Version 1.0.1.b19 799----------------- 800- Fixes a command-line bug which could cause NXC source code to be overwritten with 801 the generated NBC code. This bug is triggered in b18 and b17 if you use BricxCC 802 to download an NXC program and you exit BricxCC without saving the contents of the 803 editor window to its underlying source file (which has had its contents replaced 804 with NBC assembler code). 805 806 807Version 1.0.1.b18 808----------------- 809- Fixes a bug in the GraphicOut macro in NXTDefs.h (for NBC and NXC) 810- Fixes a bug in the ArrayInit macro in NXCDefs.h - swapped parameter order as well 811 ArrayInit(a, val, cnt) 812- Removes a few compiler hints for a cleaner compile 813- Adds support for multi-line macro invocation (with support for embedded comments 814 and arbitrary whitespace) 815- Moves ## handling into preprocessor so that macro expansion more closely matches C 816- Fixes NXC preprocessor bug related to ## handling (it was causing an infinite loop) 817- Adds support for variable initialization via constant expression. 818- Improves error message line number handling (it's still not perfect but it is much 819 better) 820- Adds mutex optimization (automatically removes acquire/release and mutex declarations 821 if the application is single-threaded) 822 823 824Version 1.0.1.b17 825----------------- 826- Fixes a problem in the SetSoundState macro in NXTDefs.h and NXCDefs.h. 827- Fixes a few local variable and parameter decoration problems. 828- Fixes a missing file in the source distribution. 829 830 831Version 1.0.1.b16 832----------------- 833- Refactors the NXC API to use macros for many of the API functions (See NXCDefs.h) 834 Macros in NXC may use an "asm" block with tokens for temporary variables of different 835 types and return values of different types. 836- Fixes another bug in NBC with nested preprocessor macro function calls. 837 (e.g., until(ButtonPressed(BTN1, true)) ; ) 838 The fix in b15 did not completely fix the problem (it only handled single argument 839 nested macros - or, more precisely, nested macros without any whitespace in their 840 argument list). 841- Fixes a problem with BatteryLevel and FreeMemory in the NXC API where I had renamed 842 the underlying NBC macros and failed to change the code generator in NXC. 843- Adds the missing '%' (modulo) operator for expressions in NXC. 844- Renames NXC API functions ReadSensor(p) and ReadSensorUS(p) as Sensor(p) and 845 SensorUS(p) respectively 846- Renames NXC API functions GetTick() as CurrentTick() and GetFirstTick() as FirstTick(). 847- Renames NXC API function SetSensorUltrasonic(p) as SetSensorLowspeed(p). 848- Adds initial support for NXC array types. Adding [] pairs after the variable name in 849 a variable declaration defines the variable as an array of the specified type. 850 e.g., byte x[]; // x is an array of byte 851 Array initialization is not yet supported. 852- Added NXC support for array/string subscripting (e.g., buf[0] = 23; msg[4] = "fred"; 853- Added NXC support for local variables and subroutine parameters (no return values yet) 854 Local variables must be defined prior to any other statements in a task or subroutine. 855- Added many NXC API macros to NXCDefs.h: 856 ByteArrayToStr(a, s) 857 StrToByteArray(s, a) 858 ArrayLen(a) 859 ArrayInit(a, cnt, val) 860 GetLSInputBuffer(p, offset, cnt, data) 861 GetLSOutputBuffer(p, offset, cnt, data) 862 GetDisplayNormal(x, line, cnt, data) 863 GetDisplayPopup(x, line, cnt, data) 864 GetBTInputBuffer(offset, cnt, data) 865 GetBTOutputBuffer(offset, cnt, data) 866 GetHSInputBuffer(offset, cnt, data) 867 GetHSOutputBuffer(offset, cnt, data) 868 GetUSBInputBuffer(offset, cnt, data) 869 GetUSBOutputBuffer(offset, cnt, data) 870 GetUSBPollBuffer(offset, cnt, data) 871 BTDeviceName(p) 872 BTConnectionName(p) 873 BTConnectionPinCode(p) 874 BrickDataName() 875 GetBTDeviceAddress(p, data) 876 GetBTConnectionAddress(p, data) 877 GetBrickDataAddress(data) 878 SoundFrequency() 879 SoundDuration() 880 SoundSampleRate() 881 SoundMode() 882 SoundVolume() 883 ButtonPressCount(b) 884 ButtonLongPressCount(b) 885 ButtonShortReleaseCount(b) 886 ButtonLongReleaseCount(b) 887 ButtonReleaseCount(b) 888 ButtonState(b) 889 CommandFlags() 890 UIState() 891 UIButton() 892 VMRunState() 893 BatteryState() 894 BluetoothState() 895 UsbState() 896 SleepTimeout() 897 SleepTimer() 898 RechargeableBattery() 899 Volume() 900 OnBrickProgramPointer() 901 CustomSensorZeroOffset(p) 902 CustomSensorPercentFullScale(p) 903 CustomSensorActiveStatus(p) 904 SensorBoolean(p) 905 SensorDigiPinsDirection(p) 906 SensorDigiPinsStatus(p) 907 SensorDigiPinsOutputLevel(p) 908 MotorPwnFreq() 909 LSInputBufferInPtr(p) 910 LSInputBufferOutPtr(p) 911 LSInputBufferBytesToRx(p) 912 LSOutputBufferInPtr(p) 913 LSOutputBufferOutPtr(p) 914 LSOutputBufferBytesToRx(p) 915 LSMode(p) 916 LSChannelState(p) 917 LSErrorType(p) 918 LSState() 919 LSSpeed() 920 DisplayEraseMask() 921 DisplayUpdateMask() 922 DisplayDisplay() 923 DisplayFlags() 924 DisplayTextLinesCenterFlags() 925 BTDeviceClass(p) 926 BTDeviceStatus(p) 927 BTConnectionClass(p) 928 BTConnectionHandleNum(p) 929 BTConnectionStreamStatus(p) 930 BTConnectionLinkQuality(p) 931 BrickDataBluecoreVersion() 932 BrickDataBtStateStatus() 933 BrickDataBtHardwareStatus() 934 BrickDataTimeoutValue() 935 BTInputBufferInPtr() 936 BTInputBufferOutPtr() 937 BTOutputBufferInPtr() 938 BTOutputBufferOutPtr() 939 HSInputBufferInPtr() 940 HSInputBufferOutPtr() 941 HSOutputBufferInPtr() 942 HSOutputBufferOutPtr() 943 USBInputBufferInPtr() 944 USBInputBufferOutPtr() 945 USBOutputBufferInPtr() 946 USBOutputBufferOutPtr() 947 USBPollBufferInPtr() 948 USBPollBufferOutPtr() 949 BTDeviceCount() 950 BTDeviceNameCount() 951 HSFlags() 952 HSSpeed() 953 HSState() 954 USBState() 955 SetSoundFrequency(n) 956 SetSoundDuration(n) 957 SetSoundSampleRate(n) 958 SetSoundFlags(n) 959 SetSoundState(n) 960 SetSoundMode(n) 961 SetSoundVolume(n) 962 SetButtonPressCount(b, n) 963 SetButtonLongPressCount(b, n) 964 SetButtonShortReleaseCount(b, n) 965 SetButtonLongReleaseCount(b, n) 966 SetButtonReleaseCount(b, n) 967 SetButtonState(b, n) 968 SetCommandFlags(n) 969 SetUIState(n) 970 SetUIButton(n) 971 SetVMRunState(n) 972 SetBatteryState(n) 973 SetBluetoothState(n) 974 SetUsbState(n) 975 SetSleepTimeout(n) 976 SetSleepTimer(n) 977 SetVolume(n) 978 SetOnBrickProgramPointer(n) 979 ForceOff(n) 980 SetInCustomZeroOffset(p, n) 981 SetInSensorBoolean(p, n) 982 SetInDigiPinsDirection(p, n) 983 SetInDigiPinsStatus(p, n) 984 SetInDigiPinsOutputLevel(p, n) 985 SetInCustomPercentFullScale(p, n) 986 SetInCustomActiveStatus(p, n) 987 SetOutPwnFreq(n) 988 SetLSInputBuffer(p, offset, cnt, data) 989 SetLSInputBufferInPtr(p, n) 990 SetLSInputBufferOutPtr(p, n) 991 SetLSInputBufferBytesToRx(p, n) 992 SetLSOutputBuffer(p, offset, cnt, data) 993 SetLSOutputBufferInPtr(p, n) 994 SetLSOutputBufferOutPtr(p, n) 995 SetLSOutputBufferBytesToRx(p, n) 996 SetLSMode(p, n) 997 SetLSChannelState(p, n) 998 SetLSErrorType(p, n) 999 SetLSState(n) 1000 SetLSSpeed(n) 1001 SetDisplayEraseMask(n) 1002 SetDisplayUpdateMask(n) 1003 SetDisplayDisplay(n) 1004 SetDisplayFlags(n) 1005 SetDisplayTextLinesCenterFlags(n) 1006 SetDisplayNormal(x, line, cnt, data) 1007 SetDisplayPopup(x, line, cnt, data) 1008 SetBTDeviceName(p, str) 1009 SetBTDeviceAddress(p, addr) 1010 SetBTConnectionName(p, str) 1011 SetBTConnectionPinCode(p, code) 1012 SetBTConnectionAddress(p, addr) 1013 SetBrickDataName(str) 1014 SetBrickDataAddress(p, addr) 1015 SetBTDeviceClass(p, n) 1016 SetBTDeviceStatus(p, n) 1017 SetBTConnectionClass(p, n) 1018 SetBTConnectionHandleNum(p, n) 1019 SetBTConnectionStreamStatus(p, n) 1020 SetBTConnectionLinkQuality(p, n) 1021 SetBrickDataBluecoreVersion(n) 1022 SetBrickDataBtStateStatus(n) 1023 SetBrickDataBtHardwareStatus(n) 1024 SetBrickDataTimeoutValue(n) 1025 SetBTInputBuffer(offset, cnt, data) 1026 SetBTInputBufferInPtr(n) 1027 SetBTInputBufferOutPtr(n) 1028 SetBTOutputBuffer(offset, cnt, data) 1029 SetBTOutputBufferInPtr(n) 1030 SetBTOutputBufferOutPtr(n) 1031 SetHSInputBuffer(offset, cnt, data) 1032 SetHSInputBufferInPtr(n) 1033 SetHSInputBufferOutPtr(n) 1034 SetHSOutputBuffer(offset, cnt, data) 1035 SetHSOutputBufferInPtr(n) 1036 SetHSOutputBufferOutPtr(n) 1037 SetUSBInputBuffer(offset, cnt, data) 1038 SetUSBInputBufferInPtr(n) 1039 SetUSBInputBufferOutPtr(n) 1040 SetUSBOutputBuffer(offset, cnt, data) 1041 SetUSBOutputBufferInPtr(n) 1042 SetUSBOutputBufferOutPtr(n) 1043 SetUSBPollBuffer(offset, cnt, data) 1044 SetUSBPollBufferInPtr(n) 1045 SetUSBPollBufferOutPtr(n) 1046 SetBTDeviceCount(n) 1047 SetBTDeviceNameCount(n) 1048 SetHSFlags(n) 1049 SetHSSpeed(n) 1050 SetHSState(n) 1051 SetUSBState(n) 1052 CreateFile(fname, fsize, handle) 1053 OpenFileAppend(fname, fsize, handle) 1054 OpenFileRead(fname, fsize, handle) 1055 CloseFile(handle) 1056 ResolveHandle(fname, handle, writeable) 1057 RenameFile(oldname, newname) 1058 DeleteFile(fname) 1059 SendMessage(queue, msg) 1060 ReceiveMessage(queue, clear, msg) 1061 LowspeedStatus(port, bready) 1062 LowspeedWrite(port, retlen, buffer) 1063 LowspeedRead(port, buflen, buffer) 1064 BluetoothStatus(conn, result) 1065 BluetoothWrite(conn, buffer) 1066 1067 1068 1069Version 1.0.1.b15 1070----------------- 1071- Adds to NXC new API functions: 1072 ExitTo(task): Exit the current task immediately and start the specified task 1073 Stop(bStop): Stop the program if the boolean expression evaluates to true 1074 SetInput(port, field, value): Set an input field to the specified value 1075 SetOutput(ports, field, value): Set an output field to the specified value 1076 PowerDown(): Power down the brick immediately 1077 RebootInFirmwareMode(): Reboot the brick in firmware mode immediately 1078 BatteryLevel(): Read the current battery level (in millivolts) 1079 FreeMemory(): Read the free flash memory (in bytes) 1080 NumToStr(val): Convert the specified numeric value to a string 1081 StrCat(str1, str2, ..., strN): Concatenate the args into a single string 1082 SubStr(str, idx, len): Extract the specified portion of a string 1083 Flatten(val): Convert value into a string based on the size of scalar datatype 1084 StrReplace(str, idx, strnew): Replace characters in 'str' with those in 'strnew' 1085 StrToNum(str): Convert string into a number 1086 StrLen(str): Return the length of the string argument 1087 StrIndex(str, idx): Return the ASCII value of str[idx] 1088- Adds to NXC the "until" loop construct and the goto label construct 1089- Fixes a NXC parser bug in if (condition) { } else { } construct 1090- Adds support for && and || operators in boolean expressions 1091- Adds support for <<, >>, <<=, and >>= operators in numeric expressions 1092- Adds to NXC new API macros: 1093 SensorType(p) 1094 SensorMode(p) 1095 SensorRaw(p) 1096 SensorNormalized(p) 1097 SensorScaled(p) 1098 SensorInvalid(p) 1099 MotorMode(p) 1100 MotorPower(p) 1101 MotorActualSpeed(p) 1102 MotorTachoCount(p) // this replaced TachometerCount(p) 1103 MotorTachoLimit(p) // this replaced TachometerLimit(p) 1104 MotorRunState(p) 1105 MotorTurnRatio(p) 1106 MotorRegulation(p) 1107 MotorOverload(p) 1108 MotorRegPValue(p) 1109 MotorRegIValue(p) 1110 MotorRegDValue(p) 1111 MotorBlockTachoCount(p) 1112 MotorRotationCount(p) 1113- Adds to NBC many new API macros: 1114 PointOut(x, y, clear?) 1115 LineOut(x1, y1, x2, y2, clear?) 1116 RectOut(x, y, width, height, clear?) 1117 CircleOut(x, y, radius, clear?) 1118 GraphicOut(x, y, filename, varArray, clear?) 1119 PlayToneEx(frequency, duration, volume, loop?) 1120 PlayFileEx(filename, volume, loop?) 1121 GetSoundState(state, flags) 1122 SetSoundState(state, flags, result) 1123 SignedRandom(value) 1124 GetFirstTick(value) 1125 SetIOMapBytes(modName, offset, len, arrIn) 1126 SetIOMapValue(modName, offset, n) 1127 SetUIModuleValue(offset, n) 1128 SetIOCtrlModuleValue(offset, n) 1129 SetCommandModuleValue(offset, n) 1130 SetSoundModuleValue(offset, n) 1131 SetButtonModuleValue(offset, n) 1132 SetInputModuleValue(offset, n) 1133 SetOutputModuleValue(offset, n) 1134 SetLowSpeedModuleValue(offset, n) 1135 SetDisplayModuleValue(offset, n) 1136 SetCommModuleValue(offset, n) 1137 RebootInFirmwareMode 1138 PowerDown 1139 SetSoundFrequency(n) 1140 SetSoundDuration(n) 1141 SetSoundSampleRate(n) 1142 SetSoundFlags(n) 1143 SetSoundState(n) 1144 SetSoundMode(n) 1145 SetSoundVolume(n) 1146 SetButtonPressCount(b, n) 1147 SetButtonLongPressCount(b, n) 1148 SetButtonShortReleaseCount(b, n) 1149 SetButtonLongReleaseCount(b, n) 1150 SetButtonReleaseCount(b, n) 1151 SetButtonState(b, n) 1152 SetCommandFlags(n) 1153 SetUIState(n) 1154 SetUIButton(n) 1155 SetVMRunState(n) 1156 SetBatteryState(n) 1157 SetBluetoothState(n) 1158 SetUsbState(n) 1159 SetSleepTimeout(n) 1160 SetSleepTimer(n) 1161 SetVolume(level) 1162 SetOnBrickProgramPointer(idx) 1163 ForceOff(n) 1164 SetInCustomZeroOffset(p, n) 1165 SetInSensorBoolean(p, n) 1166 SetInDigiPinsDirection(p, n) 1167 SetInDigiPinsStatus(p, n) 1168 SetInDigiPinsOutputLevel(p, n) 1169 SetInCustomPercentFullScale(p, n) 1170 SetInCustomActiveStatus(p, n) 1171 SetOutPwnFreq(n) 1172 SetLSInputBuffer(p, offset, cnt, data) 1173 SetLSInputBufferInPtr(p, n) 1174 SetLSInputBufferOutPtr(p, n) 1175 setLSInputBufferBytesToRx(p, n) 1176 SetLSOutputBuffer(p, offset, cnt, data) 1177 SetLSOutputBufferInPtr(p, n) 1178 SetLSOutputBufferOutPtr(p, n) 1179 SetLSOutputBufferBytesToRx(p, n) 1180 SetLSMode(p, v) 1181 SetLSChannelState(p, v) 1182 SetLSErrorType(p, v) 1183 SetLSState(v) 1184 SetLSSpeed(v) 1185 SetDisplayEraseMask(n) 1186 SetDisplayUpdateMask(n) 1187 SetDisplayDisplay(n) 1188 SetDisplayFlags(n) 1189 SetDisplayTextLinesCenterFlags(n) 1190 setDisplayNormal(x, line, cnt, data) 1191 SetDisplayPopup(x, line, cnt, data) 1192 SetBTDeviceName(p, str) 1193 SetBTDeviceClass(p, v) 1194 SetBTDeviceAddress(p, addr) 1195 SetBTDeviceStatus(p, v) 1196 SetBTConnectionName(p, str) 1197 SetBTConnectionClass(p, v) 1198 SetBTConnectionPinCode(p, str) 1199 SetBTConnectionAddress(p, addr) 1200 SetBTConnectionHandleNum(p, v) 1201 SetBTConnectionStreamStatus(p, v) 1202 SetBTConnectionLinkQuality(p, v) 1203 SetBrickDataName(str) 1204 SetBrickDataBluecoreVersion(v) 1205 SetBrickDataAddress(addr) 1206 SetBrickDataBtStateStatus(v) 1207 SetBrickDataBtHardwareStatus(v) 1208 SetBrickDataTimeoutValue(v) 1209 SetBTInputBuffer(data) 1210 SetBTInputBufferInPtr(n) 1211 SetBTInputBufferOutPtr(n) 1212 SetBTOutputBuffer(data) 1213 SetBTOutputBufferInPtr(n) 1214 SetBTOutputBufferOutPtr(n) 1215 SetHSInputBuffer(data) 1216 SetHSInputBufferInPtr(n) 1217 SetHSInputBufferOutPtr(n) 1218 SetHSOutputBuffer(data) 1219 SetHSOutputBufferInPtr(n) 1220 SetHSOutputBufferOutPtr(n) 1221 SetUSBInputBuffer(data) 1222 SetUSBInputBufferInPtr(n) 1223 SetUSBInputBufferOutPtr(n) 1224 SetUSBOutputBuffer(data) 1225 SetUSBOutputBufferInPtr(n) 1226 SetUSBOutputBufferOutPtr(n) 1227 SetUSBPollBuffer(data) 1228 SetUSBPollBufferInPtr(n) 1229 SetUSBPollBufferOutPtr(n) 1230 SetBTDeviceCount(n) 1231 SetBTDeviceNameCount(n) 1232 SetHSFlags(n) 1233 SetHSSpeed(n) 1234 SetHSState(n) 1235 SetUSBState(n) 1236 GetIOMapBytes(modName, offset, len, arrOut) 1237 GetIOMapValue(modName, offset, n) 1238 GetUIModuleValue(offset, n) 1239 GetLoaderModuleValue(offset, n) 1240 GetCommandModuleValue(offset, n) 1241 GetSoundModuleValue(offset, n) 1242 GetButtonModuleValue(offset, n) 1243 GetInputModuleValue(offset, n) 1244 GetOutputModuleValue(offset, n) 1245 GetLowSpeedModuleValue(offset, n) 1246 GetDisplayModuleValue(offset, n) 1247 GetCommModuleValue(offset, n) 1248 GetFreeMemory(value) 1249 GetSoundFrequency(value) 1250 GetSoundDuration(value) 1251 GetSoundSampleRate(value) 1252 GetSoundFlags(value) 1253 GetSoundState(value) 1254 GetSoundMode(value) 1255 GetSoundVolume(value) 1256 GetButtonPressCount(b, value) 1257 GetButtonLongPressCount(b, value) 1258 GetButtonShortReleaseCount(b, value) 1259 GetButtonLongReleaseCount(b, value) 1260 GetButtonReleaseCount(b, value) 1261 GetButtonState(b, value) 1262 GetBatteryLevel(value) 1263 GetCommandFlags(value) 1264 GetUIState(value) 1265 GetUIButton(value) 1266 GetVMRunState(value) 1267 GetBatteryState(value) 1268 GetBluetoothState(value) 1269 GetUsbState(value) 1270 GetSleepTimeout(value) 1271 GetSleepTimer(value) 1272 GetRechargeableBattery(value) 1273 GetVolume(value) 1274 GetOnBrickProgramPointer(value) 1275 GetInCustomZeroOffset(p, v) 1276 GetInSensorBoolean(p, v) 1277 GetInDigiPinsDirection(p, v) 1278 GetInDigiPinsStatus(p, v) 1279 GetInDigiPinsOutputLevel(p, v) 1280 GetInCustomPercentFullScale(p, v) 1281 GetInCustomActiveStatus(p, v) 1282 GetOutPwnFreq(v) 1283 GetLSInputBuffer(p, offset, cnt, data) 1284 GetLSInputBufferInPtr(p, n) 1285 GetLSInputBufferOutPtr(p, n) 1286 GetLSInputBufferBytesToRx(p, n) 1287 GetLSOutputBuffer(p, offset, cnt, data) 1288 GetLSOutputBufferInPtr(p, n) 1289 GetLSOutputBufferOutPtr(p, n) 1290 GetLSOutputBufferBytesToRx(p, n) 1291 GetLSMode(p, v) 1292 GetLSChannelState(p, v) 1293 GetLSErrorType(p, v) 1294 GetLSState(v) 1295 GetLSSpeed(v) 1296 GetDisplayEraseMask(n) 1297 GetDisplayUpdateMask(n) 1298 GetDisplayDisplay(n) 1299 GetDisplayFlags(n) 1300 GetDisplayTextLinesCenterFlags(n) 1301 GetDisplayNormal(x, line, cnt, data) 1302 GetDisplayPopup(x, line, cnt, data) 1303 GetBTDeviceName(p, str) 1304 GetBTDeviceClass(p, v) 1305 GetBTDeviceAddress(p, addr) 1306 GetBTDeviceStatus(p, v) 1307 GetBTConnectionName(p, str) 1308 GetBTConnectionClass(p, v) 1309 GetBTConnectionPinCode(p, str) 1310 GetBTConnectionAddress(p, addr) 1311 GetBTConnectionHandleNum(p, v) 1312 GetBTConnectionStreamStatus(p, v) 1313 GetBTConnectionLinkQuality(p, v) 1314 GetBrickDataName(str) 1315 GetBrickDataBluecoreVersion(v) 1316 GetBrickDataAddress(addr) 1317 GetBrickDataBtStateStatus(v) 1318 GetBrickDataBtHardwareStatus(v) 1319 GetBrickDataTimeoutValue(v) 1320 GetBTInputBuffer(data) 1321 GetBTInputBufferInPtr(n) 1322 GetBTInputBufferOutPtr(n) 1323 GetBTOutputBuffer(data) 1324 GetBTOutputBufferInPtr(n) 1325 GetBTOutputBufferOutPtr(n) 1326 GetHSInputBuffer(data) 1327 GetHSInputBufferInPtr(n) 1328 GetHSInputBufferOutPtr(n) 1329 GetHSOutputBuffer(data) 1330 GetHSOutputBufferInPtr(n) 1331 GetHSOutputBufferOutPtr(n) 1332 GetUSBInputBuffer(data) 1333 GetUSBInputBufferInPtr(n) 1334 GetUSBInputBufferOutPtr(n) 1335 GetUSBOutputBuffer(data) 1336 GetUSBOutputBufferInPtr(n) 1337 GetUSBOutputBufferOutPtr(n) 1338 GetUSBPollBuffer(data) 1339 GetUSBPollBufferInPtr(n) 1340 GetUSBPollBufferOutPtr(n) 1341 GetBTDeviceCount(n) 1342 GetBTDeviceNameCount(n) 1343 GetHSFlags(n) 1344 GetHSSpeed(n) 1345 GetHSState(n) 1346 GetUSBState(n) 1347 CreateFile(fname, fsize, handle, result) 1348 OpenFileAppend(fname, fsize, handle, result) 1349 OpenFileRead(fname, fsize, handle, result) 1350 CloseFile(handle, result) 1351 ResolveHandle(fname, handle, writeable, result) 1352 RenameFile(oldname, newname, result) 1353 DeleteFile(fname, result) 1354 SendMessage(queue, msg, result) 1355 ReceiveMessage(queue, clear, msg, result) 1356 LowspeedStatus(port, bready, result) 1357 LowspeedWrite(port, retlen, buffer, result) 1358 LowspeedRead(port, buflen, buffer, result) 1359 BluetoothStatus(conn, result) 1360 BluetoothWrite(conn, buffer, result) 1361- Adds to NBC new opcodes: 1362 strindex dest, strsrc, idx: same as index but can take a constant string 1363 strreplace strDest, strSrc, idx, strNew: same as replace but can take constant strings 1364 strlen dest, strSource: store the length of the input string into dest 1365 shr result, value, n: shift right value by 'n' bits and store in result 1366 shl result, value, n: shift left value by 'n' bits and store in result 1367- Adds to NBC a special compile-time operator: 1368 sizeof(variable): returns the element size of the specified variable 1369- Adds to NBC a special compile-time opcode: 1370 compchk comparecode, const1, const2: returns a compiler error if the specified 1371 expression is not true. For example: compchk EQ, sizeof(arg3), 1 1372- Adds '~' operator to the NBC compile-time expression evaluator (bitwise not) 1373- Fixes a problem in NBC (and NXC) with the RotateMotor API function 1374- Fixes a bug in NBC with nested preprocessor macro function calls 1375 (e.g., FooBar(MyMacro(x, y), 2, 4) 1376- Fixes a bug in NBC with trailing spaces on #define values 1377 1378 1379 1380Version 1.0.1.b14 1381----------------- 1382- Adds string variables with initialization, assignment, concatenation (including +=). 1383- Moves ReadSensor, ReadSensorUS, TextOut, NumOut, PlatTone, PlayFile, and ResetSleepTimer 1384 to function status (can be on the RHS of an assignment). 1385- Cls is renamed as ResetScreen. Write is removed (use TextOut and NumOut instead). 1386- PlayTone is replaced with PlayToneEx(freq, dur, vol, loop). 1387- PlayFile is replaced with PlayFileEx(fname, vol, loop). 1388- Renames InputFieldValue as GetInput and OutputFieldValue as GetOutput. 1389- Reorganizes includes so that NXCDefs.h includes NBCCommon.h and NXTDefs.h includes 1390 NBCCommon.h. NXCDefs.h now defines PlayTone and PlayFile API macros. It also 1391 defines TachometerCount(port) and TachometerLimit(port) API macros (more to come). 1392- Adds SoundState, SoundFlags, StopSound, ButtonPressed, ButtonCount, ReadButtonEx, 1393 GetFirstTick, PointOut, LineOut, CircleOut, RectOut, and GraphicOut functions. 1394- Fixes multi-threading issues with variables used as stack and register variables. 1395 1396 1397Version 1.0.1.b13 1398----------------- 1399 1400This beta release improves support for the Not eXactly C (NXC) programming language. 1401NXC now supports do-while and repeat loops as found in NQC. These constructs are 1402in addition to the already supported if/else, while, and for loops. This release 1403also enables using either single statement or block statements with all the 1404programming constructs (the previous beta required block statements). There is 1405also support for an "asm" block which outputs NBC code directly to the backend. 1406 1407This release also expands the set of API functions to include TextOut, NumOut, 1408OnFwdReg, OnRevReg, OnFwdSync, OnRevSync, RotateMotor, RotateMotorEx, 1409SetSensorType, SetSensorMode, ReadSensor, ReadSensorUS, ClearSensor, 1410SetSensorTouch, SetSensorLight, SetSensorSound, SetSensorUltrasonic, ResetSensor, 1411PlayTone, PlayFile, Acquire, Release, Precedes, Follows, ResetSleepTimer, 1412abs, sign, Random, InputFieldValue, OutputFieldValue, IOMA, and GetTick. The 1413last seven of these return a value and can be used on the RHS of assignment 1414statements. The InputFieldValue and OutputFieldValue functions can be used 1415in simple preprocessor macros (which will be formalized in a future beta NXC 1416API header) for accessing any input or output value (such as TachoCount, 1417SensorValue, SensorValueRaw, ActualSpeed, etc...) 1418 1419Variables may be initialized at the declaration point. Declarations may exist 1420anywhere in the source outside of tasks and subroutines. Previously all 1421declarations had to be prior to the first task or subroutine. Future releases 1422will enable local variable declarations but they are not currently supported. 1423 1424 1425Version 1.0.1.b12 1426----------------- 1427 1428This beta release introduces support for two new languages related to NBC. The NPG 1429language is a very simple 5 step declarative language for writing RPG (NXT Program) 1430executables. NPG programs simple list the 5 steps with compiler support for C++-style 1431comments interspersed. Unlike the built-in NXT menu system mechanism for writing 1432NXT Programs which require alternating move and wait commands, programs written using 1433NPG can sequence the 5 commands in any order except that the EndStop and EndLoop 1434commands can only occur as the last step. See test.npg for a small sample. 1435These programs require the RPGReader.sys program on the NXT. This executable is 143614kb in size but a replacement version which nearly identical functionality will 1437soon be available on the NBC site which is only ~2.5kb. 1438 1439NBC also now supports a very early version of the NXC programming language. This 1440language is a lot like NQC syntax-wise. It is still in its infancy so it is subject 1441to substantial change and improvement. The NBC compiler converts the NXC code to 1442NBC code and then compiles it as it would any other NBC program. See test.nxc for 1443a basic example. 1444 1445The NXTDefs.h header file has been split into NXCDefs.h and NXTDefs.h. NBC programs 1446should still #include "NXTDefs.h" but NXC programs should #include "NXCDefs.h". 1447 1448This release also fixes a problem with unix-style line endings which made it so that 1449multiline macros written on non-Windows platforms would not work correctly. 1450 1451 1452 1453Version 1.0.1.b11 1454----------------- 1455 1456This beta release has a number of additional macros in NXTDefs.h for simplifying several 1457aspects of programming the NXT. 1458 1459 1460 1461Version 1.0.1.b10 1462---------------- 1463 1464This beta release implements multi-dimensional array support. 1465 1466It has additional macros in NXTDefs.h for motor and sensor control. 1467 1468It moves all forms of optimization under the control of a command-line switch 1469(-Z, -Z1, or -Z2). The optimizations that were always executed in beta 8 are now 1470only executed if you set the optimization level to at least level 1. -Z and -Z2 1471both set the optimization level to 2. Level 2 optimizations replace several 1472different patterns of code with simplified equivalents. 1473 1474NBC now has special tokens that can be used in macros or elsewhere for useful purposes. 1475The tokens are __FILE__, __LINE__, __VER__, __THREADNAME__, __I__, __J__, __ResetI__, 1476__ResetJ__, __IncI__, __IncJ__, __DecI__, and __DecJ__. The compiler will also replace 1477## wherever it exists in the sourcecode with nothing (even within strings). These tokens 1478make it possible to define preprocessor macros which can be used repeatedly in the same 1479thread or in multiple concurrent threads without causing threading problems or 1480producing duplicate label names. The values of __I__ and __J__ are automatically reset 1481to zero at the start of each new thread or subroutine. 1482 1483 1484 1485Version 1.0.1.b8 1486---------------- 1487 1488This beta release adds call, release, abs, sub, and waitv opcodes. It also makes 1489the preprocessor operate recursively on both parameterized and non-parameterized 1490macros. It fixes a typo in the NXTDefs.h header file and adds some standard 1491preprocessor macros for motor control. The compiler has a major new optimization 1492feature which removes unused variables and threads/subroutines from the compiled 1493executable. In b7 I accidentally broke the "wait" opcode support that was added in 1494b6 but that support has been restored in b8. 1495 1496 1497Version 1.0.1.b7 1498---------------- 1499 1500This beta release includes a new symbol table generation feature (-Y) along with 1501a significantly faster preprocessor. A bug in processing parameterized macros which 1502had whitespace following the last parameter was also fixed. 1503 1504 1505Version 1.0.1.b6 1506---------------- 1507 1508Fixed a bug in the binary file download code in the Win32 version. Added 1509support for generating thread-specific wait subroutines when the compiler 1510sees a thread try to use the wait opcode (since that opcode was not included 1511in the standard NXT firmware). 1512 1513Next Byte Codes Compiler version 1.0.1.b6 (1.0.1.6, built Aug 18 2006 17:13:22) 1514 Copyright (c) 2006, John Hansen 1515 1516 1517Version 1.0.1.b5 1518---------------- 1519 1520Added support for parameterized macro functions. Added support for multi-line 1521macros. Fixed some preprocessor bugs related to unmatched #ifdef #endif pairs 1522and #include statements with unsupported format (must be #include "filename.extension"). 1523Updated NXTDefs.h with additional IOMap constants. Released the Free Pascal-compliant 1524sourcecode as part of the new BricxCC 3.3.7.15 source code release. 1525 1526Next Byte Codes Compiler version 1.0.1.b5 (1.0.1.5, built Aug 16 2006 17:08:56) 1527 Copyright (c) 2006, John Hansen 1528 1529 1530 1531version 0.1.4.b4 1532---------------- 1533 1534Added a built-in preprocessor. Fixed argument checking for the 3 opcodes which 1535take a variable number of arguments. Added a Mac OSX version of the compiler. 1536 1537Next Byte Codes Compiler version 0.1.4.b4 (0.1.4.1, built Jun 15 2006 13:38:46) 1538 Copyright (c) 2006, John Hansen 1539 1540 1541version 0.1.3.b3 1542---------------- 1543 1544Fixed assumptions regarding bluetooth communication and port name aliases. To use 1545Bluetooth you must add the -BT switch to the command line. 1546 1547Next Byte Codes Compiler version 0.1.3.b3 (0.1.3.18, built Jun 06 2006 08:40:14) 1548 Copyright (c) 2006, John Hansen 1549Syntax: nbc [options] filename [options] 1550 1551 -T=<target>: target must be NXT 1552 -S=<portname>: specify port name (COMn or usb), resource name, or alias 1553 -BT: use bluetooth 1554 -d: download program 1555 -b: treat input file as a binary file (don't compile it) 1556 -q: no sound upon download completion 1557 -x: decompile program 1558 -O=<outfile> : specify output file 1559 -E=<filename> : write compiler errors to <filename> 1560 -I=<path>: search <path> for include files 1561 -L=<filename> : generate code listing to <filename> 1562 -help : display command line options 1563 1564version 0.1.3.b2 1565---------------- 1566 1567Added support for initializing arrays of structs. 1568Fixed a few minor bugs. 1569Downloading programs now depends on the LEGO Mindstorms NXT Driver (Fantom). 1570 1571Next Byte Codes Compiler version 0.1.3.b2 (0.1.3.17, built May 17 2006 16:53:18) 1572 Copyright (c) 2006, John Hansen 1573 1574 1575version 0.1.3.b1 1576---------------- 1577 1578First official beta of NBC. 1579 1580 1581NXT Bytecode Compiler version 0.1.3.b1 (0.1.3.14, built May 02 2006 13:14:50) 1582 Copyright 2006, John Hansen 1583Syntax: nbc [options] filename [options] 1584 1585 -T=<target>: target must be NXT 1586 -S=<portname>: specify port (COMn or usb) 1587 -d: download program 1588 -b: treat input file as a binary file (don't compile it) 1589 -x: decompile program 1590 -q: no sound upon download completion 1591 -O=<outfile> : specify output file 1592 -E=<filename> : write compiler errors to <filename> 1593 -I=<path>: search <path> for include files 1594 -L=<filename> : generate code listing to <filename> 1595 -help : display command line options 1596 1597