Google
 

Trailing-Edge - PDP-10 Archives - BB-H506E-SM - cobol/source/clrnam.mac
There are 7 other files named clrnam.mac in the archive. Click here to see a list.
; UPD ID= 618 on 11/21/74 at 3:32 PM
TITLE	CLRNAM FOR COBOL V12C
SUBTTL	TAKE SOME ENTRIES OUT OF NAMTAB		AL BLACKINGTON/CAM

	SEARCH COPYRT
	SALL

COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1974, 1985
;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.

	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?
IFN ANS68,<
	CAME	TC,CP
	JRST	CLRNM2		;NO
>
IFN ANS74,<
	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