GFXCALL
function: call Graphics library
result=Gfxcall(function offset)
This executes a function directly from the Graphics library, taking the parameters from the DREG and AREG arrays. The function offset parameter enters the offset to the function you wish to call, and can also be set using the LVO function, if required.
INTCALL
function: call Intuition library
result=Intcall(function offset)
The INTCALL function calls a command directly from the Intuition library. Before using this function, it is vital to load the appropriate control parameters into the registers D0 to D7 and A0 to A3. This can be done with the AREG and DREG variables from an AMOS Professional program. When the function has been executed, the contents of D0 will be returned back to your program as the result. Please note that this function is particularly dangerous, unless you are familiar with the Intuition library.
Equates and Offsets
Experienced programmers of C or Assembler languages will be used to calling most library
functions directly, by name. These names are converted invisibly into the appropriate offset
values when a program is compiled into machine code. Unfortunately, this technique only
works with compiled languages. AMOS Professional in an interpreted language, and so a
slightly different system has been adopted.
An "equate" is simply a library function name converted to its internal equivalent. Instead of supplying the usual Include files, equates have been placed in the "AMOSPro.System_Equate" file in your "AMOSProSystem" folder. The first time a program is tested, the names are converted into their internal equivalents by AMOS Professional. Each name is translated into a single value, which is then saved into a permanent memory bank, ready for instant use.
As you would expect from AMOS Professional, the entire process is completely automatic. Simply define a memory bank for your equates, and use the LVO, EQU or STRUC functions (explained below) to return the relevant offset values. Everything else is handled by AMOS Professional.
SET EQUATE BANK
instruction: set up the automatic equate system
Set Equate Bank bank number
This command allocates a memory bank for use by the automatic equate system. It should be called up before the first equate in your program, preferably near the beginning. Specify the bank number to be used for your equates, ranging from 1 to 65535. Any existing bank of the same number will be erased when the equates are installed in memory, without warning, so take care!