Path: utzoo!attcan!uunet!ginosko!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!vm.epas.utoronto.ca!MEGGIN From: MEGGIN@vm.epas.utoronto.ca (David) Newsgroups: comp.sys.atari.st Subject: Turbo C, Gulam and the stack Message-ID: <89Oct21.081817edt.57405@ugw.utcs.utoronto.ca> Date: 21 Oct 89 12:14:21 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 13 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