Google
 

Trailing-Edge - PDP-10 Archives - BB-H580E-SB_1985 - getcpy.mac
There are 7 other files named getcpy.mac in the archive. Click here to see a list.
TITLE	GETCPY FOR COBOL V12C
SUBTTL	READ IN A CPYFIL WORD		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 COPYRIGHT statement in .REL file.

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