|
|
|
|
|
by LorenPechtel
22 days ago
|
|
Turbo Pascal, the CRT module upon initialization ran a loop for one clock tick in order to find out how many times it had to spin the loop to produce 1 millisecond of delay. At about 200 Mhz CPU speed this got too big and caused a divide underflow error which got reported at a division by zero. Solutions were not using the CRT module, editing the binary code in the module (which would either clobber or miscalibrate the whole Delay calculation--since you were limited to overwriting existing bytes there wasn't space to fix it properly), or monkey patching by means of a module that loaded earlier in the chain (which was not limited to being no bigger than the original and thus could allow Delay to function correctly.) |
|