Google
 

Trailing-Edge - PDP-10 Archives - dec-10-omona-u-mc9 - nulseg.mac
There are 2 other files named nulseg.mac in the archive. Click here to see a list.
TITLE	NULSEG - DUMMY HIGH SEGMENT ROUTINES FOR MACHINES WITH JUST ONE REG - V420
SUBTTL	T. HASTINGS/TH/DAL	1 DEC 73
	SEARCH	F,S
;***COPYRIGHT 1973,1974,1975,1976,1977 DIGITAL EQUIPMENT CORP., MAYNARD MASS. ***
XP VNULSG,420
		;PUT VERSION NUMBER IN LOADER STORAGE MAP AND GLOB LISTING

	ENTRY	NULSEG
NULSEG:			;ENTRY POINT SYMBOL TO CAUSE LOAD OF NULSEG IF REQUIRED
			;(IE INSTEAD OF SEGCON OR NEITHER)

;INITIALIZE LOC TWOREG TO 0(FLAG SOFTWARE OR HARDWARE ONLY 1 REG CAPABILITY)
;ANDI AND2RG EXECUTED FROM ONCE AFTER HARDWARE EXAMINED FOR 2 REG CAPABILITY.

	INTERN	AND2RG

AND2RG=0	;FLAG SYSTEM DOES NOT HAVE 2 REG. CAPABILITY
		;SINCE AT LEAST SOFTWARE DOES NOT BECAUSE THIS DUMMY
		;ROUTINE LOADED

;CLOCK1

	INTERN	SETHGH

SETHGH:	TLZ	R,1777		;CLEAR OUT PROTECTION FOR HIGH SEG IN CASE THIS
	POPJ	P,		;IS A 2 REG MACHINE


;COMCSS

XP PRTHGH,R0		;RPINT HIGH SEG CORE
XP ASGHGH,R0		;CLEAR HIGH SEG NAMES ON ASSIGN COMMAND
XP CHKMED,R0		;CHECK FOR MEDDLING
XP ANYSAV,R1		;ANY JOB DOING A SAVE INVLOVING HIGH SEG?
;CORE1

	INTERN	JOBSIZ
	EXTERN	SEGSIZ

JOBSIZ:	PJRST	SEGSIZ		;SIZE OF JOB IS SIZE OF LOW SEG


XP HGHDEP,R0		;DEPOSIT HIGH SEG(ERROR)
XP KILHGH,R0		;REMOVE HIGH SEG FROM LOGICAL ADR SPACE
XP UREMAP,R0		;REMAP UUO
XP CURHGH,R0		;CHANGE RELOC HARD IF CURRENT USER AFFECTED
XP FREC2,R0		;FREE CORE OCCUPIED BY SPECIFIED DORMANT SEGMENT
XP FRECOR,R0		;FREE CORE IN NON-SWAP SYSTEMS
XP FRECR1,R1		;FREE CORE IN SWAPING SYSTEMS

	INTERN	UCORHI,SUMSEG
	EXTERN	CORMAX,USRREL

UCORHI:	CAMLE	T1,USRREL	;TRYING TO ASSIGN CORE TO HIGH SEG?
	POPJ	P,		;YES, ERROR RETURN
				; NO, GIVE OK RETURN
SUMSEG:	IFN	FTTLIM,<EXTERN JBYLCR
	LDB	T2,JBYLCR
	LSH	T2,^D9
	MOVEI	T2,-1(T2)
>
	CAMGE	T1,CORMAX	;ARG GE MAX LENGTH (HIGHEST+1)?
IFN	FTTLIM,<
	CAMLE	T1,T2
	JRST	.+2
>
R1:	AOS	(P)		;NO, GIVE OK RETURN
R0:	POPJ	P,		;YES, GIVE ERROR RETURN

;ERRCON

XP SEGILM,R1		;WILD TRANSFER RETURN
XP HGHPAR,R0		;PAR ERROR IS IN LOW SEG RETURN

;SAVGET

XP SETEXT,R0
XP SETEX1,R0
XP SAVDDL,R0		;DIDDLE RELOC. DURING DUMP MODE O/P FOR HISEG
XP ADJCOR,R0

	INTERN	UGETHI
	EXTERN	UGTERR

UGETHI:	JRST	UGTERR		;ERROR RETURN TO USER UNLESS HALT IN LH OF UUO+1

	INTERN	SAVHGH,GETHGH
	EXTERN	SGERRA,SGAMOD,SG3

SAVHGH:
GETHGH:	OPEN	0,SGAMOD	;TRY TO INIT DEVICE
	JRST	SGERRA		;ERROR
	AOS	(P)		;SKIP RETURN
	JRST	SG3		;AND GO SETUP LOWER CORE
;SWAP

	INTERN	FTSWAP

IFN FTSWAP,<
XP DODELE,R0		;DELETE DORMANT SEGMENTS - CAN'T
XP IFDELE,R0		;SEE IF ENOUGH ROOM IF DELETE - CAN'T
XP FININ,R1		;FINISH SWAPPING IN
XP FINOT,R1		;FINISH LOW SEG OUTPUT - NOTHING MORE TO DO
XP FORSIZ,R0		;SIZE OF JOB FREED UP
XP FRESWP,R1		;FREE DISK SPACE - NO DORMANT SEG FOUND RETURN
XP CKXPN,R1		;CHECK FOR EXPANDING HIGH SEG - NEVER
XP FITHGH,R0		;CHECK IF HISEG BEING SWAPPED IN
XP SEGERR,R0		;ERROR IN HIGH OR LOW SEG SWAP IN
XP NOFITH,R1		;CHECK FOR DANGLING HIGH SEG - NEVER
XP XPNHGH,R0		;EXPAND A HIGH SEG - NEVER
XP ZERSWH,R0		;HIGH SEG SWAP READ ERROR - NEVER


	INTERN	FITSIZ
	EXTERN	CORTAL

FITSIZ:	CAMG	P1,CORTAL	;WILL LOW SEG FIT IN CORE?
	AOS	(P)		;YES, SWAP HIM IN
	POPJ	P,		;NO, MUST SWAP SOMEONE ELSE OUT FIRST

	INTERN	FORHGH
	EXTERN	JBTSTS

FORHGH:	MOVSI	T1,SHF		;STOP IO AFTER NEXT BUFFERFUL IF ACTIVE
	IORM	T1,JBTSTS(J)	;CHECKED BY ADVBFF,ADVBFE ROUTINES
	POPJ	P,
>

;SYSINI

XP SEGINI,R0		;INITIALIZE HIGH SEGS

;UUOCON

XP RELSEG,R0		;SUPERCEDE HIGH SEGS ON RECREATE
XP HGHWRD,R0		;GET WORD FROM HIGH SEG - ERROR RETURN
XP HRESET,R0

	INTERN	USTUWP
	EXTERN	RTZER

USTUWP:	JRST	RTZER

XP HGHWRD,R0		;GET WORD FROM HIGH SEG -ERROR
XP USPY,R0		;SPY UUO - ERROR
	INTERN	RNMSEG
RNMSEG:	JRST	DRN(T4)		;RENAME UUO


NULEND:	END