Google
 

Trailing-Edge - PDP-10 Archives - klad_sources - klad.sources/dskcd1.mac
There are no other files named dskcd1.mac in the archive.
RENTR1:	DROPDV			;CLOSE LOGICAL OUTPUT FILE
	CALL	[SIXBIT .EXIT.]

PGMNAM:	ASCIZ?
DECSYSTEM 2020 ADVANCED INSTRUCTION DIAGNOSTIC #4 (DSKCD)
?
;INITIALIZE SUBROUTINES

START:	PGMINT
	MOVE	[ASCIZ/CD/]
	MOVEM	TLET		;INITIALIZE TEST LETTER

STARTA:	JRST	.+1		;GO PERFORM DIAGNOSTIC
SUBTTL	TEST AR, ARX, AD, ADX AND NORMALIZE LOGIC FOR DOUBLE FLOATING POINT OPERATIONS

DEFINE	SAVEAC	(A,B)<
	MOVEI	AC+4,.
	MOVEM	AC+4,TESTPC	;SETUP SUBTEST PC
	MOVEI	AC+4,<AC+4>&17	;INFORM ERROR ROUTINE WHICH
	MOVEM	AC+4,ERRLOP#	;AC IS USED FOR ITERATION>

	AC=4
CD00:	SAVEAC	(1,1)

;ADD A WORD OF ALL ZEROS TO A WORD OF ALL ZEROS
	DFA	1,0,0,0,0,0,0,0,0,0,0,0,0
PAGE
;RIPPLE ONES TESTS (TO A WORD OF ALL ZEROS, ADD A RIPPLED ONE)
T=200
	XX=1000
	ZZ=201400

R200:	REPEAT	^D9,
<T=T+1
	XX=XX/2
	ZZ=ZZ-1000
	DFARP	T,200000,0,0,0,200000+XX,0,0,0,ZZ,0,0,0
>

	XX=1000000

	REPEAT	^D18,
<T=T+1
	XX=XX/2
	ZZ=ZZ-1000
	DFARP	T,200000,0,0,0,200000,XX,0,0,ZZ,0,0,0
>

	XX=400000

T=T+1
	DFARP	T,200000,0,0,0,200000,0,XX,0,0,0,0,0

	REPEAT	^D17,
<T=T+1
	XX=XX/2
	ZZ=ZZ-1000
	DFARP	T,200000,0,0,0,200000,0,XX,0,ZZ,0,0,0
>

	XX=1000000

	REPEAT	^D18,
<T=T+1
	XX=XX/2
	ZZ=ZZ-1000
	DFARP	T,200000,0,0,0,200000,0,0,XX,ZZ,0,0,0
>
;RIPPLE ONES TEST (TO A RIPPLED ONE, ADD A WORD OF ALL ZEROS)
T=300
	XX=1000
	ZZ=201400

R300:	REPEAT	^D9,
<T=T+1
	XX=XX/2
	ZZ=ZZ-1000
	DFARP	T,200000+XX,0,0,0,200000,0,0,0,ZZ,0,0,0
>

	XX=1000000

	REPEAT	^D18,
<T=T+1
	XX=XX/2
	ZZ=ZZ-1000
	DFARP	T,200000,XX,0,0,200000,0,0,0,ZZ,0,0,0
>

	XX=400000

T=T+1
	DFARP	T,200000,0,XX,0,200000,0,0,0,0,0,0,0

	REPEAT	^D17,
<T=T+1
	XX=XX/2
	ZZ=ZZ-1000
	DFARP	T,200000,0,XX,0,200000,0,0,0,ZZ,0,0,0

>

	XX=1000000

	REPEAT	^D18,
<T=T+1
	XX=XX/2
	ZZ=ZZ-1000
	DFARP	T,200000,0,0,XX,200000,0,0,0,ZZ,0,0,0
>
;ADD A FRACTION OF ALL ONES TO A FRACTION OF ALL ZEROS

	DFA	4,0,0,0,0,777,-1,-1,-1,777,-1,377777,-1

;ADD A FRACTION OF ALL ZEROS TO A FRACTION OF ALL ONES

	DFA	5,777,-1,-1,-1,0,0,0,0,777,-1,377777,-1
PAGE
;RIPPLE ZEROS TESTS (TO A FRACTION OF ALL ZEROS, ADD A RIPPLED ZERO)

T=600
	ZZ=0

R600:	REPEAT	^D18,
<T=T+1
	ZZ=ZZ+ZZ+1
	IFE	<ZZ-1>,<ZZ=-2>
	DFARP	T,0,0,0,0,777,-1,-1,ZZ,777,-1,377777,ZZ
>

	ZZ=0

	REPEAT	^D18,
<T=T+1
	ZZ=ZZ+ZZ+1
	IFE	<ZZ-1>,<ZZ=-2>
	DFARP	T,0,0,0,0,777,-1,ZZ,-1,777,-1,ZZ&377777,-1
>

	ZZ=0

	REPEAT	^D18,
