Trailing-Edge
-
PDP-10 Archives
-
bb-h138f-bm
-
7-sources/rmsini.mac
There are 6 other files named rmsini.mac in the archive. Click here to see a list.
TITLE RMSINI - Initialize RMS for RMS programs.
SUBTTL S. COHEN/RL
;
; COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1977, 1986.
; 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 THAT IS NOT SUPPLIED BY DIGITAL.
;
SEARCH RMSINT
;++
; FACILITY: RMS
;
; ABSTRACT:
;
; RMSINI is .REQUIREd by MACRO programs which use the
; RMS macro $INIT. BLISS programs using $INIT must
; explicitly load RMSINI.REL with the program.
;
; ENVIRONMENT: User mode
;
; AUTHOR: Seth Cohen, CREATION DATE: 1977
;
; MODIFIED BY:
; Ron Lusk,18-Jan-84
;
; 446 - Load DDT with XRMS only when user has DDT loaded.
; 447 - Allow user to specify RMS's section using RMSSEC.
; 451 - XRMS is now loaded at 400000; look at 400006 for
; symbol-table pointer.
; 572 - Since RMS is much bigger now, increase the MERGE. pages
; argument and move/increase the GLOBALS area [DPR]
;--
SMNCPY:ASCIZ\
COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1977, 1986.
ALL RIGHTS RESERVED.
\ ;[71]
RMS$10==:600010 ;RESOLVE SYMBOL REFFED IN $verb MACROS
;(ONLY $verb FOR TOPS-10 MACRO PROGRAMS)
;Acs used
T1=1
T2=2
T3=3
T4=4
$$RMS::
IFN TOP$10,<
SEARCH UUOSYM
SKIPE SAVE17 ;REPEAT CALL?
POPJ 17, ;YES
MOVEM 17,SAVE17 ;BECAUSE MERGE. CLOBBERS IT
MOVEI 17,SAVEAC ;SAVE OTHERS NOW
BLT 17,SAVEAC+16 ;DONE
MOVEI 1,RMS.FS ;LOAD PTR TO RMS FILE SPEC
MERGE. 1, ;GET IT
JRST INIERR ;OOPS
; LINK procedure changed so we do not need to create these pages at this time
REPEAT 0,< ;d572v
; GLOBALS area has grown to 4 pages. It has temporarily been placed
; at pages 734-737, subject to change based on size of RMS
MOVE 1,[.PAGCD,,[EXP 4,734,735,736,737]];CREATE RMS GLOBALS AREA
PAGE. 1, ;DO IT
JRST INIERR ;OOPS
>; End REPEAT 0 ;d572^
MOVSI 17,SAVEAC ;RESTORE AC'S
BLT 17,17 ;DONE
POPJ 17,
RMS.FS:
SIXBIT /SYS/
SIXBIT /XRMS/ ;m572
SIXBIT /EXE/
EXP 0
EXP 0
XWD 570,750 ;GIVE IT RANGE TO MERGE ;m572
SAVEAC:
BLOCK 17
SAVE17:
EXP 0
INIERR:
OUTSTR [ASCIZ/? Could not initialize RMS
/]
EXIT 1,
> ;END IFN TOP$10
IFN TOP$20,<
SEARCH MONSYM,MACSYM
;*** The following is needed for TOPS-20 release 5, because XRMS
; is not automatically gotten in just because the JSYS was from
; an extended section.
XMOVEI 1,. ;What section are we in?
TLNE 1,-1 ;Non-zero section?
PUSHJ 17,GINRMS ;Get RMS in, set entry vector
;** End of Release 5 code.
MOVEI 1,2 ;SETUP DUMMY ARGLST
JSYS 1000+C$MESS ;DO $MESSAGE MANUALLY
ERJMP .+2 ;...TO SEE IF RMS AROUND
POPJ 17, ;OK
HRROI 1,[ASCIZ/? Could not initialize RMS/]
PSOUT% ;TELL USER
HALTF%
;** More release 5 code
; We have to find a free section where RMS will go
GINRMS: MOVE T1,[.XSEVD,,.FHSLF] ;See if RMS has already been initialized
XGSEV%
JUMPE T3,GRMS0 ;None defined yet, go do it
TXZ T3,77B5 ;Clear flags
TLNN T3,-1 ;Must be in a non-zero section..
JRST E$$BRM ;?Can't init XRMS
POPJ P, ;Got it, return
GRMS0: SKIPE T1,RMSSEC ;[447] Did user specify a section?
JRST GRMS2 ;[447] Yes - use it
XMOVEI T4,. ;Get this section number
HLRZ T4,T4 ;Start here
GRMS1: AOS T1,T4 ;Try next section
CAILE T1,37 ;Make sure some still left
JRST E$$NFS
HRLI T1,.FHSLF
RSMAP%
ERJMP E$$SNA
AOJN T1,GRMS1 ;Not free, try another
MOVEM T4,RMSSEC ;Save section number
JRST GRMS3 ;[447] Go create the section
GRMS2: MOVE T4,T1 ;[447] Store the section number away
HRLI T1,.FHSLF ;[447] Check if user's section is free
RSMAP% ;[447]
ERJMP E$$SNA ;[447] Non-zero section not available
CAME T1,[-1] ;[447] Section is not free
JRST E$$SNF ;[447] ...
GRMS3: SETZ T1, ;[447] Create the section
HRLI T2,.FHSLF
HRR T2,T4
MOVX T3,<PM%RWX!1>
SMAP%
ERJMP E$$SNA
;We have created the section. GET XRMS.EXE into it.
MOVEI T1,.FHSLF ;Get my entry vector
XGVEC% ;Get length in T2, addr in T3
DMOVEM T2,MYENTV ;..
MOVX T1,GJ%OLD+GJ%SHT ;Find XRMS.EXE
HRROI T2,[ASCIZ/SYS:XRMS.EXE/]
GTJFN%
ERJMP NOXRMS ;?Can't
HRRZ T1,T1 ;Get JFN
HRLI T1,.FHSLF ;process handle in LH
TXO T1,GT%ARG ;Arg address in T2
XMOVEI T2,GETARG ;Point to arg block
GET%
ERJMP E$$CGR ;?Can't
MOVEI T1,.FHSLF ;Find out RMS's entry vector
XGVEC%
TXO T3,XS%EEV ;It's an "extended" kind.
MOVE T1,[.XSEVD,,.FHSLF] ;RMS, this fork
XSSEV% ;Extended set special entry vector
; If DDT is in this section (where the $INIT is), then
; bring in DDT in RMS's section and tell it where the symbols are
MOVE T1,[.FHSLF,,770] ;[446] Look for DDT
RPACS% ;[446] Is DDT's page there?
ERJMP NODDT ;[446] Forget DDT on error
TXNN T2,PA%EX ;[446] Does the page exist?
JRST NODDT ;[446] No - DDT can't be there
MOVE T1,[JRST 770002] ;[446] Really DDT?
CAME T1,770000 ;[446] Check the first instruction
JRST NODDT ;[446] Not DDT at page 770
MOVX T1,GJ%OLD+GJ%SHT
HRROI T2,[ASCIZ/SYS:UDDT.EXE/]
GTJFN%
ERJMP E$$CGD
HRRZ T1,T1 ;Get JFN
HRLI T1,.FHSLF ;process handle in LH
TXO T1,GT%ARG ;Arg address in T2
XMOVEI T2,GETARG ;Point to arg block
GET%
ERJMP E$$CGD
HRLZ T1,RMSSEC ;Get
HRRI T1,400006 ;[451] loc 400006 of that section
MOVE T2,(T1) ;Get symbol word for RMS
HRRI T1,770001
HRRZ T1,(T1) ;Get address in 770001
HRL T1,RMSSEC ; in that section..
MOVEM T2,(T1) ;Store symbol table info there.
NODDT: MOVEI T1,.FHSLF ;[446] Now restore my entry vector
DMOVE T2,MYENTV
XSVEC%
POPJ 17, ;Return
NOXRMS: HRROI 1,[ASCIZ/?Can't find SYS:XRMS.EXE
/]
PSOUT%
HALTF%
E$$CGR: HRROI 1,[ASCIZ/?Can't GET SYS:XRMS.EXE
/]
PSOUT%
HALTF%
E$$SNA: HRROI 1,[ASCIZ/?Non-zero sections not available
/]
PSOUT%
HALTF%
E$$SNF: HRROI 1,[ASCIZ/?Specified RMS section not free
/]
PSOUT%
HALTF%
E$$NFS: HRROI 1,[ASCIZ/?No free sections
/]
PSOUT%
HALTF%
E$$BRM: HRROI 1,[ASCIZ/?Can't init RMS in non-zero section: RMS entry vector
already set up in section zero
/]
PSOUT%
HALTF%
E$$CGD: HRROI 1,[ASCIZ/?Can't get DDT in RMS's section
/]
PSOUT%
HALTF%
MYENTV: BLOCK 2 ;My saved entry vector info
GETARG: GT%BAS ;.GBASE contains section #
0 ;.GLOW
0 ;.GHIGH
RMSSEC::0 ;[447] .GBASE (RMS's section number)
> ;END IFN TOP$20
XPUNGE ;USER DOESNT WANT OUR SYMBOLS
END