Trailing-Edge
-
PDP-10 Archives
-
BB-Y390T-BM
-
lngsrc/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 Irwin L. Goverman/ILG/PJT/DPM 1-Jan-82
;
;
; COPYRIGHT (c) 1975,1976,1977,1978,1979,1980,1981,1982
; DIGITAL EQUIPMENT CORPORATION
;
; 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.
OTSEDT==15 ;MODULE EDIT
SEARCH GLXMAC ;LOAD COMMON DEFINITIONS
PROLOG(GLXOTS,OTS) ;
;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. Table of Contents......................................... 2
; 2. Internal Loading Instructions............................. 3
; 3. Library Dispatch Vector................................... 4
SUBTTL Revision history
COMMENT \
005 Make GLXLIB run execute-only.
Change entry vectors to include PORTAL instructions. That
will clear PUBLIC mode and set CONCEALED mode. This allows
execute-only operation.
006 Restructure GLXLIB
1) Do compatibility check here instead of GLXINT.
2) Create data pages here instead of GLXINT.
3) Rework CDO macro. Don't PUSHJ to the the unimplemented
stopcode since this may not work if execute-only.
4) Create new stopcodes and global symbols so that any module
may call them. The stopcodes are:
.UNRTN::$STOP(UNR,Unimplemented routine executed)
.OBRTN::$STOP(OBR,Obsolete routine executed)
.OORTN::$STOP(OOR,OTS only routine executed)
007 4/6/81 Add "start address" for beginning of dispatch table.
15 Increase version 4.2 maintenance edit number to correspond with version
5 maintenance edit number.
\ ;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>