Topic : The GFA-Basic Compendium
Author : GFA Systemtechnik GmbH
Version : GFABasic.HYP v2.98 (12/31/2023)
Subject : Documentation/Programming
Nodes : 899
Index Size : 28056
HCP-Version : 3
Compiled on : Atari
@charset : atarist
@lang :
@default : Document not found
@help : Help
@options : +g -i -s +z
@width : 75
@hostname : STRNGSRV
@hostname : CAB
@hostname : HIGHWIRE
@hostname : THING
View Ref-FileIn larger programs it is generally necessary to avoid using PC-related calls.
In Turbo C, this can be avoided with the -P compiler option.
The C routines must not alter the registers A3 to A6, or expect particular
values from them. Turbo C and C conform with this requirement, but Megamax
C, for example, does not. C programs have about 4 kb available for the stack.
Memo: The following was taken from the amiga version of the manual:
You may require an assembler interface like:
name: movem.l a3-a6,regsave
jsr c_name
movem.l regsave,a3-a6
rts
regsave: ds.l 4
You may then need to employ an extra dummy parameter in your C routine, to
mask the return address of 'jsr c_name'. For example:
name (long x, long y)
c_name(long dummy, long x, long y)