Google
 

Trailing-Edge - PDP-10 Archives - tops10_703a_sys_atpch16_bb-fr67f-bb - dndemo.p11
There are 4 other files named dndemo.p11 in the archive. Click here to see a list.
.SBTTL	DNDEMO - RDE DEMONSTRATION   5 MAY 76



;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1976,1977,1978,1979,1980,1981,1984 BY DIGITAL EQUIPMENT CORP., MAYNARD, MASS.

VRDEMO	=1			;FILE EDIT NUMBER



.IIF NDF FTDEMO,FTDEMO=0
.IF EQ FTDEMO
.MACRO	DEMO	ARG,ADR
.ENDM	DEMO
.IFF


.MACRO	DEMO	ARG,ADR
.IF IDN <ARG>,<CODE>

.MACRO	X	QBLK,QDDB
	.WORD	QBLK	;LINE BLOCK
	.WORD	QDDB	;TTY DDB
	.WORD	0	;START OF MSG UNDER CONSTRUCTION
	.WORD	0	;NEXT CHAR OF MSG
.ENDM	X

DEMO.T:
	;LOCATE THE FIRST TRIBUTARY LINE
	ZLB=LBAMPT
.IF EQ FTDEMO-1
	.REPT	NTRIB
		X	ZLB,ADR
		ZLB=ZLB+LB.SIZ
	.ENDR
.IFF
	ZDDB=T0DDB
	ZN=NTRIB
	.IIF LT TTYN-ZN,ZN=TTYN
	.REPT	ZN
		X	ZLB,ZDDB
		ZLB=ZLB+LB.SIZ
		ZDDB=ZDDB+DB.TSZ
	.ENDR
.ENDC
DEMO.E:

DEMO.F:	SAVE	<J>
	BR	DEMO00
DEMO.O:	SAVE	<J>
	MOV	#DEMO.T,J
10$:	CMP	(P),(J)
	BEQ	DEMO01
	ADD	#10,J
	CMP	J,#DEMO.E
	BLO	10$
DEMO00:	JSR	PC,FRECKS
DEMO02:	RESTORE	<J>
	RTS	PC
DEMO01:	MOV	2(J),J
	SAVE	<R4,R3,R2,R1,R0,R0>
	MOV	CN.LEN(R0),R4
	ADD	#CN.NCT,(P)
10$:	MOV	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