Sophie

Sophie

distrib > Mandriva > 8.1 > i586 > by-pkgid > 19a87309ef88063715a222fd2623c2f9 > files > 5

nqc-2.3.r1-1mdk.i586.rpm

NQC Release Notes
-----------------

Please send bug reports to dbaum@enteract.com.  Be sure to include
details about what platform you are running nqc on and a sample
file that demonstrates the bug if possible.

For updates and additional documentation, visit the NQC Web Site:
http://www.enteract.com/~dbaum/nqc


version 2.3 r1  (previously 2.3 b1)
-----------------------------------

* added the -b option to force input file to be treated as binary file
regardless of filename extension

* automatically switches a Scout to "power mode" when downloading a program

* fixed a bug with the -clear action (previously it would return an error even
though the RCX was cleared)

* fixed a bug that produced garbage when printing an error message that
occurred at the end of the source file

* fixed two bugs associated with evaluating expressions as conditions


version 2.3 a1
--------------

* merged conditions and expressions - relational operators may now be used
in expressions and the result of a calculation is a valid condition.  The
precedence and associativity is identical to that of C

* implemented partial catches for monitor statements, that is it is possible
to have multiple catch clauses to handle separate events.  This only works
for RCX 2.0.

    monitor(EVENT_MASK(1) + EVENT_MASK(2) + EVENT_MASK(3))
    {
    }
    catch (EVENT_MASK(1))
    {
      // will handle event 1
    }
    catch
    {
      // will handle any other events (2 and 3)
    }

* Added CurrentEvents() to the API.  This returns the enents that triggered
an event handler.  In general, its simpler to just use partial catches and
let the compiler do the work for you.

* Fixed a bug in the definition of DisableOutput

* rcxifile version updated to 1.0.2 (addition of target type)

* __taskid added - this expression returns the number of the task.  Note it
must be possible to determine the task number lexically at compile time for
this to be a valid expression (in other words, don't use it in a subroutine
called from multiple tasks).



version 2.2 r2
--------------


* enabled SetSleepTime() and SleepNow() in Scout API

* fixed a bug in Event()

* allow 16-bit unsigned constants (EVENT_MASK(15) now works)

* ignore ctrl-Z characters (0x1a) in input files

* error added for unterminated comments



version 2.2 r1
--------------

* removed SensorParam() from the API

* added SENSOR_TYPE_NONE to the API

* fixed a bug where CalibrateEvent() used the args in the wrong order

* fixed a bug in the disassembly listing for the chkl opcode

* fixed a bug with the code generation for repeat statments that
  used decvjnl for looping.  The offsets were not computed correctly
  (due to a sign bit) for offsets greater than 127 bytes.

* optimized code generation when __ASM_NO_LOCAL restrictor is used
  with an atomic expression of a restricted source.  Previously,
  the restricted source was moved to a local temp, then a global.  Now
  the restricted source is moved directly to a global temp.  In practice
  this means that AddToDatalog(Message()) takes two opcodes instead of
  three (and dirties one temp instead of two).


version 2.2 b1
--------------

* 'for' statement added

* simple array support for RCX2 added.  You can declare, set, and read
 array elements.  There is currently no support for initializing arrays,
 passing them as arguments, incrementing or decrementing elements with
 ++ and --, or any math assignment such as += or -=.

* SetUserDisplay() and AddToDatalog() now correctly use a global temp
 rather than a local one.  Even so, SetUserDisplay() should be used with
 care - generally a temp is the wrong thing to display!

* Most of the raw serial APIs have been changed slightly.  For the most
 part the change was replacing SerXXX with SerialXXX.

* EVENT_MASK() macro added to help in building event sets

* EVENT_TYPE_MAILBOX changed to EVENT_TYPE_MESSAGE

* Duration() changed to ClickTime()

* Most parameters, such as UpperLimit() now have calls such as 
 SetUpperLimit() to set their value.

* Most of the global output commands were removed due to how confusing
 the whole system was.  There are now only three primitive commands:
 SetGlobalOutput(), SetGlobalDirection() and SetMaxPower().

* Minor changes to Scout calls for setting up the light sensor.  These
 changes make the Scout terminology align with the RCX2 calls.

* Constants for scout events, such as EVENT_1_PRESSED have been added.

* fixed bug that prevented 'continue' from working in a switch nested
 within a loop


version 2.2 a2
--------------

* "#praga reserve" may be used to prevent RCX variables from being used
by NQC.  The syntax is

#pragma reserve start [end]

For example, to reserve locations 0 and 1 (where the RCX2 counters are):

#pragma reserve 0 1


* added SetSleepTime() and SleepNow() to the API

* removed Display() from the API (SetUserDisplay() is sufficient)

* changed SetEvent and event sources...now just specify the source literally:

	SetEvent(0, SENSOR_2, EVENT_TYPE_PRESSED);


* Error checking netsted monitor or acquire statements

* monitor/acquire exits loops and functions correctly

* fixed bug where non-existant handlers could cause a crash

* MonitorStmt properly restricts event sources when generating Scout code


version 2.2 a1
--------------

* rcx1.nqh and rcx2.nqh are no longer supplied in the distribution.  Instead,
they can be generated directly from NQC (which contains ebmedded versions of
these files).  The -api option will cause NQC to emit the appropraite API
file (normally the 2.0 api, unless 1.0 compatability mode has been selected):

	nqc -api

	nqc -1 -api

* Firmware download supports large files (such as the RCX 2.0 firmware).  Also
fixed a bug in fast firmware download.

* modulo operator (%) now supported for non-constant operands

