2 ms·
I have used this compiler for a few years. At that time I have also disassembled a part of it, but not the compiler executable. I have disassembled the Fortra
by adrian_b 5y ago
I have used this compiler for a few years.
At that time I have also disassembled a part of it, but not the compiler executable.
I have disassembled the Fortran runtime library used by the compiler for generating code.
Disassembling the library was more useful, because I wanted to modify some of the standard functions, e.g. be replacing the multiplication algorithms with faster algorithms.
Because the target CPU for the compiler were the 8-bit processors compatible with Intel 8080, which could perform in a single instruction only very simple operations, the code generated by the F80 compiler consisted mostly in a sequence of function invocations for functions from the runtime library.
Even a 16-bit multiplication or a 32-bit addition were operations complex enough to be done by library functions.
So the runtime library included a set of functions for implementing all the Fortran operators and all the Fortran intrinsic functions, for all the sizes of floating-point numbers or integer numbers, including operators with mixed operand types, e.g. besides functions for multiplying double precision numbers or single precision numbers there were also functions for multiplying a double-precision with a single-precision, or a double precision with a short integer, or a single-precision with a long integer, and so on.
So there were many functions in the runtime library. The reason why separate functions for mixed types were used instead of applying implicit conversions, was that multiplication, divisions and other such operations were very slow on 8080/Z80 (requiring many milliseconds, instead of much less than a nanosecond on modern CPUs). So taking advantage that one of the operands was smaller could make the function faster.