Recent ZBasic Compiler Revision History v3.1.1 - 19 July 2010 -------------------------- - Corrected a VM code generation problem that would occur when referencing an element of an array of structures or objects but only when local to a procedure. v3.1.0 - 09 July 2010 -------------------------- - N.B.: this version requires ZX Library v3.0.6 or later. - Added support for xmega-based devices: ZX-128a1, ZX-32a4, ZX-24x. - Added support for a single-line If statement. - Added missing validation for Option StringSize value. - Corrected a VM code generation error related to early exit from a Select Case block via a GoTo. - Modified the default heap size to be the larger of twice the Flash page size or 512 bytes. v3.0.3 - 07 April 2010 -------------------------- - Added support for Option Com1Speed for VM targets (requires VM v3.0.4 or later). - Added support for Option AtnChar and Register.AtnChar. - Corrected a code generation error for + . - Corrected a native mode code generation error for FixB(). It was generating the same code as for CByte() with a Single argument. - Corrected a native mode code generation problem for Pause() with a Single parameter whose value is not known at compile time. v3.0.2 - 01 March 2010 -------------------------- - Corrected a native mode code generation problem for the timer busy flags, e.g. Register.Timer1Busy. - Corrected an access violation that would occur if the left parenthesis is omitted following the method name in a class definition. - The Protected attribute wasn't being allowed for variables and constants. - Modifed the compiler to suppress the warning for abstract function methods that don't set the return value but aren't invoked. v3.0.1 - 24 February 2010 -------------------------- - Modified the class analysis to avoid generating references to otherwise unused classes. - Corrected native mode code generation for invoking a method of a ByRef member. - Corrected a code generation problem for (f ^ -2) where f is a Single value. v3.0.0 - 01 February 2010 -------------------------- N.B.: This version requires v3.0.0 or later of the ZX Library - Added support for ZBasic Object Extensions - Added support for serial channel flow control via ControlCom(). - Added a new read-only builtins Register.TaskStackMain and Register.TaskStackCurrent. - Added support for including pre-defined structures using "Option Include". - Added support for creating variables with the ByRef attribute. - Added support for the Volatile attribute for structure and class data members. - Added support for optional scaling and offset parameters on the subroutine form of GetADC(). - Added support for Register.TimerIOBusy and Register.TimerUARTBusy, these being synonyms for the corresponding timer busy flags. - Corrected an optimization error that could occur if a variable is aliased by creating a based variable at its address. - Corrected a VM code generation problem related to use of Mid() on the left of an assignment when the target string was a known constant. - Corrected some native mode back-end warnings that occurred when a bounded string or fixed string type was passed to a function. Corrected a back-end warning that occurred with the use of Register.HeapLimit. - Fixed a problem where Option PortPinEncoding wasn't working correctly. v2.8.10 - 30 September 2009 -------------------------- - Modified the VM mode startup code to terminate the main task when Main() returns. - Corrected a native mode code generation problem for Pause() calls. - Corrected batchfile generation problems for builds containing assembly source files. - Corrected a native mode code generation issue with multi-dimensional based variables. - Added an error message indicating the presence of an unrecognized preprocessor control word. - Added a warning for constant floating point values that are Nan, infinity or denormal. - Added code to avoid emitting invalid floating point values such as the above. v2.8.9 - 31 July 2009 -------------------------- - Corrected a native mode code generation problem related to negating a variable having a negative constant value. v2.8.8 - 24 July 2009 -------------------------- - Corrected a native mode code generation problem related to based procedures. v2.8.7 - 16 June 2009 -------------------------- - Added support for the ZX-328nu. - Added support for using #define symbols in Option directives. - Added an overload of DefineX10() to support CM15A AGC functions and added ResetX10() to allow selective resetting of low level X10 status bits. - Added code to detect an attempt to use analog-only pins for digital I/O. This is applicable only for devices that have analog-only pins like C.6 and C.7 on the ZX-32n, ZX-32l and ZX-328nu. - Corrected a native mode build problem when running on 16-bit Windows. - Corrected a problem with using PutBit() with a reference to a register. - Corrected native mode code generation problems related to private Declare statements and Mod with real operands. - Added the command line option --warning-is-error. This will cause the exit code to be 2 if there are no errors but there are warnings. v2.7.0 - 08 April 2009 -------------------------- - Added support for SearchQueue() to allow byte and pattern searches in a queue. - Added support for passing arrays by value (not supported in BasicX mode). When this is done, the array is read-only in the called procedure. - Added code to emit a definition for F_CPU on the back-end build command lines. This allows C and assembly language code to be aware of the operating frequency. - Added support for generating an additional entry point declaration in native code for functions having an Alias attribute. This provides an alternate way to refer to a particular function in C and assembly code. - Corrected a native mode regression related to code generation for passing a variable ByRef when it has a constant value. - Corrected a native mode code generation problem with arrays of BoundedString type. - Corrected code generation problems for accessing structure elements. - Corrected a problem with processing conditionals. The expressions in conditionals in a "no pass" block were erroneously being processed. - Corrected a problem with the value for Flash size on the ZX-328n. - Changed the naming convention in the generated C code for native mode to prevent namespace conflicts. Functions and variables that are private to a module now have the prefix mzf_ or mzv_ while public functions/variables continue to use the prefix zf_ or zv_, respectively. - Corrected a native mode code generation issue with Shr() and Shl(). v2.6.12 - 13 January 2009 ------------------------- - Corrected a problem where a structure member, itself a structure, wasn't being allowed to be passed to a subroutine. - Corrected native mode code generation issues with unreferenced procedures having the Used attribute. v2.6.10 - 09 January 2009 ------------------------- - Added code to detect running on Wine. In this case the back-end build for native mode is handled differently to work around a problem with mingw make on Wine. v2.6.9 - 05 January 2009 ------------------------- - Added support for the ZX-328n. - Added support for GetDayNumber(year, month, day). - Corrected optimization issues with Asc() and StrFind(). - Corrected a problem where procedure attributes weren't being applied correctly. - Corrected a problem with native mode code generated for s.DataAddress when s is a String vector. v2.6.7 - 25 November 2008 ------------------------- - Added support for structure assignment where the structure contains allocated strings. - Added a warning for unused procedures (off by default, --warning+=unused-procedure). - Improved the error recovery for badly formed Enum definitions. - Improved the native code generated for strings passed By Value. - Corrected an internal error that would occur with functions of an unknown type. v2.6.6 - 20 November 2008 ------------------------- - Corrected an optimization problem relating to the use of GoTo statements. v2.6.5 - 19 November 2008 ------------------------- - Added Version.Value and Version.String built-in constants. - Added support for an optional second parameter on GetElapsedMicroTime(). - Added missing Xor operator support in conditional expressions. - Corrected a problem evaluating conditional expressions like "Not A And Not B". - Corrected an access violation that could occur with an incrementing reference to an undefined structure member. v2.6.4 - 13 October 2008 ------------------------- - Added routines to support higher resolution timing. - Added detection for using a too-small buffer with SerialNumber() and System.DeviceID(). - Corrected some optimization problems with conditionals and a native mode code generation error for StatusQueue(). - Fixed a native mode stack use indeterminacy problem when routines used LongJmp(). - Corrected native mode code generation issues related to complementing 8-bit values, boolean expression evaluation, and a possible access violation. - Corrected a problem where a structure member was not being allowed to be passed by reference. v2.6.1 - 22 September 2008 ------------------------- - Corrected a native mode code generation problem that could occur in conditional expressions involving conjunction or disjunction of two or more conditional expressions. v2.6.0 - 15 September 2008 ------------------------- - Added support for using built-in functions and pin numbers (e.g. C.0) in conditional expressions (#if, etc.). - Added support for using @ preceding an identifier as a synonym for .CodeAddress or .DataAddress. - Added missing error detection for when a public function is of the type of a private structure or enumeration. - Modified the input reader to correctly handle old-style Macintosh EOL (carriage return only). - Corrected an optimization problem with For loops when the start value derived from a negative integer Const value. - Corrected a code generation problem with decrementing a return value. - Fixed an access violation that occurred when .CodeAddress was used with a non-procedure. v2.5.9 - 14 August 2008 ------------------------- - Modified the RAM usage analysis to include the heap reserve when the Main() task stack size is specified. - Added support for Option HeapReserve to allow better fine tuning of RAM use. - Corrected Register.RamStart for native mode. - Corrected a problem where a non-constant value for a Const was not being detected. v2.5.8 - 10 August 2008 ------------------------- - Added support for PortMask(), Register.Port(), Register.DDR() and Register.Pin(). - Added support for a mechanism (#pragma CallTargets) to provide the compiler with call target information for based procedures so that it can correctly compute task stack size when a called procedure uses a based procedure. - Corrected native mode code generation problems for based procedures, initialization of arrays of structures containing String members, and initialized ProgMem data items containing code and data item addresses. - Corrected a problem where procedure declarations (external or based) were not being allowed inside a procedure. - Modified the task stack size process for VM mode to correctly identify the invocation of based procedures as introducing indeterminacy in the absence of user-supplied call target information. v2.5.7 - 01 August 2008 ------------------------- - Corrected a native mode code generation problem for PulseOut() with a non-constant Single duration parameter. - Corrected a native mode code generation problem that occurred when invoking a task with constant 32-bit parameters (e.g. Single, UnsignedLong) when the high 16 bits were zero. - Modified the native mode code generation to not produce interrupt protected access to 16-bit registers (e.g. Register.TCNT1) inside an ISR or inside an Atomic block. In both cases, interrupts are already turned off. v2.5.6 - 21 July 2008 ------------------------- - Added task stack size computation for native mode. - Added an error message for native mode when code size exceeds the available space. - Corrected a native mode code generation error for RamPoke() and related routines. - Corrected an internal error that occurred when an unused variable has an initializer. v2.5.5 - 09 July 2008 ------------------------- - Added support for 8-bit PWM routines. - Added support for an optional parameter on all PWM routines to return a success/failure indicator. v2.5.4 - 07 July 2008 ------------------------- - Corrected a problem where too many ISRs were included for WaitForInterrupt(). v2.5.3 - 04 July 2008 ------------------------- - Modified the type checking to allow conversion functions like CByte(), CInt(), CUInt(), etc. to take a Boolean parameter as documented. - Corrected a VM code generation for CBit() with a constant string parameter with optimization off. - Corrected a VM code generation problem for CNibble() with a string parameter. - Added support for pins B.4 to B.7 for Oak Micros native mode devices with SPI EEPROM. v2.5.0 - 16 June 2008 ------------------------- - Added OpenI2CSlave(), OpenSPISlave() and CloseSPI(). - Added an optional fourth parameter to OpenSPI() to regulate receive timing. - Added support for GetQueueSpace(). - Added support for "raw" initialization data for Program Memory data items using Attribute(raw). The initialization file should contain the raw binary data. - Corrected a false warning regarding the state of initialized variables. - Corrected a problem with a missing temp variable for a string parameter. - Corrected a VM code generation problem for IIF() with a Boolean result. - Corrected a native mode code generation problem with a For loop having a negative step. - Corrected a native code generation problem with an empty If statement. v2.4.5 - 14 April 2008 ------------------------- - Corrected a problem where a Boolean parameter to a task resulted in an internal error. v2.4.4 - 08 April 2008 ------------------------- - Added Option.ExtRamAble constant to indicate if external RAM is supported. - Added support for the defined() operator in conditional expressions. - Corrected a problem with port configuration directives. - Corrected a native code generation problem for ZXCmdMode(). v2.4.3 - 17 March 2008 ------------------------- - Added the ability to build native-mode libraries. v2.4.2 - 11 March 2008 ------------------------- - Corrected an initialization problem that sometimes caused a false error message about the application consuming all available memory. v2.4.1 - 10 March 2008 ------------------------- - Added support for native mode devices. - Added out-of-range warnings for Delay() and Sleep(). - Added support for defining Enum constants. - Added support for Based procedures. - Added support for default parameter values in procedures. - Added optional support for conditionals in project and argument files. - Added support for enabling/disabling warning messages in the source code. - Added support for automatic value-to-string conversion for the & operator and Debug.Print. - Added support for using the operator + for strings like operator &. - Added missing port constants for ports H, J, K, and L. - Fixed a problem with LCase() when it had a constant parameter. - Fixed an access violation related to use of While..Wend. v2.2.1 - 30 August 2007 ------------------------- - Fixed an access violation that occurred when invoking a Sub as if it were a Function. - Added support for structure assignment from/to a function's return value and parameters. v2.2.0 - 26 August 2007 ------------------------- - Added support for StrReplace(), ValueI() and ValueL(). - Added support for CSng(), CInt(), CLng(), et al to take a string argument. - Added support for the ZX-1280. - Added support for defining a "Persistent String" type which results in a Persistent BoundedString of the default length. - Added pin parameter validation for InputCaptureEx(). - Added array bounds checking for structure member references. - Added a check for exceeding the available Persistent space for the target device. - Added Register.FirstTime (read-only). - Added Register.PRR for the mega644-based devices. - Modified the parameter checking for WaitForInterrupt() to ignore the "internal reference" bit for the analog compare interrupt. - Fixed a problem in validating pin parameters for InputCaptureEx() and GetADC() expressed in the port/bit form and WaitForInterrupt() intNum values. - Fixed an internal error that occurred when a non-existent file was specified with the .Source initialization method. - Fixed a problem with code generated for comparing structure members. - Fixed a problem where InputCaptureEx() wasn't allowed on mega32- and mega644-based devices. - Fixed a problem where an erroneous warning was being issued about possible use of an uninitialized variable. - Corrected the constant value for CStrHex(b) where b is True. - Fixed a problem where Option Base had no effect. - Fixed an access violation due to a syntax error in concatenation of constant strings. - Corrected a problem relating to defining an array of Persistent BoundedString. - Corrected an internal error related to processing concatenation of constant strings. - Fixed a code generation problem with PWM() having a real literal second parameter. - Fixed a problem where a missing array dimension on BoundedString types was not detected. - Fixed a problem where an array dimension was erroneously being required on a Based structure. - Fixed a problem with WaitForInterrupt() parameter validation. v2.1.0 - 22 February 2007 ------------------------- - Added support for the ZX-1281, ZX-128e and ZX-1281e. - Added support for Option RamSize, Option HeapSize and Option ExtRamConfig. - Fixed an unusual code generation problem where code was omitted that initialized a variable but the value was later used.