Google
 

Trailing-Edge - PDP-10 Archives - BB-Z759A-SM - cobol-source/clrnam.mac
There are 7 other files named clrnam.mac in the archive. Click here to see a list.
; UPD ID= 1024 on 4/28/83 at 6:25 PM by NIXON                           
TITLE	CLRNAM FOR COBOL V12B
SUBTTL	TAKE SOME ENTRIES OUT OF NAMTAB		AL BLACKINGTON/CAM

	SEARCH COPYRT
	SALL

;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.

COPYRIGHT (C) 1974, 1983, 1984 BY DIGITAL EQUIPMENT CORPORATION

	SEARCH	P
	%%P==:%%P

;EDITS
;V10*****************
;NAME	DATE		COMMENTS
;********************

TWOSEG
	.COPYRIGHT		;Put standard copyright statement in REL file
RELOC	400000

	ENTRY CLRNAM

;IF THIS IS CALLED FROM PHASE B, ALL ID & ED ENTRIES CLEARED,
;	OTHERWISE ALL DD ENTRIES CLEARED.


CLRNAM:	MOVEI	CP,1		;SET CP TO THE TYPE TO CLEAR
	MOVE	LN,PHASEN
	CAIE	LN,"B"
	MOVEI	CP,2

	MOVN	LN,NM12SZ	;CREATE
	MOVSS	LN		;  <XWD -NM12SZ,NM2LOC>
	HRR	LN,NM2LOC	;  *
	HRRZ	DT,NAMLOC	;SET DT TO TOP OF NAMTAB

CLRNM1:	SKIPN	TA,(LN)		;IS NEXT NM2TAB ENTRY EMPTY?
	JRST	CLRNM2		;YES

	ADD	TA,DT		;NO--GET FIRST WORD OF NAMTAB ENTRY
	MOVE	TB,(TA)
	TLZN	TB,NAMRSV/1000000; IS IT A RESERVED WORD?
	JRST	CLRNM2		;NO

	LDB	TC,[POINT 3,TB,11]; YES--IS IT ONE WE WANT?
	CAMN	TC,CP
	JRST	CLRNM3		;YES
	CAIN	TC,6		;IN NEW SET?
	CAIE	CP,2		;AND PHASE C
	JRST	CLRNM2		;NO
	HLRZ	TC,TB		;GET RESERVED WORD TOKEN
	CAIE	TC,LNGCO.	;LINAGE-COUNTER
	JRST	CLRNM2		;NO
CLRNM3:
	SETZM	0(TA)		;YES--CLEAR FIRST
	SETOM	1(TA)		;  TWO WORDS OF NAMTAB
	MOVEI	TC,1		;SET SIZE OF ITEM
	HRLM	TC,(LN)		;  TO ONE


CLRNM2:	AOBJN	LN,CLRNM1	;LOOP UNTIL ALL OF NM2TAB IS PASSED

	POPJ	PP,


	EXTERNAL NM2LOC,NAMLOC,NM12SZ,PHASEN

	END