     ldnxt     inser
     ldnxt     headr
     *
     * Interphase loader for Fortran compiler
     *
     * Put this at the beginning of each phase:
     *
     *  loadnn  ldnxtentnn,begnn,clrbot,clrtop,clrtop
     *          dcw  @PHASE NAME@  At most ten characters
     *          dcw  @}@           GMWM
     *          org  105      Sorry, this
     *          dsa  200        cant be
     *          ex   loadnn       in the macro
     *
     * Parameters:
     * 1: entry address
     * 2: load address
     * 3: if present, bottom of core to clear, else dont clear
     * 4: if present and 3 is present, top of core to clear,
     *               zero or absent for top of physical core
     * 5: if present and 3 is present, address of DSA for top of
     *               core to clear, overrides parameter 4
     *
               org  )0C&X00
     )7J       equ  *              CLRBOT & X00 - 1                  )0C
               
               org  200
     *
     )00       equ  *&1
               sbr  )1L&6,0&x3     Save X3
               sbr  99,)7J         CLRBOT & X00 -1 to X3             )0C
               sw   1&x3,)0C       cleared means done                )0C
     *                                                               )0C
     * Clear down to clrbot & x00                                    )0C
     *                                                               )0C
               mcw  )0E,*&4                                          )0C
     )0J       cs   0-0                                           )0U)0C
     )0J       cs   )0D                                              )0C
               sbr  )0J&3                                            )0C
               bw   )0J,1&x3       More to be done if still WM       )0C
     *                                                               )0C
     * Now clear down to clrbot the hard way                         )0C
     *                                                               )0C
     )0K       mcw  1&x3,0&x3                                        )0C
               sbr  99                                               )0C
               cw   1&x3                                             )0C
               bw   )0K,)0C                                          )0C
     *
     * Move phase name to 110
     *
               sbr  99,)5L
     )1J       bw   )1K,2&x3
               sbr  99
               b    )1J
     )1K       lca  1&x3,110
     *
     * Load the overlay
     *
     )1L       sbr  99,0-0   Restore saved X3
               sbr  729,)02  Next overlay load address
               sbr  738,)01  Next overlay entry address
               b    711  Overlay loader entry address
     *
     )5L       equ  *
