RTF/68K

Real-Time Fortran 77 for 68K Processors
Manual of Compiler and Run-Time Library
with an Appendix for OS-9

(Version 5.3)

H. von der Schmitt
Physikalisches Institut
Universität Heidelberg
January 28, 1993




Record of changes

Released VersionChanges to former Version
October 25, 1983 1.0
December 20, 19831.6 Last update of versions 1.x
December 15, 19872.18 Last update of versions 2.x
December 21, 19893.4 Last update to versions 3.x; 4.x skipped.
January 5, 1990 5.0 Improved code for 68020/30 indirect addressing and indexing.
March 9, 1990 5.1 Bug fixes to that; OS-9 runtime library to contain V2.3 system calls.
March 21, 1990 5.2 Bug in negative variable loop step corrected.
NORD style $INCLUDE and CERN style debug stack frame no longer supported.
FSAVE/FRESTORE instead of FMOVEM used in interrupt routines.
INTERRUPT and EVENTFLAG must now be first declaration.
OS-9 runtime library: free-format input must now satisfy all.
I/O list elements instead of filling the rest with 0.
November 2, 1991 5.3 Updates to manual.
DOUBLE PRECISION is now supported by the RTF compiler.
OS-9: INCLUDE files inherit the soure file's path (unless starting with a /).
JBIT, SBIT added. Optimised code for MOV_L, UCOPY etc.
Parameter SIZE=... accepted in OPEN.
Keywords BREAK and NEXT added for loop control.
Global variable IOSTATUS introduced (OS-9).
Added standard function ERF (single precision error integral) for OS-9.
Added some more bit handling functions and the possibility to use a macro preprocessor (OS-9).
Added system calls F_Permit, F_Protect for memory protect systems (OS-9).
Option NOP=ON added for 68040 synchronization before MOVEM.
Removed obsolete floating point options.
January 28, 1993 still 5.3RTFLIB supports DOUBLE PRECISION I/O now. Updates and corrections to this manual.




Contents

  1. RTF/68K at a glance
    1. Implementation and availability
    2. Syntax
    3. Why Fortran with memory-mapped I/O
  2. The compiler
    1. Source format
    2. Constants
    3. Data types
    4. Declarations
      1. Global and local declarations
      2. PARAMETER declarations
      3. Data type declarations
      4. DIMENSION declarations
      5. COMMON declarations
      6. SAVE declarations
      7. EQUIVALENCE declarations
      8. EXTERNAL declarations
      9. DATA statements
      10. INCLUDE directive
      11. Pointers
      12. RECORD declarations
      13. INDIRECT and TEMPLATE declarations
    5. Subroutines and functions
      1. General overview
      2. Stack assignment during calls
      3. ENTRY specification
      4. ASSEMBLER entry specification
      5. Statement functions
      6. Intrinsic functions and subroutines
      7. Obtaining the actual number of arguments
      8. KEEP directive
      9. INTERRUPT and EVENTFLAG directives
      10. CPU time required for subroutine calls
      11. Type conversions for integer arguments
    6. Other language elements
      1. Arithmetic, logical, and character string expressions
      2. Assignment statements
      3. Label and variable ASSIGN statements
      4. DO loops
      5. IF statements
      6. GOTO statements
      7. Input/output statements
      8. PRIORITY statement
      9. CACHECONTROL statement
    7. Use of pointers, registers, and absolute addresses
      1. Subroutine arguments as an example and comparison with C
      2. Obtaining and changing addresses
      3. RECORDs and pointer-based COMMON blocks
      4. Dynamic storage allocation
      5. EQUIVALENCE with formal arguments
      6. Dynamic equivalence with ASSIGN
      7. How to use registers
      8. Autoincrement/decrement addressing
      9. How to use absolute addresses
    8. Output from the compiler
    9. Compiler directives
    10. Compilation error messages and warnings
  3. The run-time library
    1. Main features
    2. Details of specific routines
      1. Floating point arithmetic
        1. Software emulation for the MC68881/68882 coprocessor
        2. Other 68020 emulations on the 68000
      2. Input/output package
      3. Dynamic interrupt handling
      4. CAMAC address function
  4. Appendix
    1. OS-9 system calls from RTF
    2. Other RTF library calls
    3. Error handling utilities for OS-9
    4. Using RTF under OS-9
    5. RTF programming techniques under OS-9
    6. RTF exit codes for OS-9
    7. Release notes: RTF versions 3.n and 5.n for OS-9