Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0078/libsim/outstr.mac
There are 4 other files named outstr.mac in the archive. Click here to see a list.
COMMENT * SIMULA specification;
OPTIONS(/E:QUICK,ZYLOST);
PROCEDURE outstring(ofile,t); REF(Outfile) ofile; TEXT t;
COMMENT Copies the text t directly to the output buffer bypassing Image.
T is not changed. No output is forced.
Output will appear when (Break)Outimage or forceout is called.
ofile == NONE is treated as Sysout.
;

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

	TITLE	outstring
	ENTRY ZYLOST
	SUBTTL	SIMULA utility, Lars Enderin July 1977

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


	sall
	search	simmac,simmcr,simrpa
	macinit

	;! Local definitions ;!

	ofile==XWAC1
	t==XWAC2
	n==t+2

ZYLOST:	PROC
	JUMPE t,L9	;! NOTEXT, no action
	LOWADR
	CAIN ofile,NONE
	L ofile,YSYSOUT(XLOW)	;! NONE implies Sysout
	LF XBH,ZFIOBH(ofile)
	SUBI XBH,1
	LF ,ZTVSP(,t)	;! Start offset
	IF ;! Non-zero
	   JUMPE FALSE
	THEN ;! Compute byte pointer
	   IDIVI 5
	   ADD bp(X1)
	ELSE ;! Simple byte pointer
	   L bp(0)
	FI
	LF n,ZTVLNG(,t)
	LOOP
		SOSGE OFFSET(ZBHCNT)(XBH)
		XEC IONB
		ILDB X2,
		IDPB X2,OFFSET(ZBHBUP)(XBH)
	AS
		SOJG n,TRUE
	SA
L9():!	RET
	EPROC
bp:	POINT 7,2(t)
	POINT 7,2(t),06
	POINT 7,2(t),13
	POINT 7,2(t),20
	POINT 7,2(t),27
	POINT 7,2(t),34
	LIT
	END;