Series 2000 FORTRAN IV

The FORTRAN IV Compiler here runs in Java, but produces EasyCoder assembly language source. The code generated runs the bulk of the FORTRAN program, except for the routines normally included in the "run time" library. The run-time library is implemented in the virtual computer, so that is a bit of a "cheat". However, the generated code is still very authentic, and closely mimics what the FORTRAN program machine code might have looked like. See Virtual Series 2000 Extensions for more on virtual software extensions.

The compiler recognizes some of the job control cards, to customize the results.

Here is a sample program listing and output. And another interesting sample program listing and output showing use of the "*DATA" job card to allow data in a FORTRAN source file to be used as a deck of punch cards ("*ENDATA" terminates reading of cards). This second example also shows the compile option to list Easycoder output, and shows what the generated code looks like.

Currently, only basic features are implemented, and many of those only in their simpler forms. Here is the TODO list:

REAL data types are implemented according to the specifications of the H200/H2000 Scientific Units, even though currently no native floating point instructions are used (except for comparisons). REALs are then stored in a 48-bit (8 character) memory word. Changing precision of REAL is not allowed, and DOUBLE PRECISION is actually the same as REAL.

INTEGER data types default to 3-character precision, however the *JOBID option "I" may be used to change that. Minimum is the address mode (3 or 4).

Address mode may be changed through the *JOBID option "M", by setting the amount of memory to something higher than 32768.

"LIST" enables output of the Easycoder assembler listing option. Note, unlike the original compiler, this is the actual code that will run.

"NOLIST" disables the memory map listing, which would display variables, their Easycode names if different, and memory address (from Easycoder).

"*DUMP" may be used to trigger a memory dump of the program memory after the job terminates (see example output).

The virtual H2000 will present a menu option "FORTRAN" (for compiling and assembling FORTRAN programs) if there exists the JAR file "Fortran4Embedded.jar" on the class path.