To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxtOpen lugnet.robotics.nxt in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / 280
279  |  281
Subject: 
Not eXactly C beta release news
Newsgroups: 
lugnet.robotics.nxt, lugnet.robotics
Date: 
Wed, 20 Dec 2006 11:46:25 GMT
Viewed: 
12708 times
  
Today I am releasing a new beta of NBC and its highly popular high-level sister
Not eXactly C (NXC).

It is available via the NBC website (http://bricxcc.sourceforge.net/nbc/).
Be sure to also download the latest BricxCC test release for updated NXT support
for both NBC and NXC (http://bricxcc.sourceforge.net/).

Here is a bit of information about what is new in this release:

Version 1.0.1.b15
-----------------
- Adds to NXC new API functions:
    ExitTo(task): Exit the current task immediately and start the specified task
    Stop(bStop): Stop the program if the boolean expression evaluates to true
    SetInput(port, field, value): Set an input field to the specified value
    SetOutput(ports, field, value): Set an output field to the specified value
    PowerDown(): Power down the brick immediately
    RebootInFirmwareMode(): Reboot the brick in firmware mode immediately
    BatteryLevel(): Read the current battery level (in millivolts)
    FreeMemory(): Read the free flash memory (in bytes)
    NumToStr(val): Convert the specified numeric value to a string
    StrCat(str1, str2, ..., strN): Concatenate the args into a single string
    SubStr(str, idx, len): Extract the specified portion of a string
    Flatten(val): Convert value into a string based on the size of scalar
datatype
    StrReplace(str, idx, strnew): Replace characters in 'str' with those in
'strnew'
    StrToNum(str): Convert string into a number
    StrLen(str): Return the length of the string argument
    StrIndex(str, idx): Return the ASCII value of str[idx]
- Adds to NXC the "until" loop construct and the goto label construct
- Fixes a NXC parser bug in if (condition) { } else { } construct
- Adds support for && and || operators in boolean expressions
- Adds support for <<, >>, <<=, and >>= operators in numeric expressions
- Adds to NXC new API macros:
    SensorType(p)
    SensorMode(p)
    SensorRaw(p)
    SensorNormalized(p)
    SensorScaled(p)
    SensorInvalid(p)
    MotorMode(p)
    MotorPower(p)
    MotorActualSpeed(p)
    MotorTachoCount(p)
    MotorTachoLimit(p)
    MotorRunState(p)
    MotorTurnRatio(p)
    MotorRegulation(p)
    MotorOverload(p)
    MotorRegPValue(p)
    MotorRegIValue(p)
    MotorRegDValue(p)
    MotorBlockTachoCount(p)
    MotorRotationCount(p)
- Adds to NBC many new API macros:
    PointOut(x, y, clear?)
    LineOut(x1, y1, x2, y2, clear?)
    RectOut(x, y, width, height, clear?)
    CircleOut(x, y, radius, clear?)
    GraphicOut(x, y, filename, varArray, clear?)
    PlayToneEx(frequency, duration, volume, loop?)
    PlayFileEx(filename, volume, loop?)
    GetSoundState(state, flags)
    SetSoundState(state, flags, result)
    SignedRandom(value)
    GetFirstTick(value)
    SetIOMapBytes(modName, offset, len, arrIn)
    SetIOMapValue(modName, offset, n)
    SetUIModuleValue(offset, n)
    SetIOCtrlModuleValue(offset, n)
    SetCommandModuleValue(offset, n)
    SetSoundModuleValue(offset, n)
    SetButtonModuleValue(offset, n)
    SetInputModuleValue(offset, n)
    SetOutputModuleValue(offset, n)
    SetLowSpeedModuleValue(offset, n)
    SetDisplayModuleValue(offset, n)
    SetCommModuleValue(offset, n)
    RebootInFirmwareMode
    PowerDown
    SetSoundFrequency(n)
    SetSoundDuration(n)
    SetSoundSampleRate(n)
    SetSoundFlags(n)
    SetSoundState(n)
    SetSoundMode(n)
    SetSoundVolume(n)
    SetButtonPressCount(b, n)
    SetButtonLongPressCount(b, n)
    SetButtonShortReleaseCount(b, n)
    SetButtonLongReleaseCount(b, n)
    SetButtonReleaseCount(b, n)
    SetButtonState(b, n)
    SetCommandFlags(n)
    SetUIState(n)
    SetUIButton(n)
    SetVMRunState(n)
    SetBatteryState(n)
    SetBluetoothState(n)
    SetUsbState(n)
    SetSleepTimeout(n)
    SetSleepTimer(n)
    SetVolume(level)
    SetOnBrickProgramPointer(idx)
    ForceOff(n)
    SetInCustomZeroOffset(p, n)
    SetInSensorBoolean(p, n)
    SetInDigiPinsDirection(p, n)
    SetInDigiPinsStatus(p, n)
    SetInDigiPinsOutputLevel(p, n)
    SetInCustomPercentFullScale(p, n)
    SetInCustomActiveStatus(p, n)
    SetOutPwnFreq(n)
    SetLSInputBuffer(p, offset, cnt, data)
    SetLSInputBufferInPtr(p, n)
    SetLSInputBufferOutPtr(p, n)
    setLSInputBufferBytesToRx(p, n)
    SetLSOutputBuffer(p, offset, cnt, data)
    SetLSOutputBufferInPtr(p, n)
    SetLSOutputBufferOutPtr(p, n)
    SetLSOutputBufferBytesToRx(p, n)
    SetLSMode(p, v)
    SetLSChannelState(p, v)
    SetLSErrorType(p, v)
    SetLSState(v)
    SetLSSpeed(v)
    SetDisplayEraseMask(n)
    SetDisplayUpdateMask(n)
    SetDisplayDisplay(n)
    SetDisplayFlags(n)
    SetDisplayTextLinesCenterFlags(n)
    setDisplayNormal(x, line, cnt, data)
    SetDisplayPopup(x, line, cnt, data)
    SetBTDeviceName(p, str)
    SetBTDeviceClass(p, v)
    SetBTDeviceAddress(p, addr)
    SetBTDeviceStatus(p, v)
    SetBTConnectionName(p, str)
    SetBTConnectionClass(p, v)
    SetBTConnectionPinCode(p, str)
    SetBTConnectionAddress(p, addr)
    SetBTConnectionHandleNum(p, v)
    SetBTConnectionStreamStatus(p, v)
    SetBTConnectionLinkQuality(p, v)
    SetBrickDataName(str)
    SetBrickDataBluecoreVersion(v)
    SetBrickDataAddress(addr)
    SetBrickDataBtStateStatus(v)
    SetBrickDataBtHardwareStatus(v)
    SetBrickDataTimeoutValue(v)
    SetBTInputBuffer(data)
    SetBTInputBufferInPtr(n)
    SetBTInputBufferOutPtr(n)
    SetBTOutputBuffer(data)
    SetBTOutputBufferInPtr(n)
    SetBTOutputBufferOutPtr(n)
    SetHSInputBuffer(data)
    SetHSInputBufferInPtr(n)
    SetHSInputBufferOutPtr(n)
    SetHSOutputBuffer(data)
    SetHSOutputBufferInPtr(n)
    SetHSOutputBufferOutPtr(n)
    SetUSBInputBuffer(data)
    SetUSBInputBufferInPtr(n)
    SetUSBInputBufferOutPtr(n)
    SetUSBOutputBuffer(data)
    SetUSBOutputBufferInPtr(n)
    SetUSBOutputBufferOutPtr(n)
    SetUSBPollBuffer(data)
    SetUSBPollBufferInPtr(n)
    SetUSBPollBufferOutPtr(n)
    SetBTDeviceCount(n)
    SetBTDeviceNameCount(n)
    SetHSFlags(n)
    SetHSSpeed(n)
    SetHSState(n)
    SetUSBState(n)
    GetIOMapBytes(modName, offset, len, arrOut)
    GetIOMapValue(modName, offset, n)
    GetUIModuleValue(offset, n)
    GetLoaderModuleValue(offset, n)
    GetCommandModuleValue(offset, n)
    GetSoundModuleValue(offset, n)
    GetButtonModuleValue(offset, n)
    GetInputModuleValue(offset, n)
    GetOutputModuleValue(offset, n)
    GetLowSpeedModuleValue(offset, n)
    GetDisplayModuleValue(offset, n)
    GetCommModuleValue(offset, n)
    GetFreeMemory(value)
    GetSoundFrequency(value)
    GetSoundDuration(value)
    GetSoundSampleRate(value)
    GetSoundFlags(value)
    GetSoundState(value)
    GetSoundMode(value)
    GetSoundVolume(value)
    GetButtonPressCount(b, value)
    GetButtonLongPressCount(b, value)
    GetButtonShortReleaseCount(b, value)
    GetButtonLongReleaseCount(b, value)
    GetButtonReleaseCount(b, value)
    GetButtonState(b, value)
    GetBatteryLevel(value)
    GetCommandFlags(value)
    GetUIState(value)
    GetUIButton(value)
    GetVMRunState(value)
    GetBatteryState(value)
    GetBluetoothState(value)
    GetUsbState(value)
    GetSleepTimeout(value)
    GetSleepTimer(value)
    GetRechargeableBattery(value)
    GetVolume(value)
    GetOnBrickProgramPointer(value)
    GetInCustomZeroOffset(p, v)
    GetInSensorBoolean(p, v)
    GetInDigiPinsDirection(p, v)
    GetInDigiPinsStatus(p, v)
    GetInDigiPinsOutputLevel(p, v)
    GetInCustomPercentFullScale(p, v)
    GetInCustomActiveStatus(p, v)
    GetOutPwnFreq(v)
    GetLSInputBuffer(p, offset, cnt, data)
    GetLSInputBufferInPtr(p, n)
    GetLSInputBufferOutPtr(p, n)
    GetLSInputBufferBytesToRx(p, n)
    GetLSOutputBuffer(p, offset, cnt, data)
    GetLSOutputBufferInPtr(p, n)
    GetLSOutputBufferOutPtr(p, n)
    GetLSOutputBufferBytesToRx(p, n)
    GetLSMode(p, v)
    GetLSChannelState(p, v)
    GetLSErrorType(p, v)
    GetLSState(v)
    GetLSSpeed(v)
    GetDisplayEraseMask(n)
    GetDisplayUpdateMask(n)
    GetDisplayDisplay(n)
    GetDisplayFlags(n)
    GetDisplayTextLinesCenterFlags(n)
    GetDisplayNormal(x, line, cnt, data)
    GetDisplayPopup(x, line, cnt, data)
    GetBTDeviceName(p, str)
    GetBTDeviceClass(p, v)
    GetBTDeviceAddress(p, addr)
    GetBTDeviceStatus(p, v)
    GetBTConnectionName(p, str)
    GetBTConnectionClass(p, v)
    GetBTConnectionPinCode(p, str)
    GetBTConnectionAddress(p, addr)
    GetBTConnectionHandleNum(p, v)
    GetBTConnectionStreamStatus(p, v)
    GetBTConnectionLinkQuality(p, v)
    GetBrickDataName(str)
    GetBrickDataBluecoreVersion(v)
    GetBrickDataAddress(addr)
    GetBrickDataBtStateStatus(v)
    GetBrickDataBtHardwareStatus(v)
    GetBrickDataTimeoutValue(v)
    GetBTInputBuffer(data)
    GetBTInputBufferInPtr(n)
    GetBTInputBufferOutPtr(n)
    GetBTOutputBuffer(data)
    GetBTOutputBufferInPtr(n)
    GetBTOutputBufferOutPtr(n)
    GetHSInputBuffer(data)
    GetHSInputBufferInPtr(n)
    GetHSInputBufferOutPtr(n)
    GetHSOutputBuffer(data)
    GetHSOutputBufferInPtr(n)
    GetHSOutputBufferOutPtr(n)
    GetUSBInputBuffer(data)
    GetUSBInputBufferInPtr(n)
    GetUSBInputBufferOutPtr(n)
    GetUSBOutputBuffer(data)
    GetUSBOutputBufferInPtr(n)
    GetUSBOutputBufferOutPtr(n)
    GetUSBPollBuffer(data)
    GetUSBPollBufferInPtr(n)
    GetUSBPollBufferOutPtr(n)
    GetBTDeviceCount(n)
    GetBTDeviceNameCount(n)
    GetHSFlags(n)
    GetHSSpeed(n)
    GetHSState(n)
    GetUSBState(n)
    CreateFile(fname, fsize, handle, result)
    OpenFileAppend(fname, fsize, handle, result)
    OpenFileRead(fname, fsize, handle, result)
    CloseFile(handle, result)
    ResolveHandle(fname, handle, writeable, result)
    RenameFile(oldname, newname, result)
    DeleteFile(fname, result)
    SendMessage(queue, msg, result)
    ReceiveMessage(queue, clear, msg, result)
    LowspeedStatus(port, bready, result)
    LowspeedWrite(port, retlen, buffer, result)
    LowspeedRead(port, buflen, buffer, result)
    BluetoothStatus(conn, result)
    BluetoothWrite(conn, buffer, result)
- Adds to NBC new opcodes:
    strindex dest, strsrc, idx: same as index but can take a constant string
    strreplace strDest, strSrc, idx, strNew: same as replace but can take
constant strings
    strlen dest, strSource: store the length of the input string into dest
    shr result, value, n: shift right value by 'n' bits and store in result
    shl result, value, n: shift left value by 'n' bits and store in result
- Adds to NBC a special compile-time operator:
    sizeof(variable): returns the element size of the specified variable
- Adds to NBC a special compile-time opcode:
    compchk comparecode, const1, const2: returns a compiler error if the
specified
      expression is not true.  For example: compchk EQ, sizeof(arg3), 1
- Adds '~' operator to the NBC compile-time expression evaluator (bitwise not)
- Fixes a problem in NBC (and NXC) with the RotateMotor API function
- Fixes a bug in NBC with nested preprocessor macro function calls
    (e.g., FooBar(MyMacro(x, y), 2, 4)
- Fixes a bug in NBC with trailing spaces on #define values



Message has 1 Reply:
  What do these macros do?
 
I've been poking around with my NXT, and as usual I've decided to bite off more than I can chew. In trying to discover a way to *unset* pixels on the display without wiping the whole thing, I've been sifting through some of the less-discussed macros (...) (18 years ago, 11-Jan-07, to lugnet.robotics.nxt, lugnet.robotics)

12 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in...

NXT programmable brick

 
Verified and Trusted Team of Hackers
52 minutes ago

Robotics

 
Verified and Trusted Team of Hackers
52 minutes ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR