Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/24/outchr.mac
There are 2 other files named outchr.mac in the archive. Click here to see a list.
COMMENT * SIMULA specification;
OPTIONS(/E:QUICK,outchr);
PROCEDURE outchr(ofile,c,n);
REF(Outfile)ofile; CHARACTER c; INTEGER n;
COMMENT Outputs n ASCII characters on the file, which is normally a terminal.
Ofile.Image is not affected.
If ofile==NONE, the controlling terminal is assumed.
If n<=0, no character is output, otherwise the character c is output n times.
The buffer is used directly.
;

!*;! MACRO-10 code !*;!

	TITLE	outchr
	ENTRY	outchr
	SUBTTL	SIMULA utility, Lars Enderin Mar 1976

;!*** Copyright 1976 by the Swedish Defence Research Institute. ***
;!*** Copying is allowed.					***


	sall
	search	simmac,simmcr,simrpa
	macinit

	;! Local definitions ;!

	ofile==XWAC1
	c==XWAC2
	n==XWAC3
	bup==OFFSET(ZBHBUP)
	cnt==OFFSET(ZBHCNT)


outchr:	PROC
	JUMPLE	n,L9
	LOWADR
	CAIN	ofile,NONE
	L	ofile,YSYSOUT(XLOW)
	LF	XBH,ZFIOBH(ofile)
	SUBI	XBH,1
	LOOP
		SOSGE	cnt(XBH)
		EXEC	IONB
		IDPB	c,bup(XBH)
	AS
		SOJG	n,TRUE
	SA
L9():!	RETURN
	EPROC
	RETURN
	LIT
	END;