Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-09 - 43,50466/lcapb.mac
There are 2 other files named lcapb.mac in the archive. Click here to see a list.
TITLE	PATCH
	CORE=11
	.EXIT=1
	.C=2
	.FLAG=5
	.JBREL=44

ENTRY	SET, RESET, SIZE
EXTERNAL	%ALGDR
SEARCH	ALGPRM,ALGSYS

IFGE <MAJVNO-5>,<
SETPM:	EXP	0
	XWD	1,3
	SIXBIT/SET/
>
SET:	JSP	AX,PARAM
IFGE <MAJVNO-5>,<
	EXP	SETPM
>
	XWD	0,5
	XWD	$PRO!$N!$SIM,2
	XWD	$VAR!$I!$FON,.C
	SETZ	A0,
	JRST	SETB
IFGE <MAJVNO-5>,<
RESTPM:	EXP	0
	XWD	1,5
	SIXBIT/RESET/
>
RESET:	JSP	AX,PARAM
IFGE <MAJVNO-5>,<
	EXP	RESTPM
>
	XWD	0,5
	XWD	$PRO!$N!$SIM,2
	XWD	$VAR!$I!$FON,.C
	MOVEI	A0,1

SETB:
;13-JUN-74 R. BARR
;REMOVE CORE CONTRACTION
;	JUMPN	A0,RESET0	; RESET ENTRY
	JUMPN	A0,.EXIT(DL)

SET0:	MOVE	A0,.JBREL
	XCT	.C+1(DL)	; STORE .JBREL IN C
	JRST	.EXIT(DL)

RESET0:	XCT	.C(DL)		; LOAD VALUE OF C INTO A0
	HRLI	A0,0		; MAKE SURE DON'T TOUCH HISEG
	HRRZ	A1,PRGLNK(DL)	; GET PROGRAM LINK
	SUBI	A1,3		; GET ADR OF PUSHJ
	JUMPE	A0,.EXIT(DL)	; IF A0=0 OKAY
	CAMG	A0,A1		; WILL CALLI KILL PROGRAM?
	JRST	RESET1		; YES
	CALLI	A0,CORE
	JFCL	0,		; SHOULD ALWAYS WORK
	JRST	.EXIT(DL)

RESET1:	PUSH	SP,A1		; SAVE ADR OF PUSHJ
MOVEI	A1,ERM1
	PUSHJ	SP,MONIT	; TELL BAD NEWS
	POP	SP,A1		; GET ADR OF PUSHJ
	MOVNI	A0,1		; SPECIAL ENTRY FOR CHANNEL -1
	EXCH	A0,2(DB)	; SAVE ACTIVE CHANNEL NO.
	PUSHJ	SP,PROCT	; OUTPUT ADR IN OCTAL
	MOVEM	A0,2(DB)	; RESTORE CHANNEL NO.
	MOVEI	A1,ERM2		; TELL WHY
	PUSHJ	SP,MONIT
	JRST	.EXIT(DL)

ERM1:	ASCIZ/
ERROR AT ADDRESS /

ERM2:	ASCIZ/
ARGUMENT OF RESET WOULD KILL PROGRAM

/

IFGE <MAJVNO-5>,<
SIZEPM:	EXP	0
	XWD	1,4
	SIXBIT/SIZE/
>
SIZE:	JSP	AX,PARAM
IFGE <MAJVNO-5>,<
	EXP	SIZEPM
>
	XWD	0,2
	XWD	$PRO!$I!$SIM,1

	MOVE	A0,.JBREL
	LSH	A0,-12		; DIV BY 1024
	ADDI	A0,1		; FUDGE FOR EXTRA CORE
	MOVEM	A0,.C(DL)
	JRST	.EXIT(DL)

	END