Going into Action! with Atari XL/XE – Part 4 – Using VSCode and Action! with syntax highlighting

I am a bit late in this 4th part of the Going into Action! series, where I write about Action! while I am still learning about it. It is almost like some of my teachers in college back in the day! It’s been a slow process, although I am working hard to bring more meaningful programs in Action! for us to learn together.

During this whole process, my first thought was to be as purist as possible, using the Atari (or emulator) to do all the development workflow, from editing the source code to compiling and testing. However, I think the Action editor holds up pretty well in terms of power and speed, even by today’s standards. The Atari can only show only 40 columns makes it really hard for me to visualize my code better, mostly when I am trying to debug something. The editor does let you scroll right to see more columns, and again, it is pretty fast, but it is not ideal.

Excellent editor but not enough columns!

After listening to ?Next without For episode 4, where Earl Evans and Randy Kindig were talking whether using modern resources to develop for old machines was cheating. Earl mentioned that even back in the 80s, many software houses would develop using mini-computers and cross-compile for the 8-bit targets. That practice is no different than editing (or even compiling) your software on a modern computer. I thought he was right, and me insisting on using Action! editor would only make things harder for no reason.

Update: A good reference about this practice can be read in the free book It’s behind you by Bob Pape (page 63). Thanks Atariage zbyti user for the reminder.

Armed with this new vision, I decided to do the same while developing for Action! For now, my focus is to be able to use a better editor but still compile the code using the Atari and the Action! Cartridge. I know we are getting closer to truly have a cross-development environment using the language Effectus. Still, this initiative doesn’t support every single aspect of the original Action! language. In any case, I plan to explore this alternative soon.

Visual Studio Code

There are many excellent code editors out there, and I will not try to convince you to use one or another (unless you are an EMACS user – in this case, please, give up!). In my case, I select Microsoft VSCode since it is the editor I am already used to work with on my daily job.

My development environment will be far from perfect, and it will be restricted in editing the code in VSCode and saving on a hard drive folder so the emulator running Action! can compile it right away. I will be manually issuing the compile command for now.

VSCode has a marketplace where you can download extensions that will add new features to the editor as you need. Pretty much any major editor out there has something similar. My first thought was, “It wouldn’t be nice if VSCode has a syntax highlighting for Action! already? After searching, I could find syntax highlighting extensions for many retro computing languages like ZX Spectrum Basic, and many 8-bits assemblers, like the 6502 MADS, well-known by the Atari community, but no sigh of an extension for Action!…

After considering my options, I decided that if I can find it, I should create one myself.

After considering my options, I decided that I should create one myself if I can’t find it. The shortest path to do that was to base on something similar enough to learn as I go. I picked the ZX-Basic extensions just because it was the first that I found that it was simple enough to understand and modify. After one evening of changing things here and there, collecting Action! Keywords and function names and fighting with the most obscure technology in the history of software development, regular expressions, I manage to create a syntax highlighting extension for the OSS Action! Language.

Besides the usual use of different colours for functions, keywords, constants and operators, the VSCode extension engine (based on Textmate) also allowed me to include the ability to visually show the start and end of code blocks, delimited by DO…OD and IF…FI.


If you want to try it yourself, download VSCode for your OS here. After installing it, open the editor and select the menu option View->Command Palette and then look for the option Extensions: Install Extensions. You will see then the Extension Marketplace interface and a search bar at the top on the left side. There, type ossaction. Selecting the only match containing the iconic yellow and blue logo, you will see the Extension installation window:

Click the Install button, and in a split-second, the extension will be ready to use. For obvious reasons, VSCode will use the extension syntax highlight automatically when you create or open a file with the extension ACT. In the example below, I opened the Amazing Game found in https://atariwiki.org/wiki/Wiki.jsp?page=Game%20AMAZING%20in%20ACTION.

The extension is in its first version, so some problems are expected, but nothing more than the wrong colour somewhere. Nothing that will prevent you from using it. If you find anything, feel free to report at the extension repository on Github: https://github.com/pedgarcia/ossaction-vscode.

Every FI has its IF!

Editor in Action (pun never gets old)

I hope this part is not too underwhelming, since I am far from a efficient IDE, but at least I feel like the modern editor will increase my coding efficiency.

The idea is to use Action! as a cartridge in the emulator and in the emulator’s configuration, assign a folder in my host machine as the Atari hard drive.

I use Atari800MacX, but all the other emulators will have similar option

The next step will be to create my test program in VSCode and saving it on that folder.

Now I can jump on the emulator and fire the Action! Monitor. To compile the code saved on that folder, I have to refer to the hard drive H6. This still refers to the first hard drive, but ensure Action! can properly read the file using the “modern” newline character instead of the ATASCII one.

If no errors were found, just execute the resulting binary, typing R!

Of course, for a small program like this we should stick with Action!’s built-in editor, but as the code grows, a fully-featured modern editor will help us coding faster!

There is still the fact that I have to move from one window to the other to compile and test the program, but at least now I can visualize more than 40 columns and 25 lines! When using my huge monitor, the development environment using this simple solution is all I need for now.

How about a true IDE

VSCode and all mainstream code editors allow you to extend its build capabilities and call external programs. Many assemblers are already using this feature, but in a sense, it is easier there since the compilation is done in the host and not in the emulated Atari, which is the case with Action!.

I am still researching options to call the emulator and issue a compile and/or run the command directly from the editor. Still, I would likely change the emulator code to accept commands as parameters for this to work. The closest to provide such functionality is MAME.

A half-way good solution used by the Atariage user zbyti is to save a snapshot at the monitor screen with the compiler command already typed. The limitation is that the file name has to be always the same, which is pretty good if you are testing things.

Author: Paulo Garcia

8 thoughts on “Going into Action! with Atari XL/XE – Part 4 – Using VSCode and Action! with syntax highlighting

  1. Paulo, this is excellent! Your article let me want to learn Action! better. And I could imagine that it would be great for other popular Atari languages like Turbo BASIC XL and the new fantastic Fast BASIC.

    1. Thanks! Yes, it would be nice! Maybe after I get better at Action! I might give a try with other languages for the Atari!

  2. Hello,
    Great tutorial !
    I’m looking at Action! and I would like to use VSCode too, but I can’t read the .act files from Altirra…
    Could you please tell us how you solved the problem of text encoding?

Leave a Reply

Your email address will not be published. Required fields are marked *