Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/23/dotype.mac
There is 1 other file named dotype.mac in the archive. Click here to see a list.
COMMENT * SIMULA specification;
OPTIONS(/E:QUICK,dotypeout);
BOOLEAN PROCEDURE dotypeout(tty); REF(Outfile)tty;
COMMENT Returns TRUE if tty is a conversational terminal
and output was turned on, otherwise FALSE. Performs no output.
;

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

	TITLE	dotypeout
	ENTRY	dotypeout
	SUBTTL	SIMULA utility, Lars Enderin Jan 1976

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

	sall
	search	simmac,simmcr,simrpa
	macinit

	;! Local definitions ;!

	tty==XWAC1
	.TOSIP==1	;! TRMOP code - skip if terminal input buffer not empty
	OPDEF	IONDX.	[CALLI 127]

dotypeout:
	PROC
	EXCH	XWAC1,(XTAC)	;! Get file ref
	CAIN	XWAC1,NONE
	GOTO	L8
	IFOFF	ZFITTY(XWAC1)
	GOTO	L9
	IF	;! Job controlling terminal
		IFOFF	ZFITA(XWAC1)
		GOTO	FALSE
	THEN	;! Use TTCALL
		SKPINC
		NOP
		GOTO	L9
	FI
	LF	X1,ZFIDVN(XWAC1)
	IONDX.	X1,
	GOTO	L8
	JUMPE	X1,L8
	LI	X0,.TOSIP
	MOVSI	XIAC,2	;! [2,,X0]
	TRMOP.	X2,
	SKIPA
	GOTO	L9
L8():!	TDZA	XWAC1,
L9():!	SETO	XWAC1,
	EXCH	XWAC1,(XTAC)
	RETURN
	EPROC
	LIT
	END;