Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_SRC_1_19910112 - 5-galaxy/glxots.mac
There are 31 other files named glxots.mac in the archive. Click here to see a list.
	TITLE GLXOTS - Primary Module for GALAXY Runtime System
	SUBTTL	Preliminaries

;
;
;	COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION
;	1975,1976,1977,1978,1979,1980,1981,1982,1983,1984
;
;     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.

	SEARCH	GLXMAC			;LOAD COMMON DEFINITIONS
	PROLOG(GLXOTS,OTS)		;

	OTSMAN==:7			;Maintenance edit number
	OTSDEV==:12			;Development edit number
	VERSIN (OTS)			;Generate edit number

;The purpose of this module is to provide a common access mechanism
;	for the GALAXY object time system. When the library is loaded correctly
;	this module starts at location VORG, defined in GLXMAC.
;	The only code in this module is the library dispatch vector
;	which is used to find routines and variables in the library.
;

; In the case of the library being loaded as a .REL file,
;	this module generates no code, since there is no need for an
;	dispatch vector
	SUBTTL	Table of Contents


;		Table of Contents for GLXOTS
;
;
;			   Section			      Page
;   1. Preliminaries. . . . . . . . . . . . . . . . . . . . .    1
;   2. Table of Contents. . . . . . . . . . . . . . . . . . .    2
;   3. Revision history . . . . . . . . . . . . . . . . . . .    3
;   4. Check for neccessity of this module. . . . . . . . . .    4
;   5. Library Dispatch Vector. . . . . . . . . . . . . . . .    5
;   6. Object Time System
;        6.1.   Initial startup . . . . . . . . . . . . . . .    6
;        6.2.   Data page creation. . . . . . . . . . . . . .    7
;   7. End. . . . . . . . . . . . . . . . . . . . . . . . . .    8
SUBTTL	Revision history


COMMENT	\

7			4/6/81
	Add "start address" for beginning of dispatch table.

*****  Release 4.2 -- begin maintenance edits  *****

*****  Release 5.0 -- begin development edits  *****

12	5.1002		28-Dec-82
	Move to new development area.  Clean up edit organization.  Update TOC.

\   ;End of Revision History
SUBTTL	Check for neccessity of this module

;Since GLXOTS is the first module loaded, define the start of the data space

	$GDATA	D%BEG,0			;First location in the data pages
	$DATA	OTSDAT,0		;Dummy data slot for OTS
SUBTTL Library Dispatch Vector


; This vector is used by all non-OTS modules to dispatch to the
; proper routines in the OTS.
;
IFN GLXPURE,<				;;IF OTS
DEFINE	CDO	(X),<			;;MACRO TO DEFINE ENTRY POINTS
	IFB	<X>,<PORTAL  .UNRTN>	;;UNIMPLEMENTED ROUTINES
	IFNB	<X>,<			;;FOR DEFINED ENTRY POINTS...
		GLOB	X		;;DECLARE GLOBAL SYMBOM
		PORTAL	X		;;POINT TO ENTRY
	>				;;END OF IFNB <X> CONDITIONAL
>					;;END OF CDO MACRO
>					;;END OF IFN GLXPURE CONDITIONAL

IFE	GLXPURE,<			;;IF LINKABLE LIBRARY
DEFINE	CDO	(X),<			;;MACRO TO DEFINE ENTRY POINTS
	IFNB	<X>,<GLOB X>		;;DECLARE SYMBOL GLOBAL
>					;;END OF CDO MACRO
>					;;END OF IFE GLXPURE CONDITIONAL


	LSTOF.				;TURN OFF LISTING
GLXOTS::LIBVEC				;DEFINE ENTRY VECTOR
	LSTON.				;TURN ON LISTING

.UNRTN::$STOP	(UNR,Unimplemented routine executed) ;++ NON-EXISTENT ROUTINES
.OBRTN::$STOP	(OBR,Obsolete routine executed)	;++ ANCIENT ROUTINES
.OORTN::$STOP	(OOR,OTS only routine executed) ;++ SHOULD NEVER HAPPEN
SUBTTL	Object Time System -- Initial startup


