[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question on ProDOS SmartPort drive remapping
glen herrmannsfeldt wrote:
Michael J. Mahon wrote:
(snip)
I loved that more than half the lines of code of the optimizer were
*comments* with math proofs for the various optimizing transforms
being performed. ;-)
Fortran G, written by Digitek, is my favorite--a 1.5-pass FORTRAN
compiler.
And written in some special language (like P-code or JVM code) and
interpreted. The operations are all generated by macros for the
OS/360 assembler.
It was a requirement imposed by IBM that the standard IBM tools
be used to create the compiler, hence OS/360 assembler.
All of Digitek's compilers were produced using the same approach--
they were written on a virtual machine with multiple (32? 64?) stacks
as operands, and the input stream and output (code) stream.
After the compiler was running interpretively, the interpreter
profiled the interpreted code (in the other half of memory), then
the macros were tagged to generate either 1) the interpreted op,
2) a quick linkage to the "execute routine" of the interpreter,
thus saving the fetch and decode overhead, or 3) an in-line
expansion of the execute routine, saving all interpretive
overhead.
Normally, expanding just a few percent of the code resulted in
near native code performance, leading to the smallest, fastest
compilers extant, particularly on small memory machines.
The FORTRAN G (128KB) compiler has a special history. It was
commissioned as FORTRAN E (32KB)(or F (64KB), I forget), but it
ran faster in less memory than the IBM-produced FORTRAN G, so it
was "promoted" to be FORTRAN G--making it the smallest G-level
compiler, by far!
IBM also had a religious committment to the use of the peculiar
3-register setup BXLE op for closing DO loops (which is what it
was designed for). The Digitek compiler used normal ops for DO
loops, usually resulting in smaller, faster code. But, under
contractual pressure, they relented, and every DO loop closing
was replace by a LM (Load Multiple) of the usual 3 registers,
followed by the BXLE--one of the few cases I recall of "protest"
code generation! ;-)
Digitek compilers were very portable, requiring only three
interfaces to the OS: read a line, print a line, and write
a buffer of code.
-michael
NadaPong: Network game demo for Apple II computers!
Home page: http://members.aol.com/MJMahon/
"The wastebasket is our most important design
tool--and it's seriously underused."