News for hackers. Stuff that matters.
Re:Why did Turbo Pascal apps fail with a division-by-zero on... by aflag on Saturday August 24, 2019 @03:00PM (#20789020)
Yes, I meant referenced in the code, not necessarily called during execution. It makes sense to do it in the beginning if delay is referenced. I guess it was just a small optimization that they decided to do without then.
Re:Why did Turbo Pascal apps fail with a division-by-zero on... by bonzini on Saturday August 24, 2019 @05:33PM (#20789843)
The loop was in the initialization code of the unit, and the initialization code was monolithic and triggered simply by the "uses crt" statement.
Re:Why did Turbo Pascal apps fail with a division-by-zero on... by ksherlock on Saturday August 24, 2019 @05:32PM (#20789837)
Nowadays with modern linkers, your delay function could have a strong reference to a delay init constructor which would get dragged in, as needed, and run at program start up time.