; Here from GLXINI (the bootstrap module). This code is only needed if
; the user acceses the library as an OTS high segment.
;
; Create the library's data pages. On TOPS-10, this requires 2 PAGE. UUOs.
; The first to create the page fault handler's data page just below the high
; segment origin. The second create the actual data pages referenced by all
; GLXLIB modules. On TOPS-20, there is no page fault handler. Creating the
; data pages requires touching each page. A BLT (through a call to .ZCHNK)
; does this nicely.
;
; Once the data pages have been created, OTS initialization is completed
; by calling I%INIT in GLXINT.
;
OTSINI:
IFE GLXPURE,<				;IF LINKABLE LIBRARY
	PUSHJ	P,.OORTN		;HOW DID WE GET HERE ??
>					;END OF IFE GLXPURE CONDITIONAL

IFN GLXPURE,<				;IF OTS
	HLRZ	TF,S1			;GET VERSION # LOADED GY GLXINI
	CAIE	TF,%%.GLX		;SKEW ?
	  JRST	[MOVEI	S1,OTSERR	;POINT TO ERROR TEXT
		 $CALL	K%SOUT		;TYPE IT
		 $CALL	I%EXIT]		;STOP
	HRRZS	S1			;STRIP OFF VERSION
	PUSH	P,S1			;SAVE S1
	PUSH	P,S2			;SAVE S2
	PUSHJ	P,CREDAT		;CREATE THE PAGES
	POP	P,S2			;RESTORE S2
	POP	P,S1			;RESTORE S1
	SETOM	OTSDAT			;INDICATE GETSEG OCCURED
	PJRST	I%INIT			;COMPLETE INITIALIZATION

OTSERR:	ASCIZ	|? GLXLIB version skew; recompile this program|
SUBTTL	Object Time System -- Data page creation


CREDAT:
TOPS10	<				;TOPS-10 ONLY
	MOVEI	TF,D%END##		;GET LAST PAGE LOCATION
	ADR2PG	TF			;CONVERT TO A PAGE NUMBER
	HRLI	TF,.PAGCA		;SET UP PAGE. UUO FUNCTION
	PAGE.	TF,			;READ PAGE ACCESS CODES
	  TXO	TF,PA.GNE		;CAN'T - ASSUME NOT THERE AND TRY CREATE
 	TXNN	TF,PA.GNE		;PAGE EXIST ?
	POPJ	P,			;YES - ASSUME ALL PAGES THERE AND RETURN
	MOVE	TF,[.PAGCD,,S1]		;SET UP PAGE. UUO
	MOVEI	S1,D%END##-D%BEG	;GET NUMBER OF WORDS IN THE DATA PAGES
	TXZE	S1,PAGSIZ-1		;FRACTION OF A PAGE ?
	ADDI	S1,PAGSIZ		;YES - ROUND UP
	ADR2PG	S1			;CONVERT TO PAGE NUMBER
	MOVNS	S1			;MAKE NEGATIVE REPEAT COUNT
	MOVEI	S2,D%BEG		;GET STARTING DATA PAGE ADDRESS
	ADR2PG	S2			;CONVERT TO A PAGE NUMBER
	PAGE.	TF,			;CREATE THE LIBRARY DATA PAGES
	  SKIPA				;CAN'T
	POPJ	P,			;RETURN

CREERR:	OUTSTR	[ASCIZ	|? GLXOTS - Library data page create failed|]
	$HALT				;STOP
	JRST	.-1			;DON'T CONTINUE
>					;END OF TOPS-10 CONDITIONAL

TOPS20	<				;TOPS-20 ONLY
	XMOVEI	S1,D%BEG-D%END##	;GET LENGTH OF PAGE PAGES
	XMOVEI	S2,D%END##		;POINT TO LAST DATA WORD
	$CALL	.ZCHNK			;ZAP ALL WORDS
	POPJ	P,			;RETURN
>					;END OF TOPS-20 CONDITIONAL
>					;END OF IFN GLXPURE CONDITIONAL
SUBTTL	End



OTS%L:
IFN GLXPUR<
	END GLXOTS>
IFE GLXPUR<
	END>