Parrot speed

The launch of the ancient Pascal program ended in "division by zero." Everyone swore that no one had touched or retransmitted this program for ten years. And the date of the EXE file confirmed this.





What else can there be division by zero? I had to arm myself with the ancient debugger and analyze the actions of the program.





Two things came to light.





. . : « », .. DX:AX CX 16 . , x86 , «» . , .





. ( ) , . .. .





. . « » ( ), , . , IBM-PC/XT. , « », .. « ».





. . , , , « XT» ThinkPad A31p. XT 65535 , .





I had to "bite out" this stupid division right in the EXE file. By the way, out of curiosity, I divided these two numbers on a "calculator" and got an acceleration relative to XT by 118351 times. Those. for conventional computers available to all, this acceleration was achieved from about 1981 to 2002. Not bad. And the speed "in parrots" is still better not to measure.





PS This problem of ancient Pascal programs has long been known and solved long ago. But I noticed that most programmers never thought about why it happened.








All Articles