Subject:
|
Not eXactly C beta news (NBC)
|
Newsgroups:
|
lugnet.robotics.nxt
|
Date:
|
Tue, 12 Dec 2006 23:44:39 GMT
|
Highlighted:
|
!
(details)
|
Viewed:
|
12028 times
|
| |
| |
I have just released a new beta of NBC with built-in support for 3 programming
languages targetting the standard NXT firmware. This beta release focuses
primarily on improving the Not eXactly C (NXC) programming language support in
the compiler. It is still not done yet but this beta adds a huge number of
features to the NXC compiler.
NXC now supports do-while and repeat loops as found in NQC. These constructs
are in addition to the already supported if/else, while, and for loops. This
release also enables using either single statement or block statements with all
the programming constructs (the previous beta required block statements).
There is also support for an asm block which outputs NBC code directly to the
backend.
This release also expands the set of API functions to include TextOut, NumOut,
OnFwdReg, OnRevReg, OnFwdSync, OnRevSync, RotateMotor, RotateMotorEx,
SetSensorType, SetSensorMode, ReadSensor, ReadSensorUS, ClearSensor,
SetSensorTouch, SetSensorLight, SetSensorSound, SetSensorUltrasonic,
ResetSensor, PlayTone, PlayFile, Acquire, Release, Precedes, Follows,
ResetSleepTimer, abs, sign, Random, InputFieldValue, OutputFieldValue, IOMA, and
GetTick. The last seven of these return a value and can be used on the RHS of
assignment statements. The InputFieldValue and OutputFieldValue functions can
be used in simple preprocessor macros (which will be formalized in a future beta
NXC API header) for accessing any input or output value (such as TachoCount,
SensorValue, SensorValueRaw, ActualSpeed, etc...)
Variables may be initialized at the declaration point. Declarations may exist
anywhere in the source outside of tasks and subroutines. Previously all
declarations had to be prior to the first task or subroutine. Future releases
will enable local variable declarations but they are not currently supported.
I also fixed a bug in the NXTDefs.h header where I was using the wrong mutex for
the NumOut macro function.
Linux and MacOSX users might be interested to know that I almost have built-in
support for direct brick communication via USB working. I still have a few
issues to figure out but it is nearly there. The Linux and MacOSX builds will
be up on the NBC website late tonight or tomorrow at the latest.
Get the latest test release of BricxCC in order to have all the new NXC API
properly syntax-highlighted.
John Hansen
http://bricxcc.sourceforge.net/nbc
|
|
Message has 2 Replies:
6 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in NXT programmable brick
|
|
|
|