This page documents changes and updates to the Swordfish compiler
23rd November 2014 - 126.96.36.199
- FIX - Corrected code generation error in for...next loop when using signed integer.
- FIX - Corrected debug address error when using structures in banked RAM.
17th November 2014 - 188.8.131.52
- FIX - Corrected code generation error for inc() operator when working on signed variables.
9th November 2014 - 184.108.40.206
- FIX - Optimised signed shortint math routine when included in subs or functions.
- FIX - Corrected incorrect result for signed byte when one of the operands was a constant.
- FIX - Corrected incorrect FSR1 assignment for string routines when string assignment follows a string comparison.
- FIX - Corrected explorer division by zero.
- FIX - Signed constant bytes were getting resized to 16 bits in when included in expressions in subroutines - this means they were being sign extended. This should now work OK.
2nd May 2014 - 220.127.116.11
- NEW - Rather than store you modules in the UserLibrary, you can now store them within sub-folders contained in your main program area.
- FIX - Missing check for scope when preprocessing "includes".
- FIX - "Interrupt" not being correctly highlighted.
- FIX - Check for online update is now optional. Default is on, to change select VIEW...EDITOR OPTIONS.
- FIX - New ICC (18.104.22.168) which fixes a serious code generation anomaly where incorrect ASM for unsigned constants could be generated on very large programs.
22nd April 2014 - 22.214.171.124
- FIX - Problem with RAM allocation for parameter strings and returns.
23rd January 2014 - 126.96.36.199
- FIX - Problem with user defined RAM banking. This should now work OK.
26th August 2013 - 188.8.131.52
- FIX - Problem when calculating string parameter size for nested sub and function calls. This should now work OK.
10th March 2013 - 184.108.40.206
- FIX - Problem with comparing signed long integer value to constants. This should now work OK.
2nd March 2013 - 220.127.116.11
- FIX - A problem was inadvertently introduced with alias declarations inside structures in version 18.104.22.168 of the compiler. Installing this version will fix the problem.
28th February 2013 - 22.214.171.124
- FIX - Incorrect calculation of alias offset for multiple alias declaration. For example, Dim a,b,c As x. This should now work OK.
- FIX - Problem when using Clear() and SizeOf() when variable is aliased to an array that is inside a structure. This should now work OK.
- FIX - Program crashing when using AddressOf() with undeclared variable. This should now work OK.
- FIX - Problem with inline procedures inside events causing compiler to freeze. This should now work OK.
- FIX - Compiler was incorrectly calculating boundaries between stack and module blocks if the last item in a sub, function or module was a string, array or structure. This should now work OK.
- FIX - Incorrect temporary storage allocation for function string return types if the same named function is used in the same expression - for example, lowercase(a) + lowercase(b). This should now work OK.
- NEW - Added user RAM banking
- NEW - Improved compilation speed on large projects.
1st October 2011 - 126.96.36.199
- FIX - Return variable not being saved when result type is a structure. This should now work OK.
26th August 2011 - 188.8.131.52
- FIX - Problem passing PORT bits by reference, where the bit value is zero. For example, PORTD.0, PORTB.0. This should now work OK.
9th August 2011 - 184.108.40.206
- FIX - Stack error when searching macro includes. This should now work OK.
- FIX - Problems with large constant data sets. This shoud now work OK.
- FIX - Incorrect processing of pre-processor include file if included in pre-processor conditional statement. This should now work OK.
- FIX - Problem with accessing array bit constants. This should now work OK.
- FIX - Fixed error when passing string arrays through multiple sub or function calls. This should now work OK.
- FIX - Large programs generating 'erratic' error messages. This should now work OK.
- FIX - Memory leak in debug (*.cof) module.
- FIX - Corrected module 'circular' referencing for macros.
- FIX - constant data not being written correctly for *.cof file. This should now work OK.
6th July 2011 - 220.127.116.11
- FIX - Problem with back switching for SFRs in upper RAM. This should now work OK.
- FIX - Problem with GetTRIS() and GetLATCH() for devices with non-sequential ports. This should now work OK.
- FIX - Limited floating point constant range. This has now been extended.
- NEW - Added _IsCompilerSE define.
2nd June 2011 - 18.104.22.168
- FIX - Problem with absolute address generation in COFF file. This should now work OK.
- FIX - Problem with ASM code generator for testing. This should now work OK.
- FIX - Added reset bank to beginning of event block.
13th February 2011 - 22.214.171.124
- NEW - Additional support for MPASMWin.exe. If no version of MPASMWin.exe can be found in the default Swordfish BIN folder, the compiler attempts to locate the latest MPASMWin.exe version installed under MPLAB.
9th January 2011 - 126.96.36.199
- FIX - Allowed 'sizeof()' expression to handle '.' notation when used in constant declarations
- FIX - Interrupts not correctly context saving PCLATU. This should now work OK.
- FIX - Interrupts and events not getting correct stack allocation if no sub or function called from main program also changed code to generate a PCLATH context save should any interrupt call an event
- FIX - Problem with muliple include files with macros. This should now work OK.
- FIX - Macro argument replacement now supports constructs such as x.Byte0 where x is the value to replace
- FIX - #if defined() not checking to see if value previously defined. This should now work OK.
3rd October 2010 - 188.8.131.52
- FIX - AddressOf() not moving the full 24 bit address into longword variable. This should now work OK.
- FIX - Corrected comment block with quote problem, introduced in previous version
- NEW - Added CheckParam(Value, options) to support macro construction
30th September 2010 - 184.108.40.206
- FIX - Upper access RAM issues. This should now work OK.
- FIX - Problem when comparing negative floats. This should now work OK.
- FIX - Right shift longword >> longword. This should now work OK.
- FIX - Word = Word - 2048 error. This should now work OK.
- FIX - Word comparison error. This should now work OK.
- FIX - Problem with for loop when INDEX is signed and STEP is constant negative. This should now work OK.
- FIX - Problem with "M-1_U01 not found" found error for bits or boolean declarations. This should now work OK.
- FIX - Problem with string arrays, if any string greater than 70 chars. This should now work OK.
- FIX - 'prototype' declaration error. This should now work OK.
- NEW - This version of the compiler introduces compiler macros. I have released it as a 'working BETA'. That is, everything works OK but I would prefer a little more using testing before it gets an official release. I will be posting some articles on using macros soon - but if you have any questions in the meantime, please feel free to post your questions on the forum.
18th May 2009 - 220.127.116.11
- FIX - Problem with 'system file not found' error for console application in MPLAB IDE. This should now work OK.
1st October 2008 - 18.104.22.168
- FIX - Problem with 16 bit signed multiply. This should now work OK.
18th June 2008 - 22.214.171.124
- NEW - ICD and simulation support through COFF file generation. See here for more information on using ICD in MPLAB.
- NEW - Optimised bit assignments when passed by reference
- NEW - Added support for ORG_RESET and ORG_PROGRAM
- NEW - Added VECTOR_ISR_LO and VECTOR_ISR_HI to enable remapping of interrupt vectors
- NEW - Intermediate Debug File (IDF). Generates *.idf (intermediate debug file).
- NEW - Changed select...case to support 'expression' rather than just 'constant expression'
- NEW - If config wdt = off, clearWDT code for system calls (Delayms etc) is linked in if #option WDT = true
- NEW - You can now associate a *.sfp file with the IDE, which will open the *.bas file named in the project file. Alternatively, you can drag and drop into the IDE
- FIX - Problem assigning a constant to a float array. This should now work OK.
- FIX - Passing structure elements that had been passed by reference not working correctly. This should now work OK.
- FIX - Problems with constant string arrays if the length of each string, including null terminator, is an odd number AND the program accesses one of the string elements using a constant index, for example, Val = ConString(1). This should now work OK...
- FIX - Problem with "M-1" error not found. This should now work OK.
- FIX - Problem when passing certain types of boolean expressions by value to a sub or function. For example, Items(Index).Enabled. This should now work OK.
- FIX - SAVE...RESTORE system allocation problem. This should now work OK.
- FIX - Problem with bound() generating wrong code for constant arrays. This should now work OK.
- FIX - Changes made in optimising explorer broke node sorting when expanding. This should now work OK.
- FIX - Move#II_2424 error. This should now work OK.
- FIX - Corrected compile exception for expression such as AddressOf(a + 1)
- FIX - Code generation error for booleans where variable is on both left and right hand side. For example, a = a or b. This should now work OK.
- FIX - Problem with @ when passing by reference. This should now work OK
- FIX - Strings getting optimised away for expressions such as txt(0) = txt(1). This should now work OK.
- FIX - Problem with expressions such as "A" = Str when used in boolean expressions such as "IF "A" = Str OR..." This should now work OK.
- FIX - Problem with bit expressions when passed by reference. This should now work OK.
- FIX - Access RAM incorrectly set at $80 for 18F4450 and 18F2450. This now corrected
You should view the module source for information regarding changes and fixes.
- Updated USBSystem.bas and USBDefs.bas to synchronise with Microchip firmware version 1.3. 18F2450 and 18F4450 USB now working correctly.
- Updated Convert.bas to workaround ISIS bug
- Updated USART and USART2 modules to account for Microchip silicon error
- Updated SUART module
- Updated Graphics.bas
- Updated FixedFont.bas
2nd October 2007 - 126.96.36.199
Compiler and IDE
- NEW - Optimised code for Input(), Output(), High(), Low() and Toggle() for ports passed by reference.
- NEW - Allow register 'AsChar'.
- NEW - Added union keyword
- NEW - Added new pre-compiler function defined()
- NEW - Allows '0' (nil) to be passed by reference.
- NEW - Can now calculate constant string address, for example @"hello"
- NEW - Can obtain address of structure variables when held in an array. For example, @Nodes(Index).Val
- FIX - Problems with expressions such as MySub(Array(Index).Value - 10) not generating the correct code. This should now work OK.
- FIX -Pre-processor generating error for include file when contained in a block that is disabled. This should now work OK.
- FIX - Problem with expressions such as Value = NOT BitOf(PORT). This should now work OK
- FIX - Problem assigning constant arrays with element 1, 2 or 4. This should now work OK.
- FIX - Added check against errors to prevent exception being generated when trying to generate intermediate code **very rare situation** but noted on the forum
- FIX - constant expressions such as QUOTE_CONST + "Hello" was removing the single quote - this should now work OK.
- FIX - Problems with expression such as Val = NOT CValue where CValue declared as CValue as byte = 1. Negation was being performed on a single bit rather than 8. This should now work OK
- FIX - Problems with expressions such as Str = CStr(Index) + " " where CSTR is a constant arrays of strings. This should now work OK.
14th August 2007 - 188.8.131.52
Compiler and IDE
- NEW - Support for 32 bit code address (using @). Note that the compiler still uses 16 bits when passing by reference.
- NEW - Users can now assign shortcuts to plugins. Right click on the toolbar area and select 'Customise Plugins...'
- NEW - Support for _ProjectVersion, _ProjectVersionStr, _CompilerVersion and _CompilerVersionStr
- NEW - Support for const dereferencing in declarations, for example, const Value = USART.br19200
- NEW - Support for arrays of events
- NEW - Support for array types. For example, TYPE TArray(10) = byte
- NEW - Typed array parameters (byref pArray() as TArray) do not now use runtime passing of bounds and string bounds
- NEW - Support for WITH statement
- NEW - If 'an included' file is equal to the source program filename, then the compiler does not try and link it in and continues searching library folders
- NEW - Added support for 'prototypes', allowing forward declarations.
- NEW - Support for plugin get includes.
- FIX - EEPROM errors not jumping to the correct module. This should now work OK.
- FIX - Exception being generated when calculating address of sub. This should now work OK.
- FIX - Error when passing an array element of TEvent to TEvent param. This should now work OK.
- FIX - Duplicate 'end proc' label generation error. This should now work OK.
- FIX - Inc and Dec not working correctly when value passed by reference. This should now work OK.
- FIX - Problem with for loop corrupting stack. This should now work OK.
- FIX - Array of event and word generating error for overloaded routines. This should now work OK.
- FIX - Explorer window prevents a single prototype item being displayed as 'overloaded'. This should now work OK.
- FIX - Problem passing event pointers to subs and functions. This should now work OK.
- FIX - Expression such as 'const minimum = @SB_SV7' creating exception - this should now work OK.
- FIX - Problem with expression such as Result = Str(0) + Str(1) generating an error - this should now work OK.
- FIX - Type Value = string(n) where error was being generated for dimensioned strings. This should now work OK.
- FIX - Calculation for bit array size was incorrect when passing byref. This should now work OK.
- FIX - Previous for next loop was executing when 'count' was decremented elsewhere, giving a 'list out of bounds'. This should now work OK.
Additional Device Support
18F1230, 18F1330, 18F2423, 18F2458, 18F2523, 18F2553, 18F2685, 18F4423, 18F4458, 18F4523, 18F4553, 18F4682, 18F63J11, 18F63J90, 18F64J11, 18F64J90, 18F65J11, 18F65J50, 18F65J90, 18F66J11, 18F66J16, 18F66J50, 18F66J55, 18F66J60, 18F66J65, 18F67J11, 18F67J50, 18F67J60, 18F83J11, 18F83J90, 18F84J11, 18F84J90, 18F85J11, 18F85J50, 18F85J90, 18F86J11, 18F86J16, 18F86J50, 18F86J55, 18F86J60, 18F86J65, 18F87J11, 18F87J50, 18F87J60, 18F96J60, 18F96J65 and 18F97J60
You should view the module source for information regarding changes and fixes.
- Changes to fonts and S1D15G00 driver to support new x font format.
- Updated LCD.bas
- Updated SPI.bas and SPI2.bas
- Updated USART.bas and USART2.bas
- Updated SUART.bas
- Added Project.bas