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 28 changed one line
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. In Action!, the last PROC in the program is the one that runs first, in this case "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.
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}}. In Action!, the last {{PROC}} in the program is the one that runs first, in this case "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.
At line 48 changed one line
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.
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}}.
At line 50 added 2 lines
There is a clever trick in this code. Note that {{RTCLOK}} is defined as a {{BYTE}} but {{TIME}} is defined as a {{CARD}}, a 16-bit value. This is because the clock value is stored in three bytes, 18, 19 and 20. By defining {{TIME}} as a {{CARD}}, when that value is read it automatically reads two bytes, thereby getting a value from both 20 and 19, which provides a value from 0 to 65535 jiffies, about 36 minutes. This is much easier than doing the math in the code.