ACE BASIC 3.0.1 - Variable Arrays and 68000 Compat
ACE BASIC 3.0.1
A small follow-up to the 3.0 release. Two things worth talking about: variable-sized arrays, and the fact that the compiler itself now runs on a stock 68000.
Variable-Sized Arrays
Until now, DIM required a compile-time constant for the array size:
DIM nums&(100)
That works for fixed-size buffers, but it forces you to either pick a worst-case size or use ALLOC and manage the memory by hand. Version 3.0.1 lifts that restriction. DIM now accepts variables and expressions:
LONGINT n
INPUT "How many entries"; n
DIM nums&(n)
FOR i& = 0 TO n - 1
nums&(i&) = i& * i&
NEXT i&
This also works for multi-dimensional arrays:
LONGINT rows, cols
rows = 8
cols = 12
DIM grid&(rows, cols)
Under the hood, constant-sized arrays still live in BSS as before. Variable-sized arrays are heap-allocated at runtime via ALLOC, with a small header storing the dimension sizes so multi-dimensional indexing keeps working. From the source-code side nothing changes -- you write DIM the way you always did, just with a variable instead of a literal.
68000 Compatibility
The other change is about hardware reach. Starting with version 2.7 the compiler was built for 68020 by default, which meant ACE itself needed at least an A1200 or an accelerator to run. With 3.0.1 the compiler is built for plain 68000 again, so it runs on any Amiga -- a stock A500 included.
The runtime libraries now ship in two variants:
lib/-- 68020 builds (the default)lib/68000/-- 68000 builds (requirevc.lib)
The bas script auxiliary tool looks at your source for OPTION 2- and picks the matching runtime automatically. If your program uses 68020 instructions (OPTION 2+, or the default), it links the 68020 libraries. If you opt out with OPTION 2-, it links the 68000 variants:
OPTION 2-
PRINT "This runs on a stock A500."
The same applies to the bundled tools: yap (the preprocessor) and parseusing are now compiled with OPTION 2-, and there is a 68000 build of vlink as well. So the whole toolchain -- compiler, preprocessor, linker, and runtime -- can be used on a 68000 machine.
If you only target 68020 and up, nothing changes for you. The default is still 68020 code generation, and the default runtime is the 68020 build. The 68000 path is opt-in via OPTION 2-.
Brief Mentions
- YAP macro limit raised to 2048: the preprocessor now handles much larger sets of
#definemacros. - SuperOptimizer v2.28: updated, with a new SuperOptimizer guide in the documentation.
- Bug fix -- math libraries always opened at startup: previously the compiler only opened
mathieeesingbasandmathieeesingtranswhen the main program referenced them. If anEXTERNALmodule used floats or trig but the main program did not, the program would crash on the first math call. Both libraries are now opened unconditionally at startup.
Conclusion
A small release, but a useful one. Variable-sized arrays remove a long-standing limitation of DIM, and 68000 compatibility brings the compiler itself back to every Amiga out there. If you have a stock A500 sitting around, you can now use it to compile ACE programs.
The project lives on GitHub. Bug reports and feature requests are welcome.
-
[ACE BASIC 3.0.1 - Variable Arrays and 68000 Compat]
14-05-2026 -
[ACE BASIC 3.0 - Classes IEEE and More]
02-03-2026 -
[ACE BASIC - Structs RTG and More]
16-02-2026 -
[Developing with AI - Understanding the Context]
13-02-2026 -
[ACE BASIC - Closures MUI and More]
10-02-2026 -
[ACE BASIC - GadTools and More]
31-01-2026 -
[ACE BASIC - AGA Screen Support]
27-01-2026 -
[Polymorphism and Multimethods]
02-03-2023 -
[Global Day of CodeRetreat - recap]
07-11-2022 -
[House automation tooling - Part 4 - Finalized]
01-11-2022 -
[House automation tooling - Part 3 - London-School and Double-Loop]
02-07-2022 -
[Modern Programming]
14-05-2022 -
[House automation tooling - Part 2 - Getting Serial]
21-03-2022 -
[House automation tooling - Part 1 - CL on MacOSX Tiger]
07-03-2022 -
[Common Lisp - Oldie but goldie]
18-12-2021 -
[Functional Programming in (Common) Lisp]
29-05-2021 -
[Patterns - Builder-make our own]
13-03-2021 -
[Patterns - Builder]
24-02-2021 -
[Patterns - Abstract-Factory]
07-02-2021 -
[Lazy-sequences - part 2]
13-01-2021 -
[Lazy-sequences]
07-01-2021 -
[Thoughts about agile software development]
17-11-2020 -
[Test-driven Web application development with Common Lisp]
04-10-2020 -
[Wicket UI in the cluster - the alternative]
09-07-2020 -
[TDD - Mars Rover Kata Outside-in in Common Lisp]
03-05-2020 -
[MVC Web Application with Elixir]
16-02-2020 -
[Creating a HTML domain language in Elixir with macros]
15-02-2020 -
[TDD - Game of Life in Common Lisp]
01-07-2019 -
[TDD - classicist vs. London Style]
27-06-2019 -
[Wicket UI in the cluster - reflection]
10-05-2019 -
[Wicket UI in the Cluster - know how and lessons learned]
29-04-2019 -
[TDD - Mars Rover Kata classicist in Scala]
23-04-2019 -
[Burning your own Amiga ROMs (EPROMs)]
26-01-2019 -
[TDD - Game of Life in Clojure and Emacs]
05-01-2019 -
[TDD - Outside-in with Wicket and Scala-part 2]
24-12-2018 -
[TDD - Outside-in with Wicket and Scala-part 1]
04-12-2018 -
[Floating Point library in m68k Assembler on Amiga]
09-08-2018 -
[Cloning Compact Flash (CF) card for Amiga]
25-12-2017 -
[Writing tests is not the same as writing tests]
08-12-2017 -
[Dependency Injection in Objective-C... sort of]
20-01-2011