<T=T+1
	ZZ=ZZ+ZZ+1
	IFE	<ZZ-1>,<ZZ=-2>
	DFARP	T,0,0,0,0,777,Z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ACTION OF ALL ONES, ADD A RIPPLED ONE)

T=1200

	XX=0

R1200:	REPEAT	^D18,
<T=T+1
	ZZ=XX
	XX=XX+XX
	IFE	XX,<XX=1>
	DFARP	T,200777,-1,-1,-1,200000,0,0,XX,201400,0,0,ZZ
>

	ZZ=XX
	XX=1

T=T+1
	DFARP	T,200777,-1,-1,-1,200000,0,XX,0,201400,0,0,ZZ


	REPEAT	^D16,
<T=T+1
	ZZ=XX
	XX=XX+XX
	DFARP	T,200777,-1,-1,-1,200000,0,XX,0,201400,0,ZZ,0
>

	ZZ=XX
	XX=XX+XX

T=T+1
	DFARP	T,200777,-1,-1,-1,200000,0,XX,0,200777,-1,377777,-1

T=T+1
	XX=1
	DFARP	T,200777,-1,-1,-1,200000,XX,0,0,201400,0,ZZ,0

	REPEAT	^D17,
<T=T+1
	ZZ=XX
	XX=XX+XX
	DFARP	T,200777,-1,-1,-1,200000,XX,0,0,201400,ZZ,0,0
>

T=T+1
	ZZ=XX
	XX=1
	DFARP	T,200777,-1,-1,-1,200000+XX,0,0,0,201400,ZZ,0,0

	REPEAT	^D8,
<T=T+1
	ZZ=XX
	XX=XX+XX
	DFARP	T,200777,-1,-1,-1,200000+XX,0,0,0,201400+ZZ,0,0,0
>
;RIPPLE ONES (TO A RIPPLED ONE, ADD A FRACTION OF ALL ONES)

T=1300

	XX=0

R1300:	REPEAT	^D18,
<T=T+1
	ZZ=XX
	XX=XX+XX
	IFE	XX,<XX=1>
	DFARP	T,200000,0,0,XX,200777,-1,-1,-1,201400,0,0,ZZ
>

	ZZ=XX
	XX=1

T=T+1
	DFARP	T,200000,0,XX,0,200777,-1,-1,-1,201400,0,0,ZZ


	REPEAT	^D16,
<T=T+1
	ZZ=XX
	XX=XX+XX
	DFARP	T,200000,0,XX,0,200777,-1,-1,-1,201400,0,ZZ,0
>

	ZZ=XX
	XX=XX+XX
T=T+1
	DFARP	T,200000,0,XX,0,200777,-1,-1,-1,200777,-1,377777,-1


	XX=1
T=T+1
	DFARP	T,200000,XX,0,0,200777,-1,-1,-1,201400,0,ZZ,0
	REPEAT	^D17,
<T=T+1
	ZZ=XX
	XX=XX+XX
	DFARP	T,200000,XX,0,0,200777,-1,-1,-1,201400,ZZ,0,0
>

T=T+1
	ZZ=XX
	XX=1
	DFARP	T,200000+XX,0,0,0,200777,-1,-1,-1,201400,ZZ,0,0
	REPEAT	^D8,
<T=T+1
	ZZ=XX
	XX=XX+XX
	DFARP	T,200000+XX,0,0,0,200777,-1,-1,-1,201400+ZZ,0,0,0
>
;RIPPLE ZEROS TESTS (TO A FRACTION OF ALL ONES, ADD A RIPPLED ZERO)

T=1400

	XX=0

R1400:	REPEAT	^D18,
<T=T+1
	ZZ=XX
	IFE	ZZ,<ZZ=-1>
	XX=XX+XX+1
	IFE	<XX-1>,<XX=-2>
	DFARP	T,200777,-1,-1,-1,200777,-1,-1,XX,201777,-1,377777,ZZ
>

T=T+1
	ZZ=XX
	XX=-2
	DFARP	T,200777,-1,-1,-1,200777,-1,XX,-1,201777,-1,377777,ZZ

	REPEAT	^D16,
<T=T+1
	ZZ=XX
	XX=XX+XX+1
	DFARP	T,200777,-1,-1,-1,200777,-1,XX,-1,201777,-1,ZZ&377777,-1
>

T=T+1
	XX=XX+XX+1
	ZZ=XX
	DFARP	T,200777,-1,-1,-1,200777,-1,XX,-1,201777,-1,ZZ,-1

T=T+1
	ZZ=XX&177777
	XX=-2
	DFARP	T,200777,-1,-1,-1,200777,XX,-1,-1,201777,-1,ZZ,-1

	REPEAT	^D17,
<T=T+1
	ZZ=XX
	XX=XX+XX+1
	DFARP	T,200777,-1,-1,-1,200777,XX,-1,-1,201777,ZZ,377777,-1
>

T=T+1	
	ZZ=XX
	XX=-2
	DFARP	T,200777,-1,-1,-1,200777&XX,-1,-1,-1,201777,ZZ,377777,-1

	REPEAT	^D8,
