News for hackers. Stuff that matters.
Re:Main is usually a function, so when is it not? (2015) by zh3 on Monday June 14, 2021 @03:38PM (#27507232)
More or less how Fortran works on PDP-11's.
Re:Main is usually a function, so when is it not? (2015) by ipython on Monday June 14, 2021 @08:56PM (#27510197)
Curious to hear more!
Re:Main is usually a function, so when is it not? (2015) by fasquoika on Tuesday June 15, 2021 @12:35AM (#27511337)
I'm guessing this is referring to the fact that early versions of Fortran stored return addresses in specific memory locations (at the end of the function definition IIRC) instead of on a call stack. This is why those versions of Fortran couldn't do recursion, because the new return address would overwrite the old one.
Re:Main is usually a function, so when is it not? (2015) by zh3 on Tuesday June 15, 2021 @02:33PM (#27519586)
It seems weird now, but natural at time. Point a register at the data following the call, rely on the caller advancing over the argument and jumping back to the (presumed) code after the data. The stack isn't involved at all...

Edit: found this on the 'net:-

https://retrocomputing.stackexchange.com/questions/9328/does...