     ldnxt     headr
     *                                                               
     * Interphase loader for Fortran compiler                        
     *                                                               
     * Put this at the beginning of each phase:                      
     *                                                               
     *  loadnn  ldnxtentnn,begnn,clrbot,clrtop,clrtop,phsnam         
     *          ex   loadnn       cannot be in the macro                       
     *                                                               
     * Parameters:
     * )01: entry address                                            )0A
     * )02: load address                                             )0A         
     * )02: entry address and load address                           )0/
     * )03: bottom of core to clear, else do not clear               )0C
     * )04: top of core to clear, zero or absent               )0C)0D)0V
     *      for top of physical core                           )0C)0D)0V
     * )05: address of DSA for top of core to clear               )0C)0E
     *      overrides )04                                         )0C)0E
     * )06: phase name
     * )07: sense switch for snapshot                                )0G
     *
               org  200
     *
     )00       equ  *&1
               bss  snapsh,)0G
               sbr  )1L&6,0&x3     Save X3
               sbr  99,)0C&99      CLRBOT & X00 -1 to X3             )0C
               mn   )7J,99         00 to bottom digits of x3         )0C
               mcw
               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
     *                                                               )0F
     * Move phase name to phasid                                     )0F
     *                                                               )0F
               lca  )3M,phasid  Now move the phase ID                )0F
     *
     * Load the overlay
     *
     )1L       sbr  99,0-0   Restore saved X3
               sbr  tpread&6,)02  Next overlay load address
               sbr  tpexit&3,)0A  Next overlay entry address
               sbr  tpexit&3      Next overlay entry address         )0/
               cs   )4N,299       Clear some of the this loader
     *
     )3M       dcw  @)0F@
               org  323
     )4N       cs   cdovly,332    Overlay loader entry address
     )7J       dcw  00
               dcw  @}@        GMWM