<T=T+1
	ZZ=XX
	XX=XX+XX+1
	DFARP	T,200777,-1,-1,-1,200777&XX,-1,-1,-1,201777&ZZ,-1,377777,-1
>
;RIPPLE ZEROS TESTS (TO A RIPPLED ZERO, ADD A FRACTION OF ALL ONES)

T=1500

	XX=0

R1500:	REPEAT	^D18,
<T=T+1
	ZZ=XX
	IFE	ZZ,<ZZ=-1>
	XX=XX+XX+1
	IFE	<XX-1>,<XX=-2>
	DFARP	T,200777,-1,-1,XX,200777,-1,-1,-1,201777,-1,377777,ZZ
>

T=T+1
	ZZ=XX
	XX=-2
	DFARP	T,200777,-1,XX,-1,200777,-1,-1,-1,201777,-1,377777,ZZ

	REPEAT	^D16,
<T=T+1
	ZZ=XX
	XX=XX+XX+1
	DFARP	T,200777,-1,XX,-1,200777,-1,-1,-1,201777,-1,ZZ&377777,-1
>

T=T+1
	XX=XX+XX+1
	ZZ=XX
	DFARP	T,200777,-1,XX,-1,200777,-1,-1,-1,201777,-1,ZZ,-1

T=T+1
	ZZ=XX&177777
	XX=-2
	DFARP	T,200777,XX,-1,-1,200777,-1,-1,-1,201777,-1,ZZ,-1

	REPEAT	^D17,
<T=T+1	
	ZZ=XX
	XX=XX+XX+1
	DFARP	T,200777,XX,-1,-1,200777,-1,-1,-1,201777,ZZ,377777,-1
>

T=T+1
	ZZ=XX
	XX=-2
	DFARP	T,200777&XX,-1,-1,-1,200777,-1,-1,-1,201777,ZZ,377777,-1

	REPEAT	^D8,
<T=T+1
	ZZ=XX
	XX=XX+XX+1
	DFARP	T,200777&XX,-1,-1,-1,200777,-1,-1,-1,201777&ZZ,-1,377777,-1
>
;RIPPLE ONES TESTS (ADD A FRACTION OF A RIPPLED ONE TO SAME)

T=1600
	XX=0
	ZZ=103400

R1600:	REPEAT	^D18,
<T=T+1
	XX=XX+XX
	IFE	XX,<XX=1>
	ZZ=ZZ+1000
	DFARP	T,200000,0,0,XX,200000,0,0,XX,ZZ,0,0,0
>

	XX=0

	REPEAT	^D17,
<T=T+1
	XX=XX+XX
	IFE	XX,<XX=1>
	ZZ=ZZ+1000
	DFARP	T,200000,0,XX,0,200000,0,XX,0,ZZ,0,0,0
>
T=T+1
	XX=XX+XX
	DFARP	T,200000,0,XX,0,200000,0,XX,0,0,0,0,0

	XX=0

	REPEAT	^D18,
<T=T+1
	XX=XX+XX
	IFE	XX,<XX=1>
	ZZ=ZZ+1000
	DFARP	T,200000,XX,0,0,200000,XX,0,0,ZZ,0,0,0
>

	XX=0

	REPEAT	^D9,
<T=T+1
	XX=XX+XX
	IFE	XX,<XX=1>
	ZZ=ZZ+1000
	DFARP	T,200000+XX,0,0,0,200000+XX,0,0,0,ZZ,0,0,0
>

;RIPPLE ZEROS TESTS (ADD A FRACTION OF A RIPPLED ZERO TO SAME)

T=1700

	XX=0

R1700:	REPEAT	^D18,
<T=T+1
	XX=XX+XX+1
	IFE	<XX-1>,<XX=-2>
	DFARP	T,777,-1,-1,XX,777,-1,-1,XX,1777,-1,377777,XX
>

	XX=0

	REPEAT	^D18,
<T=T+1
	XX=XX+XX+1
	IFE	<XX-1>,<XX=-2>
	DFARP	T,777,-1,XX,-1,777,-1,XX,-1,1777,-1,XX&377777,-1
>

	XX=0

	REPEAT	^D18,
<T=T+1
	XX=XX+XX+1
	IFE	<XX-1>,<XX=-2>
	DFARP	T,777,XX,-1,-1,777,XX,-1,-1,1777,XX,377777,-1
>

	ZZ=0

	REPEAT	^D8,
<T=T+1
	XX=XX+XX+1
	IFE	<XX-1>,<XX=-2>
	DFARP	T,XX&777,-1,-1,-1,XX&777,-1,-1,-1,1000+XX&777,-1,377777,-1
>

T=T+1
	XX=<XX+XX+1>&777
	DFARP	T,XX,-1,-1,-1,XX,-1,-1,-1,XX+XX+1,-1,377777,-1
PAGE
;ADD A FRACTION OF ALL ONES TO SAME
	DFA	20,777,-1,-1,-1,777,-1,-1,-1,1777,-1,377777,-1

	JRST	BEGEND