Compiler updates

Questions about the BASICtools and MakeItC
basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Compiler updates

Post by basicchip »

The Help files haven't caught up yet and we are still testing a couple new compiler features. We have followed the VB syntax

PARAMARRAY is now supported for calling SUB and FUNCTION

SUB x (PARAMARRAY z)
' you can use z(0) thru z(14) as values here -- z(15) contains the max index of the PARAMARRAY -- always limited to integers and 15 values
ENDSUB

main:

x(1,2,3) 'ok
x(5,6,7,8,9,10) ' also ok

------------------------------------------------

BYREF passing of INTEGER and SINGLE arrays to SUB and FUNCTION

FUNCTION f(z() AS SINGLE) AS SINGLE
return z(0)+z(1)
ENDFUNCTION

main:

DIM zz(10) AS SINGLE
zz(0)=1.111
zz(1)=2.222

print f(zz)
Attachments
ARMbasic.exe
ARMbasic 8.23d compiler
(121.68 KiB) Downloaded 1265 times



basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Compiler updates

Post by basicchip »

The compiler has been updated to allow the deprecated declaration of string$ in function and sub parameters. Much earlier versions of the compiler allowed this, but with the conversion to floating point that changed.

So our regression tests add tests for that and the compiler once again handles

function something(astring$(10))
...

This version also handles sub and functions with no parameters using the form

sub somethingelse()
...

The compiler did not allow () before.
Attachments
ARMbasic.exe
version 8.25f handles deprecated string parameters and no parameter case
(122.18 KiB) Downloaded 1240 times

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Compiler updates

Post by basicchip »

This update covers extensions for LPC4xxx series parts which are being used in some custom designs. If demand drives it they may also become part of the product line.

In addition we found a bug in certain instances of the compiled code for interrupts for the Cortex parts LPC1114, LPC1751 and LPC1756. This has been corrected in this version.
Attachments
ARMbasic.exe
(117.55 KiB) Downloaded 1200 times

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Compiler updates

Post by basicchip »

This version of the compiler improves the compile time evaluation of most constants. Before if the constant was too complex it could get evaluated at run time.

This version also improves the handling of floating point code that also includes integer constants. This improves the performance of the simple test case by 30%. The test case is below

Code: Select all

DIM x as single
x=1000000
while x>0
  x=x-1
loop
For the SuperPRO that gets floating point performance close to 1 MFLOP in BASIC
Attachments
ARMbasic.exe
version 8.27d of the ARM BASIC compiler
(119.73 KiB) Downloaded 1261 times

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Compiler updates

Post by basicchip »

This version of the compiler fixes an introduced bug for the statement

DIR(expression) = expression

We have added tests for that and most other pin functions into the test suite.
ARMbasic.exe
version 9.33a
(129.86 KiB) Downloaded 1411 times

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Compiler updates

Post by basicchip »

We were getting short of opcodes for a while, and that meant some of the obsolete DATA statements shared an index with the new WAITMICRO, and in trying to support both depending on firmware version WAITMICRO got broken.

So for now we don't support the obsolete DATA statements, probably won't again. Version 9.33b fixes WAITMICRO
ARMbasic.exe
version 9.33b
(135.99 KiB) Downloaded 1212 times

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Compiler updates

Post by basicchip »

BASICtools and the ARMbasic compiler have been updated to expand the variable dump debug tools. The code dump now shows all subroutines, and there is a variable address page that can be used to figure out what BYREF pointers are pointing at.

Too big to post here, so best is to download www.coridium.us/files/setupBASIC.exe

It has updated ARMbasic.exe, BASICtools.exe, TclTerm.tcl and numerous updates to the help file.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Compiler updates

Post by basicchip »

Since the last some more optimizations have been added for single arrays. Those are in this version 9.34e of the compiler.
ARMbasic.exe
(135.51 KiB) Downloaded 1372 times

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: Compiler updates

Post by basicchip »

This version tightens up handling of ? which is a special character used by BASICtools to communicate with the ARM PCB and the ARMbasic compiler.

version 9.34f
ARMbasic.exe
(129.88 KiB) Downloaded 1445 times

olzeke51
Posts: 414
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: Compiler updates

Post by olzeke51 »

wow - you got rid of 6k bytes over a "?" !!!

Post Reply