Google
 

Trailing-Edge - PDP-10 Archives - ap-c800d-sb - getcpy.mac
There are 7 other files named getcpy.mac in the archive. Click here to see a list.
TITLE	GETCPY FOR COBOL V12
SUBTTL	READ IN A CPYFIL WORD		AL BLACKINGTON/CAM



;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, 1979 BY DIGITAL EQUIPMENT CORPORATION

	SEARCH	P
	%%P==:%%P

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


TWOSEG
RELOC	400000

	ENTRY GETCPY	;GET A WORD
	ENTRY SETCPY	;SET UP CPYFIL FOR INPUT
	EXTERNAL DEVDED,KILL,SIXOUT


GETCPY:	SOSG	CPYBHI+2
	JRST	GETCPB
GETCPA:	ILDB	CH,CPYBHI+1
	POPJ	PP,


GETCPB:	AOS	CPYBLK
	IN	CPY,
	JRST	GETCPA

	MOVEI	CH,CPYDEV
	JRST	DEVDED


SETCPY:	MOVE	TA,CPYBUF	;SET JOBFF TO A BUFFER AREA
	MOVEM	TA,.JBFF##
	INBUF	CPY,2		;GRAB 2 BUFFERS
	SETZM	CPYBLK		;CLEAR BLOCK COUNTER

	MOVE	TE,CPYHDR	;SET UP "LOOKUP" PARAMETERS
	MOVE	TD,CPYHDR+1
	SETZB	TC,TB
	LOOKUP	CPY,TE		;FIND THE FILE
	JRST	KNOCPY		;NOT THERE--CATASTROPHE

	POPJ	PP,
;CANNOT FIND CPYFIL

KNOCPY:	TTCALL	3,[ASCIZ "CPYFIL NOT FOUND
"]
	JRST	KILL

EXTERNAL CPYBHI,CPYBLK,CPYDEV,CPYHDR,CPYBUF

	END