Re: [fpc-pascal] Calling function pointer to main program

2020-01-02 Thread Ryan Joseph via fpc-pascal
> On Jan 2, 2020, at 2:51 PM, Sven Barth via fpc-pascal > wrote: > > What exactly are you trying to accomplish on which platform with which > version? > I'm making an iOS platform layer in the style of SDL which needs to use iOS's main loop which never returns until the program stops exec

Re: [fpc-pascal] Calling function pointer to main program

2020-01-02 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Do., 2. Jan. 2020, 18:11: > I need to override the main program function and then call back the main > program later. I know I can use -XM to set another function name besides > "main" but then how do I call back the original function "main" later? > What ex

Re: [fpc-pascal] Calling function pointer to main program

2020-01-02 Thread leledumbo via fpc-pascal
> I know I can use -XM to set another function name besides "main" but then how do I call back the original function "main" later? I quickly analyze the generated assembly when you don't pass -XM: .globl main .type main,@function main: .globl PASCALMAIN .type PASCALMAIN,@fun

[fpc-pascal] Calling function pointer to main program

2020-01-02 Thread Ryan Joseph via fpc-pascal
I need to override the main program function and then call back the main program later. I know I can use -XM to set another function name besides "main" but then how do I call back the original function "main" later? Regards, Ryan Joseph ___ f