Trailing-Edge
-
PDP-10 Archives
-
bb-4157j-bm_fortran20_v11_16mt9
-
fortran-compiler/exosup.mac
There are 10 other files named exosup.mac in the archive. Click here to see a list.
TITLE EXOSUP - Compiler execute only support code (TOPS-10)
SUBTTL EGM/EGM
;COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1981, 1987
;ALL RIGHTS RESERVED.
;
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
;ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
;INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
;COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
;OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
;TRANSFERRED.
;
;THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
;AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
;CORPORATION.
;
;DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
;SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
;Author: EGM
INTERN EXOSUV
EXOSUV= BYTE (3)0(9)6(6)0(18)^D2 ; Version Date: 26-Aug-81
TWOSEG
Comment \
***** Begin Revision History *****
1 1047 EGM 21-Jan-81 Q10-05323
Create module for TOPS-10 execute only support.
2 1117 EGM 26-Aug-81 --------
Remove restrictions that the high seg startup routine appear first in
the high seg, and the high seg start at 400000. Also allow high seg
exit/re-entry routines to be called with arguments if needed.
***** End Revision History *****
\
; AC definitions for prolog/epilog.
; Dictated by the BLIS10 module head
; (RESERVE(0,1,2,3),SREG=#17,FREG=#16,VREG=#15,DREGS=4).
; Changes must occur if any of the above change.
; New prologs/epilogs must be added if DREGS increases.
RSVD0==0 ;Reserved register 0
RSVD1==1 ;Reserved register 1
RSVD2==2 ;Reserved register 2
RSVD3==3 ;Reserved register 3
JSPREG==10 ;Temporary register for JSPs
DREG4==11 ;Savable register 4
DREG3==12 ;Savable register 3
DREG2==13 ;Savable register 2
DREG1==14 ;Savable register 1
VREG==15 ;Value register
FREG==16 ;Frame register
SREG==17 ;Stack register
; These prologs/epilogs are used only by the low seg
; and have been created expressly for the ability to run
; the compiler execute only on TOPS-10.
; These routines must reside in the low seg.
; The code has been derived directly from the BLIS10
; prolog/epilog code generated in module GLOBAL.
ENTRY FORI.0,FORO.0
ENTRY FORI.1,FORO.1
ENTRY FORI.2,FORO.2
ENTRY FORI.3,FORO.3
ENTRY FORI.4,FORO.4
; Low segment prologs.
FORI.0: PUSH SREG,FREG
HRRZ FREG,SREG
JRST (JSPREG)
FORI.1: PUSH SREG,FREG
HRRZ FREG,SREG
PUSH SREG,DREG1
JRST (JSPREG)
FORI.2: PUSH SREG,FREG
HRRZ FREG,SREG
PUSH SREG,DREG1
PUSH SREG,DREG2
JRST (JSPREG)
FORI.3: PUSH SREG,FREG
HRRZ FREG,SREG
PUSH SREG,DREG1
PUSH SREG,DREG2
PUSH SREG,DREG3
JRST (JSPREG)
FORI.4: PUSH SREG,FREG
HRRZ FREG,SREG
PUSH SREG,DREG1
PUSH SREG,DREG2
PUSH SREG,DREG3
PUSH SREG,DREG4
JRST (JSPREG)
; Low segment epilogs.
FORO.4: POP SREG,DREG4
FORO.3: POP SREG,DREG3
FORO.2: POP SREG,DREG2
FORO.1: POP SREG,DREG1
FORO.0: POP SREG,FREG
POPJ SREG,
; The following routines setup the proper PORTALs
; to allow calls into and from the high seg.
;[1117] The initial routine (HISEG) must appear at the
;[1117] same location in each high seg.
RELOC 400000
T1==RSVD1 ;Safe register to use for calls/returns
P==SREG ;Common stack pointer
ENTRY HISEG ;Common High seg entry
ENTRY XPHAZCONTROL ;Execute only call to PHAZCONTROL
ENTRY XNXFILG ;Execute only call to NXFILG
EXTERN PHAZCONTROL ;Segment control routine in low seg
EXTERN NXFILG ;Next file spec routine in low seg
INTERN HSGORG ;[1117]High seg origin, set by COMMAN
; The following routine is entered via a PUSHJ P,HISEG.
; It uses the 'safe' AC 1, which is of no value between phases.
HISEG: PORTAL .+1 ;Proper high seg entry
MOVE T1,HSGORG ;[1117]Get high seg origin
HRRZ T1,.JBHSA##(T1) ;[1117]Start address for this segment
JRST @T1 ;And start it
; The following routines allow hi seg exit/re-entry.
;[1117] Note that they will work for calls that pass arguments,
;[1117] since they effectively leave just one PC on the stack.
;[1117] Also note that they are used by all versions of the compiler.
XPHAZC: POP P,SPHAZC ;[1117]Save return address
PUSHJ P,PHAZCO ;Call segment control
PORTAL .+1 ;Proper high seg re-entry
PUSH P,SPHAZC ;[1117]Restore return address
POPJ P, ;Continue
XNXFIL: POP P,SNXFIL ;[1117]Save return address
PUSHJ P,NXFILG ;Call to get next file spec
PORTAL .+1 ;Proper return
PUSH P,SNXFIL ;[1117]Restore return address
POPJ P, ;Onward
RELOC ;[1117]Back to low seg
HSGORG: 0 ;[1117]Origin of high seg
SPHAZC: 0 ;[1117]XPHAZCO return PC
SNXFIL: 0 ;[1117]XNXFIL return PC
END