Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/21/makshr.mac
There is 1 other file named makshr.mac in the archive. Click here to see a list.
00100		TITLE	makshr
00200		ENTRY	makshr
00300		SUBTTL	SIMULA utility, Lars Enderin Mar 1978
00400	
00500	;*** Copyright 1978 by the Swedish Defence Research Institute.  ***
00600	;*** Copying is allowed.					***
00700	
00800	
00900		sall
01000		search	simmac
01100		macinit
01200		TWOSEG
01300		RELOC	400K
01400	
01500	
01600		DEFINE	type(t)<
01700		OUTSTR	[ASCIZ\
01800	t
01900	\]
02000	>
02100		; Local definitions ;
02200	
02300		.JBREL==44
02400		.JBHRL==115
02500		.JBSA==	120
02600		.JBCOR==133
02700		.JBREN==124
02800		LOC .JBREN
02900		Z
03000		RELOC
03100	
03200		X1==1
03300	
03400	
03500	
03600	makshr:
03700		SETZ		;Clear write protect
03800		SETUWP		;if possible
03900		 HALT		;Give up if not possible
04000		L [40,,LSAVE+40] ;Set up for copy of low segment to high seg
04100		L X1,.JBREL
04200		ADDI X1,LSAVE-40
04300		BLT (X1)	;Make the copy
04400		IF	;This module is really at the end of hiseg
04500			HRRZ .JBHRL	;Last word of hiseg
04600			CAIL E+1000
04700			GOTO FALSE
04800		THEN	;Eliminate unused core
04900			MOVSI (X1)
05000			SUBI X1,400K-1	;New size
05100			HRLM X1,.JBHRL
05200		ELSE	;Keep hiseg as is
05300			HRLZ .JBHRL
05400		FI
05500		HRRI 1		;Cannot have 0 if low seg to be eliminated
05600		SETZM 140	;Clear lowseg
05700		L X1,[140,,141]
05800		BLT X1,2K-1
05900		CORE		;Shrink core
06000		 HALT		;Give up on error
06100		LI .MAIN##	;Ordinary start address
06200		HRRM LSAVE+.JBSA	; saved
06300		LI restart	;Start address for execution
06400		ST .JBSA	;No low core
06500		SETZM .JBREN	;No REENTER
06600		SETZM .JBCOR	;No low core saved
06700		type ([MAKSHR called. Do: SSAVE <filename>])
06800		MONRT.
06900	restart:
07000		PORTAL .+2
07100		PORTAL .+1
07200		HRRZ .JBREL+LSAVE	;Restore lowseg size
07300		CORE
07400		 HALT
07500		MOVS [40,,LSAVE+40]	;Prepare to restore lowseg contents
07600		BLT @LSAVE+.JBREL	;Restore
07700		BRANCH .MAIN##		;Start normal processing
07800	
07900	
08000		LIT
08100	LSAVE:	BLOCK 30K	; Saves lowseg data and program, high end eliminated
08200	E:	;
08300		END MAKSHR;