* Preliminary RCX 2.0 API - see the api file for the actual constants and
functions.  Use a target of rcx2  in order to generate RCX 2.0 code.
For example:

	nqc -Trcx2 -d test.nqc

* local variables are utilized when compiling for Scout or RCX 2

* event monitoring is supported with a monitor/catch construct...

	monitor(events)
	{
		// body
	}
	catch
	{
		// handler
	}
	
	'events' is the set of events to watch.  The 'catch' and handler are
	optional.  The body is executed.  If one of the monitored events occur,
	then body will be interrupted and the handler will be executed.   Events
	are only availabe for Scout and RCX 2.

* resource acquisition is supported with acquire/catch construct...

	acquire(resources)
	{
		// body
	}
	catch
	{
		// handler
	}
	
	'resources' is the set of resources to acquire (ACQUIRE_OUT_A, etc) and
	must be a compile-time constant.  An attempt is made to acquire the
	resources.  If sucessful, execution proceeds to the body.  If unsuccessful,
	or if during execution of the body the resources are preempted by another
	task, execution jumps to the handler (if any).  Under normal operation
	resources are released at the conclusion of the body.  Resource acqusition
	is only supported for Scout and RCX 2.


NOTE - event monitoring and resource acquisition are still in preliminary form.
There are a number of unimplemented details...

 - Nesting of monitor and/or acquire statements will almost certainly result
 in programs that don't operate as expected.
 
 - Statments such as break, continue, or return that cause flow control from
 inside a monitor/acquire statement to outside it will not operate properly.



version 2.1 r2
--------------

* disabled duplicate reduction code in rcxlib when sending RCX messages.  This
should only affect people using the rcxlib sources for their own projects - nqc
never directly used this behavior.

* added an error for recursive function calls

* fixed a bug in local variable allocation when one inline function calls a
second one

* orphan subs (those never invoked from any task) are now allowed to allocate
variables from the main task's pool (previously they couldn't allocate any
variables)


version 2.1 r1
--------------

* code generation for repeat() has been improved quite a bit
   - correctly implemented for Scout
   - nested repeats() are now legal
   - the repeat count can be greater than 255
   - the RCX loop counter is used whenever possible (non-nested
     repeat with compile time constant count of 0-255), otherwise
     a temporary variable is claimed to do the repeat.  Note that this
     will break code that used every single variable and then had a repeat
     count that came from a variable.  In previous versions of NQC, the
     repeat would use the built-in loop counter even though the repeat
     count (in the variable) may have exceeded 255.  The current version
     of NQC is more paranoid, and will not use the built-in loop counter
     in this case, thus a temporary variable needs to be allocated.

* total bytecode size is included in the listing


version 2.1 b3 (beta 3)
-----------------------

* Fixed bug where __SCOUT was not defined properly

* Output files now default to being placed in the current directory rather
that next to the source file.

* Trailing directory delimiter (e.g. / for Unix) is now optional with the
-I option.

* For WIN32, command line escaping of quotes (e.g. \") is disabled.  This
is a temporary measure for RcxCC compatability until RcxCC can be updated.


version 2.1 b2 (beta 2)
-----------------------

* Added the NQC_OPTIONS environment variable, which can be used to specify
extra options to be inserted into the command line.  For example, setting
NQC_OPTIONS to "-TScout" would cause nqc to target the Scout by default.

* A 'switch' statement was added. The generated code is reasonably good
considering the limitations of the RCX bytecodes.  However, some optimizations
(such as surpressing a 'break' in the last case) are not implemented [yet].
  
* Expressions are now coerced into conditions where appropriate.  For example,
you can do this:

  int x;
  
  while(x)
  {
  }
  

* Improved Scout support - battery level is checked on download, API file
merged into compiler so "scout.nqh" no longer needs to be included, PlayTone()
now supports both constant and variable argument for frequency.

* Switched over to official Lego mnemonics for those operations listed in the
Scout SDK.  Bytecodes not present on Scout still use the older NQC mnemonics,
but will change eventually.

* __type() operator added.  This is just a nasty low-level hack to
allow an inline function to call two different bytecodes depending on the
type of the argument passed in.  Used for PlayTone() when targeting the Scout.

* fixed a bug introduced in 2.1 b1 that caused problems using include files
with DOS line endings.


version 2.1 b1 (beta 1)
-----------------------

* Added preliminary support for Scout.  See "scout.txt" for more information
on Scout support in NQC.

* Added support for faster firmware downloading.  Firmware will download
about 4 times as fast with this option, but it requires the IR tower to
be in "near" mode.  If you have trouble getting the fast download to work,
please revert to the older (and slower) method.

  Fast:  nqc -firmfast <filename>
  Slow:  nqc -firmware <filename>

* The -o, -e, and -s options have been removed (they were deprecated quite
a while back).  If you still use these options, please change to the -O,
-E, and -S variant.

* The -c option (cybermaster support) has been deprectaed.  NQC now has a
more general option to specify the target: use -TCM for cybermaster:

  nqc -TCM -d test.nqc

Other targets include -TScout and -TRCX (the default).

* A couple of bugs relating to compiling stdin were fixed.



version 2.0.2
-------------

Fixed a bug which caused NQC to crash when compiling programs containing
functions with certain errors in them.


version 2.0.1
-------------

Fixed a bug that caused the compiler to crash when more than 32 variables
were used in a program.

The Win32 version no longer aborts due to serial driver errors - the retry
algorithm will remain in effect.  This makes download of very long programs
much more reliable (especially under WinNT).

The retry algorithm is now more forgiving if the IR tower doesn't echo the
serial data properly.  This makes very long downloads a little more reliable.


version 2.0
-----------

First official release of NQC 2.0