Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/23/outchr.mac
There are 2 other files named outchr.mac in the archive. Click here to see a list.
00100	COMMENT * SIMULA specification;
00200	OPTIONS(/E:QUICK,outchr);
00300	PROCEDURE outchr(ofile,c,n);
00400	REF(Outfile)ofile; CHARACTER c; INTEGER n;
00500	COMMENT Outputs n ASCII characters on the file, which is normally a terminal.
00600	Ofile.Image is not affected.
00700	If n<=0, no character is output, otherwise the character c is output n times.
00800	The buffer is used directly.
00900	Warning! If ofile is not open, outchr will loop indefinitely!
01000	;
01100	
01200	!*;! MACRO-10 code !*;!
01300	
01400		TITLE	outchr
01500		ENTRY	outchr
01600		SUBTTL	SIMULA utility, Lars Enderin Mar 1976
01700	
01800	;!*** Copyright 1976 by the Swedish Defence Research Institute. ***
01900	;!*** Copying is allowed.					***
02000	
02100	
02200		sall
02300		search	simmac,simmcr,simrpa
02400		macinit
02500	
02600		;! Local definitions ;!
02700	
02800		ofile==XWAC1
02900		c==XWAC2
03000		n==XWAC3
03100		bup==OFFSET(ZBHBUP)
03200		cnt==OFFSET(ZBHCNT)
03300	
03400	
03500	outchr:	PROC
03600		JUMPLE	n,L9
03700		LF	XBH,ZFIOBH(ofile)
03800		SUBI	XBH,1
03900		LOOP
04000			SOSGE	cnt(XBH)
04100			 XEC	IONB
04200			IDPB	c,bup(XBH)
04300		AS
04400			SOJG	n,TRUE
04500		SA
04600	L9():!	RET
04700		EPROC
04800		END;