Effectus 0.5: Gury's Action! Cross-Compiler Gets Real CIO and Pointer Support

Windows console showing the Effectus 0.5.5 banner and its list of command-line options

In late June 2020, Gury (Boštjan Gorišek) released Effectus 0.5, a major update to his cross-compiler for the Action! language. Effectus lets you write Action! source on a PC and build an Atari executable without the original cartridge. It translates the Action! code into Mad Pascal, compiles that with Mad Pascal, and assembles the result with MADS, both tools by tebe. The aim is to behave as much like Action! as possible.

What 0.5 changed

The release concentrated on two areas that the old translator handled clumsily.

  • Pointers and arrays. Effectus now uses Mad Pascal's byte-pointer type PByte, so Action!'s free mixing of arrays, pointers and absolute addresses translates much more faithfully.
  • Device I/O through CIO. Instead of mapping Action! I/O onto Pascal file handling, Effectus now calls Mad Pascal's CIO unit directly. Open and Close, PutD/PutDE, the PrintD… family, InputSD/InputMD and the numeric input routines all use it, and there is a new XIO procedure. GetD(7) keyboard reads finally behave correctly. The result is smaller, faster code.

There were also language details: Rand, Peek, PeekC and SCompare can be used inside IF conditions, function results can index BYTE ARRAYs, and CHAR is accepted as a data type. New shell options -z, -zb, -zw and -zp place BYTE, CARD and pointer variables at fixed zero-page addresses from $E0, which matters for speed-critical code. The package bundled Mad Pascal 1.6.4 and MADS 2.1.0, and added zbyti's chessboard and rscroll examples.

Built with the community

Most of the fixes in 0.5 came out of an AtariAge thread for suggestions and bug reports that Gury opened in spring 2020. zbyti in particular fed it a steady stream of benchmark programs, such as a sieve, Monte Carlo pi and the chessboard fill, each with an exact report of how Effectus had mistranslated it. Gury fixed them release by release, and by 0.4.1 some of the test programs already ran faster than the same code compiled by the original Action!. A game called ROTO became the main test suite for new versions.

What came next

Development continued quickly. 0.5.1 added an INCLUDE directive, AND/OR in IF conditions, and renamed the translate-only switch from -nc to -t. 0.5.2, later in 2020, added ASM { } and PAS { } blocks for embedding MADS assembly and Mad Pascal code directly in Effectus programs. The idea came from zbyti, who greeted it with "Action!'s biggest fault removed". Later versions, up to 0.5.6 in August 2024, improved string handling and added targets supported by Mad Pascal, such as the Commodore 64 and C16/Plus 4.

Getting it

Effectus is open source on GitHub (Gury8/effectus, alongside the original repository hosted by Mariusz Buk), and Gury's site gury.atari8.info hosts the Windows console builds, change log and examples. Mad Pascal and MADS are included in the package.

Credits