This page (revision-270) was last changed on 26-Mar-2023 02:03 by Administrator 

This page was created on 20-Feb-2010 19:16 by Carsten Strotmann

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
270 26-Mar-2023 02:03 17 KB Administrator to previous
269 26-Mar-2023 02:02 17 KB Administrator to previous | to last
268 26-Mar-2023 02:01 17 KB Administrator to previous | to last
267 26-Mar-2023 02:00 17 KB Administrator to previous | to last ACTION Source Code ==> Action Source Code
266 26-Mar-2023 01:59 17 KB Administrator to previous | to last
265 26-Mar-2023 01:58 17 KB Administrator to previous | to last
264 26-Mar-2023 01:56 17 KB Administrator to previous | to last Remove links to delete manual pages
263 26-Mar-2023 01:22 17 KB Administrator to previous | to last Fix SF links
262 26-Mar-2023 01:21 17 KB Administrator to previous | to last
261 26-Mar-2023 01:18 17 KB Administrator to previous | to last Move manuals to Sourceforge

Page References

Incoming links Outgoing links
Action

Version management

Difference between version and

At line 19 added 28 lines
!Examples
; Hello world in Action! programming language for the Atari 8-Bit computers
PROC Main()
PrintE("Hello World!")
RETURN
The ; is a comment marker, which was a commonly used in assembler. The PROC is the start of a PROCedure, which ends (perhaps oddly) with RETURN. Like C-based languages, execution begins by calling the PROC named "Main". The only line of code in this example is PrintE, which simply prints a string, while the more common PrintF is a formatted print similar to printf in C.
Like assembler, it was common for variables to be specified at a particular address that mapped onto one of the Atari's "shadow registers" that were used to communicate between the hardware and user programs. Here is a simple variation on Hello World that demonstrates this concept, as well as a basic loop:
; Hello world in a loop
PROC Main()
BYTE RTCLOK=20, ; address of system timer
CONSOL=$D01F ; address of the key-pressed register
CARD TIME
RTCLOK=0 ; reset the clock
WHILE CONSOL>6
DO
PRINTE("Hello World!")
OD
TIME = RTCLOK
PRINTF("Ran for: %E %U jiffies",TIME)
RETURN
Note that the definitions of RTCLOK and CONSOL are not setting the values, but stating that they are at those memory locations. The syntax changes when those variables are accessed; the RTCLOK=0 ''does'' set the value of that location. Also notice the syntax of loops, which work similarly to Pascal's BEGIN/END but use DO/OD.