[comp.sys.atari.st] Turbo C, Gulam and the stack

MEGGIN@vm.epas.utoronto.ca (David) (10/21/89)

Turbo C does use the stack strangely, but you can force a function to
use a normal ST stack with the keyword `cdecl' (also found in MSC and TC
on the IBM).  For example, if you are trying to call Gulam from TC, use
a prototype for the function pointer like this:

       int cdecl (*sysptr)(char * cmdline);

Then, whenever you call (*sysptr)(), it will place its argument on the
regular stack.  Remember to get the value of sysptr from SHELL_P, and
that SHELL_P is in protected memory, so you will have to go into
supervisor mode to look at it.

          David Megginson, Centre for Medieval Studies, Toronto