Google
 

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

PGMNAM:	ASCIZ?
DECSYSTEM 2020 ADVANCED INSTRUCTION DIAGNOSTIC #5 (DSKCE)
?
;INITIALIZE SUBROUTINES

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

STARTA:	JRST	.+1		;GO PERFORM DIAGNOSTIC
SUBTTL CHECK NORMALIZATION FOR DOUBLE PRECISION FLOATING POINT NUMBERS

	AC=4
CE00:	SAVEAC	(1,1)
	JRSTF	@[.+1]		;CLEAR ALL FLAGS

T=101
S100:	SDFARP	T,201400,0,0,0,577400,0,0,0,200400,0,0,0

	XX=400
	ZZ=200400

	REPEAT	^D8,
<T=T+1
	XX=XX/2
	ZZ=ZZ-1000
	SDFARP	T,200400+XX,0,0,0,577400,0,0,0,ZZ,0,0,0
>

	XX=1000000

	REPEAT	^D18,
<T=T+1
	XX=XX/2
	ZZ=ZZ-1000
	SDFARP	T,200400,XX,0,0,577400,0,0,0,ZZ,0,0,0
>

	XX=400000

	REPEAT	^D17,
<T=T+1
	XX=XX/2
	ZZ=ZZ-1000
	SDFARP	T,200400,0,XX,0,577400,0,0,0,ZZ,0,0,0
>

	XX=1000000

	REPEAT	^D18,
<T=T+1
	XX=XX/2
	ZZ=ZZ-1000
	SDFARP	T,200400,0,0,XX,577400,0,0,0,ZZ,0,0,0
>
T=200
	XX=776777
	YY=577377
	ZZ=0

S200:	REPEAT	^D9,
<T=T+1
	XX=<XX-1>/2
	YY=YY+1000
	ZZ=ZZ+ZZ
	IFE	ZZ,<ZZ=-1>
	SDFARP	T,600000+XX&777,-1,-1,-1,0,0,0,0,YY,-1,377777,ZZ
>

	XX=777776777777

	REPEAT	^D10,
<T=T+1
	XX=<XX-1>/2
	YY=YY+1000
	ZZ=ZZ+ZZ
	SDFARP	T,600777,XX&777777,-1,-1,0,0,0,0,YY,-1,377777,ZZ
>

	ZZ=-1

	REPEAT	^D8,
<T=T+1
	XX=<XX-1>/2
	YY=YY+1000
	ZZ=ZZ+ZZ
	SDFARP	T,600777,XX,-1,-1,0,0,0,0,YY,-1,ZZ&377777,0
>
	XX=777777377777

	REPEAT	^D9,
<T=T+1
	XX=<XX-1>/2
	YY=YY+1000
	ZZ=ZZ+ZZ
	SDFARP	T,600777,-1,XX,-1,0,0,0,0,YY,-1,ZZ&377777,0
>

	ZZ=-1

	REPEAT	^D8,
<T=T+1
	XX=<XX-1>/2
	YY=YY+1000
	ZZ=ZZ+ZZ
	SDFARP	T,600777,-1,XX,-1,0,0,0,0,YY,ZZ,0,0
>

	XX=777776777777

	REPEAT	^D10,
<T=T+1
	XX=<XX-1>/2
	YY=YY+1000
	ZZ=ZZ+ZZ
	SDFARP	T,600777,-1,-1,XX,0,0,0,0,YY,ZZ,0,0
>

	YY=YY-377
	ZZ=-1

	REPEAT	^D7,
<T=T+1
	XX=<XX-1>/2
	YY=YY+1000
	ZZ=ZZ+ZZ
	SDFARP	T,600777,-1,-1,XX,0,0,0,0,YY+ZZ&377,0,0,0
>

T=T+1
	XX=<XX-1>/2
	ZZ=ZZ+ZZ
	SDFARP	T,600777,-1,-1,XX,0,0,0,0,YY+ZZ&777,0,0,0
SUBTTL	DFAD TEST-DOUBLE FLOATING POINT ADD AND ROUND

;CHECK THAT DFAD AC,E DOES NOT ALTER C(E) OR C(E+1)

S10100:	DMOVE	AC,[200777,,-1
		-1,,-1]
	DMOVE	AC+2,[200000,,0
		400000,,-1]
	DFAD	AC,AC+2
	CAME	AC+2,[200000,,0]
	ER5	AC+2,10101	;C(E) WAS ALTERED
	CAME	AC+3,[400000,,-1]
	ER6	AC+3,10101	;C(E+1) WAS ALTERED
	JUMPL	AC+4,S10100	;LOOP ON ERROR SWITCH

	SDFA	102,600,0,0,0,400,0,0,0,1500,0,0,0

	SDFA	103,377000,0,0,0,377600,0,0,0,377600,0,0,0

	SDFA	104,600400,0,0,0,177400,0,0,0,0,0,0,0

	SDFA	105,200400,0,0,0,205400,0,0,0,205410,0,0,0

	SDFA	106,200400,0,0,0,205600,0,0,0,205610,0,0,0

	SDFA	107,600,0,0,0,200400,0,0,0,200400,0,0,0

	SDFA	110,200700,0,0,0,0,0,0,0,200700,0,0,0

	SDFA	111,201400,0,0,0,200400,0,0,0,201600,0,0,0

	SDFA	112,202400,0,0,0,200400,0,0,0,202500,0,0,0

	SDFA	113,204400,0,0,0,200400,0,0,0,204420,0,0,0

	SDFA	114,210400,0,0,0,200400,0,0,0,210401,0,0,0

	SDFA	115,220400,0,0,0,200400,0,0,0,220400,2000,0,0

	SDFA	116,240400,0,0,0,200400,0,0,0,240400,0,4000,0

	SDFA	117,300400,0,0,0,200400,0,0,0,300400,0,0,0

	SDFA	120,600400,0,0,0,600400,0,0,0,577400,0,0,0

	SDFA	121,0,0,0,0,205400,0,0,0,205400,0,0,0

	SDFA	122,200400,0,0,0,200400,0,0,0,201400,0,0,0

	SDFA	123,577400,0,0,0,577400,0,0,0,576400,0,0,0

	SDFA	124,205600,0,0,0,177400,0,0,0,205604,0,0,0
	SDFA	125,201000,0,0,0,202000,0,0,0,0,0,0,0

	SDFA	126,202000,0,0,0,204000,0,0,0,0,0,0,0

	SDFA	127,204000,0,0,0,207000,0,0,0,0,0,0,0

	SDFA	130,210000,0,0,0,214000,0,0,0,0,0,0,0

	SDFA	131,220000,0,0,0,225000,0,0,0,0,0,0,0

	SDFA	132,240000,0,0,0,246000,0,0,0,0,0,0,0

	SDFA	133,300000,0,0,0,307000,0,0,0,0,0,0,0

	SDFA	134,200000,0,0,0,600400,0,0,0,600400,0,0,0

	SDFA	135,201000,0,0,0,600400,0,0,0,600400,0,0,0

	SDFA	136,202000,0,0,0,600400,0,0,0,600400,0,0,0

	SDFA	137,203000,0,0,0,600400,0,0,0,600400,0,0,0

	SDFA	140,204000,0,0,0,600400,0,0,0,600400,0,0,0

	SDFA	141,206000,0,0,0,600400,0,0,0,600400,0,0,0

	SDFA	142,207000,0,0,0,600400,0,0,0,600400,0,0,0

	SDFA	143,400200,0,0,0,377400,0,0,0,401400,0,0,0

	SDFA	144,377400,0,0,0,400200,0,0,0,401400,0,0,0

	SDFA	145,200400,0,0,0,600400,0,0,0,177400,0,0,0

	SDFA	146,200600,0,0,0,201400,0,0,0,201700,0,0,0

	SDFA	147,577600,0,0,0,200400,0,0,0,177400,0,0,0

	SDFA	150,600400,0,0,0,577200,0,0,0,576400,0,0,0

	SDFA	151,576400,0,0,0,200400,0,0,0,577400,0,0,0

	SDFA	152,200440,0,0,0,200400,0,0,0,201420,0,0,0

	SDFA	153,577400,0,0,0,577400,0,0,0,576400,0,0,0

	SDFA	154,200400,77,0,0,206400,0,0,0,206404,0,374000,0

	SDFA	155,30400,3,0,0,32400,0,0,0,32500,0,300000,0

	SDFA	156,200400,1,0,0,201600,0,0,0,202400,0,100000,0

	SDFA	157,577400,3,0,0,202400,0,0,0,201600,1,200000,0

	SDFA	160,200400,3,0,0,202400,0,0,0,202500,0,300000,0

	SDFA	161,200400,-1,0,0,202400,0,0,0,202500,177777,300000,0

	SDFA	162,200200,1,0,0,200200,1,0,0,200400,2,0,0

	SDFA	163,200200,2,0,0,200200,2,0,0,200400,4,0,0

	SDFA	164,200200,4,0,0,200200,4,0,0,200400,10,0,0

	SDFA	165,200200,10,0,0,200200,10,0,0,200400,20,0,0

	SDFA	166,200200,20,0,0,200200,20,0,0,200400,40,0,0

	SDFA	167,200200,40,0,0,200200,40,0,0,200400,100,0,0

	SDFA	170,200200,100,0,0,200200,100,0,0,200400,200,0,0

	SDFA	171,200200,200,0,0,200200,200,0,0,200400,400,0,0

	SDFA	172,200200,400,0,0,200200,400,0,0,200400,1000,0,0

	SDFA	173,200200,1000,0,0,200200,1000,0,0,200400,2000,0,0

	SDFA	174,172400,0,0,0,201400,0,0,0,201402,0,0,0

	SDFA	175,173400,0,0,0,201400,0,0,0,201404,0,0,0

	SDFA	176,174400,0,0,0,201400,0,0,0,201410,0,0,0

	SDFA	177,175400,0,0,0,201400,0,0,0,201420,0,0,0

	SDFA	200,176400,0,0,0,201400,0,0,0,201440,0,0,0

	SDFA	201,177400,0,0,0,201400,0,0,0,201500,0,0,0

	SDFA	202,202600,0,0,0,200400,0,0,0,202700,0,0,0

	SDFA	203,400,0,0,0,200400,0,0,0,200400,0,0,0

	SDFA	204,400,0,0,0,201400,0,0,0,201400,0,0,0

	SDFA	205,400,0,0,0,202400,0,0,0,202400,0,0,0

	SDFA	206,200000,0,0,0,201000,0,0,0,0,0,0,0

	SDFA	207,200000,0,0,0,202000,0,0,0,0,0,0,0

	SDFA	210,200000,0,0,0,203000,0,0,0,0,0,0,0

	SDFA	211,200400,0,0,0,200400,0,0,0,201400,0,0,0

	SDFA	212,201400,0,0,0,201400,0,0,0,202400,0,0,0

	SDFA	213,202400,0,0,0,202400,0,0,0,203400,0,0,0

	SDFA	214,200100,0,0,0,200100,0,0,0,177400,0,0,0

	SDFA	215,200040,0,0,0,200040,0,0,0,176400,0,0,0

	SDFA	216,200020,0,0,0,200020,0,0,0,175400,0,0,0

	SDFA	217,577400,0,0,0,576400,0,0,0,576200,0,0,0

	SDFA	220,600400,0,0,0,576400,0,0,0,576300,0,0,0

	SDFA	221,601400,0,0,0,576400,0,0,0,576340,0,0,0

	SDFA	222,576400,0,0,0,577400,0,0,0,576200,0,0,0

	SDFA	223,576400,0,0,0,600400,0,0,0,576300,0,0,0

	SDFA	224,576400,0,0,0,601400,0,0,0,576340,0,0,0

	SDFA	225,577400,0,0,0,577400,0,0,0,576400,0,0,0

	SDFA	226,601400,0,0,0,601400,0,0,0,600400,0,0,0

	SDFA	227,201400,0,0,0,577400,0,0,0,200400,0,0,0

	SDFA	230,201400,0,0,0,600400,0,0,0,200600,0,0,0

	SDFA	231,201400,0,0,0,601400,0,0,0,200700,0,0,0

	SDFA	232,200000,0,0,0,200000,1,0,0,146400,0,0,0

	SDFA	233,200000,0,0,0,200000,2,0,0,147400,0,0,0

	SDFA	234,200000,0,0,0,200000,4,0,0,150400,0,0,0

	SDFA	235,200000,0,0,0,200000,10,0,0,151400,0,0,0

	SDFA	236,200000,0,0,0,200000,20,0,0,152400,0,0,0

	SDFA	237,200000,0,0,0,200000,40,0,0,153400,0,0,0

	SDFA	240,200000,0,0,0,200000,100,0,0,154400,0,0,0

	SDFA	241,200000,0,0,0,200000,200,0,0,155400,0,0,0

	SDFA	242,200000,0,0,0,200000,400,0,0,156400,0,0,0

	SDFA	243,200000,0,0,0,200000,1000,0,0,157400,0,0,0

	SDFA	244,200000,0,0,0,200000,2000,0,0,160400,0,0,0

	SDFA	245,200000,0,0,0,200000,4000,0,0,161400,0,0,0
	SDFA	246,200000,0,0,0,200000,10000,0,0,162400,0,0,0

	SDFA	247,200000,0,0,0,200000,20000,0,0,163400,0,0,0

	SDFA	250,200000,0,0,0,200000,40000,0,0,164400,0,0,0

	SDFA	251,200000,0,0,0,200000,100000,0,0,165400,0,0,0

	SDFA	252,200000,0,0,0,200000,200000,0,0,166400,0,0,0

	SDFA	253,200000,0,0,0,200000,400000,0,0,167400,0,0,0

	SDFA	254,200000,0,0,0,200001,0,0,0,170400,0,0,0

	SDFA	255,200000,0,0,0,200002,0,0,0,171400,0,0,0

	SDFA	256,200000,0,0,0,200004,0,0,0,172400,0,0,0

	SDFA	257,200000,0,0,0,200010,0,0,0,173400,0,0,0

	SDFA	260,200000,0,0,0,200020,0,0,0,174400,0,0,0

	SDFA	261,200000,0,0,0,200040,0,0,0,175400,0,0,0

	SDFA	262,200000,0,0,0,200100,0,0,0,176400,0,0,0

	SDFA	263,377400,0,0,0,377400,0,0,0,400,0,0,0

	SDFA	264,777700,0,0,0,777700,0,0,0,400400,0,0,0

	SDFA	265,200000,0,0,0,200777,-1,0,0,200777,-1,0,0

	SDFA	266,200000,1,0,0,201400,0,0,0,201400,0,200000,0

	SDFA	267,200000,2,0,0,202400,0,0,0,202400,0,200000,0

	SDFA	270,200000,4,0,0,203400,0,0,0,203400,0,200000,0

	SDFA	271,200000,10,0,0,204400,0,0,0,204400,0,200000,0

	SDFA	272,200000,20,0,0,205400,0,0,0,205400,0,200000,0

	SDFA	273,200000,40,0,0,206400,0,0,0,206400,0,200000,0

	SDFA	274,200000,100,0,0,207400,0,0,0,207400,0,200000,0

	SDFA	275,200000,200,0,0,210400,0,0,0,210400,0,200000,0

	SDFA	276,200000,400,0,0,211400,0,0,0,211400,0,200000,0

	SDFA	277,200000,1000,0,0,212400,0,0,0,212400,0,200000,0

	SDFA	300,200000,2000,0,0,213400,0,0,0,213400,0,200000,0

	SDFA	301,200000,4000,0,0,214400,0,0,0,214400,0,200000,0
	SDFA	302,200000,10000,0,0,215400,0,0,0,215400,0,200000,0

	SDFA	303,200000,20000,0,0,216400,0,0,0,216400,0,200000,0

	SDFA	304,200000,40000,0,0,217400,0,0,0,217400,0,200000,0

	SDFA	305,200000,100000,0,0,220400,0,0,0,220400,0,200000,0

	SDFA	306,200000,200000,0,0,221400,0,0,0,221400,0,200000,0

	SDFA	307,200000,400000,0,0,222400,0,0,0,222400,0,200000,0

	SDFA	310,200001,0,0,0,223400,0,0,0,223400,0,200000,0

	SDFA	311,200002,0,0,0,224400,0,0,0,224400,0,200000,0

	SDFA	312,200004,0,0,0,225400,0,0,0,225400,0,200000,0

	SDFA	313,200010,0,0,0,226400,0,0,0,226400,0,200000,0

	SDFA	314,200020,0,0,0,227400,0,0,0,227400,0,200000,0

	SDFA	315,200040,0,0,0,230400,0,0,0,230400,0,200000,0

	SDFA	316,200100,0,0,0,231400,0,0,0,231400,0,200000,0

	SDFA	317,200200,0,0,0,232400,0,0,0,232400,0,200000,0

	SDFA	320,200400,0,0,0,233400,0,0,0,233400,0,200000,0

	SDFA	321,200400,0,0,0,200400,1,0,0,201400,0,200000,0

	SDFA	322,200400,0,0,0,201400,0,0,0,201600,0,0,0

	SDFA	323,200000,3,0,0,202400,0,0,0,202400,0,300000,0

	SDFA	324,200000,5,0,0,203400,0,0,0,203400,0,240000,0

	SDFA	325,200000,11,0,0,204400,0,0,0,204400,0,220000,0

	SDFA	326,200000,21,0,0,205400,0,0,0,205400,0,210000,0

	SDFA	327,200000,41,0,0,206400,0,0,0,206400,0,204000,0

	SDFA	330,200000,101,0,0,207400,0,0,0,207400,0,202000,0

	SDFA	331,200000,201,0,0,210400,0,0,0,210400,0,201000,0

	SDFA	332,200000,401,0,0,211400,0,0,0,211400,0,200400,0

	SDFA	333,200000,1001,0,0,212400,0,0,0,212400,0,200200,0

	SDFA	334,200000,2001,0,0,213400,0,0,0,213400,0,200100,0
	SDFA	335,200000,4001,0,0,214400,0,0,0,214400,0,200040,0

	SDFA	336,200000,10001,0,0,215400,0,0,0,215400,0,200020,0

	SDFA	337,200000,20001,0,0,216400,0,0,0,216400,0,200010,0

	SDFA	340,200000,40001,0,0,217400,0,0,0,217400,0,200004,0

	SDFA	341,200000,100001,0,0,220400,0,0,0,220400,0,200002,0

	SDFA	342,200000,200001,0,0,221400,0,0,0,221400,0,200001,0

	SDFA	343,200000,400001,0,0,222400,0,0,0,222400,0,200000,400000
;TEST AROV, FOV AND FXU FLAGS - DFAD

	AC=4
	SAVEAC	(1,1)

S34400:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[377400,,0
		    0,,0]
	DFAD	AC,[376777,,-1
		    -1,,-2]	;EXPECT AROV, FOV, FXU=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[377777,,-1]
	ER3	AC,34401	;C(AC) FAILED
	CAME	AC+1,[377777,,-1]
	ER4	AC+1,34401	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,34401	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,34401	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,34401	;FXU WAS SET
	JUMPL	AC+4,S34400	;LOOP ON ERROR SWITCH

S34500:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[377400,,0
		    0,,0]
	DFAD	AC,[377400,,0
		    0,,0]	;EXPECT AROV, FOV, FXU=1,1,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400,,0]
	ER3	AC,34501	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,34501	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,34501	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,34501	;FOV WAS CLEAR
	TLNE	AC-1,FXU
	ER13	AC-1,34501	;FXU WAS SET
	JUMPL	AC+4,S34500	;LOOP ON ERROR SWITCH
S34600:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[200,,0
		    0,,0]
	DFAD	AC,[200,,0
		    0,,0]	;EXPECT AROV, FOV, FXU=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400,,0]
	ER3	AC,34601	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,34601	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,34601	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,34601	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,34601	;FXU WAS SET
	JUMPL	AC+4,S34600	;LOOP ON ERROR SWITCH

S34700:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[200,,0
		    0,,0]
	DFAD	AC,[177,,-1
		    -1,,-1]	;EXPECT AROV,FOV,FXU=1,1,1
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[377777,,-1]
	ER3	AC,34701	;C(AC) FAILED
	CAME	AC+1,[377777,,-2]
	ER4	AC+1,34701	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,34701	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,34701	;FOV WAS CLEAR
	TLNN	AC-1,FXU
	ER13	AC-1,34701	;FXU WAS CLEAR
	JUMPL	AC+4,S34700	;LOOP ON ERROR SWITCH
S35000:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[400400,,0
		    0,,0]
	DFAD	AC,[401000,,0
		    0,,2]	;EXPECT AROV, FOV, FXU = 0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400000,,0]
	ER3	AC,35001	;C(AC) FAILED
	CAME	AC+1,[0,,1]
	ER4	AC+1,35001	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,35001	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,35001	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,35001	;FXU WAS SET
	JUMPL	AC+4,S35000	;LOOP ON ERROR SWITCH

S35100:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[400400,,0
		    0,,0]
	DFAD	AC,[400400,,0
		    0,,0]	;EXPECT AROV, FOV, FXU=1,1,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[777400,,0]
	ER3	AC,35101	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,35101	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,35101	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,35101	;FOV WAS CLEAR
	TLNE	AC-1,FXU
	ER13	AC-1,35101	;FXU WAS SET
	JUMPL	AC+4,S35100	;LOOP ON ERROR SWITCH
S35200:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[777600,,0
		    0,,0]
	DFAD	AC,[777600,,0
		    0,,0]	;EXPECT AROV,FOV,FXV=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[777400,,0]
	ER3	AC,35201	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,35201	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,35201	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,35201	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,35201	;FXU WAS SET
	JUMPL	AC+4,S35200	;LOOP ON ERROR SWITCH

S35300:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[777600,,0
		    0,,0]
	DFAD	AC,[777600,,0
		    0,,1]	;EXPECT AROV,FOV,FXU=1,1,1
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400000,,0]
	ER3	AC,35301	;C(AC) FAILED
	CAME	AC+1,[0,,2]
	ER4	AC+1,35301	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,35301	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,35301	;FOV WAS CLEAR
	TLNN	AC-1,FXU
	ER13	AC-1,35301	;FXU WAS CLEAR
	JUMPL	AC+4,S35300	;LOOP ON ERROR SWITCH
SUBTTL	DFSB TEST-DOUBLE FLOATING POINT SUBTRACT AND ROUND

	AC=4
	SAVEAC	(1,1)
	JRSTF	@[.+1]		;CLEAR ALL FLAGS

;CHECK THAT DFSB AC,E DOES NOT ALTER C(E) OR C(E+1)
S40100:	DMOVE	AC,[200777,,-1
		-1,,-1]
	DMOVE	AC+2,[200000,,0
		400000,,-1]
	DFSB	AC,AC+2
	CAME	AC+2,[200000,,0]
	ER5	AC+2,40101	;C(E) WAS ALTERED
	CAME	AC+3,[400000,,-1]
	ER6	AC+3,40101	;C(E+1) WAS ALTERED
	JUMPL	AC+4,S40100	;LOOP ON ERROR SWITCH

	SDFS	402,205400,0,0,0,177400,0,0,0,204770,0,0,0

	SDFS	403,200400,0,0,0,177400,0,0,0,177400,0,0,0

	SDFS	404,200400,0,0,0,200400,0,0,0,0,0,0,0

	SDFS	405,201400,0,0,0,177400,0,0,0,200600,0,0,0

	SDFS	406,576400,0,0,0,600400,0,0,0,577200,0,0,0

	SDFS	407,201400,0,0,0,577400,0,0,0,201600,0,0,0

	SDFS	410,203400,0,0,0,200477,777775,0,0,202660,0,300000,0
;TEST AROV, FOV AND FXU FLAGS - DFSB

	AC=4
	SAVEAC	(1,1)

S41100:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[377400,,0
		    0,,0]
	DFSB	AC,[400400,,0
		    0,,1]	;EXPECT AROV,FOV,FXU=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[377777,,-1]
	ER3	AC,41101	;C(AC) FAILED
	CAME	AC+1,[377777,,-1]
	ER4	AC+1,41101	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,41101	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,41101	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,41101	;FXU WAS SET
	JUMPL	AC+4,S41100	;LOOP ON ERROR SWITCH

S41200:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[377400,,0
		    0,,0]
	DFSB	AC,[400400,,0
		    0,,0]	;EXPECT AROV,FOV,FXU=1,1,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400,,0]
	ER3	AC,41201	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,41201	;C(AC+1)FAILED
	JOV	.+2
	ER13	AC-1,41201	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,41201	;FOV WAS CLEAR
	TLNE	AC-1,FXU
	ER13	AC-1,41201	;FXU WAS SET
	JUMPL	AC+4,S41200	;LOOP ON ERROR SWITCH
S41300:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[777,,-1
		    -1,,-1]
	DFSB	AC,[377,,-1
		    -1,,-1]	;EXPECT AROV,FOV,FXU=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400,,0]
	ER3	AC,41301	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,41301	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,41301	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,41301	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,41301	;FXU WAS SET
	JUMPL	AC+4,S41300	;LOOP ON ERROR SWITCH

S41400:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[777,,-1
		    -1,,-1]
	DFSB	AC,[400,,0
		    0,,0]	;EXPECT AROV,FOV,FXU=1,1,1
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[377777,,-1]
	ER3	AC,41401	;C(AC) FAILED
	CAME	AC+1,[377777,,-2]
	ER4	AC+1,41401	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,41401	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,41401	;FOV WAS CLEAR
	TLNN	AC-1,FXU
	ER13	AC-1,41401	;FXU WAS CLEAR
	JUMPL	AC+4,S41400	;LOOP ON ERROR SWITCH
S41500:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[400400,,0
		    0,,0]
	DFSB	AC,[377377,,-1
		    -1,,-1]	;EXPECT AROV,FOV,FXU=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400000,,0]
	ER3	AC,41501	;C(AC) FAILED
	CAME	AC+1,[0,,1]
	ER4	AC+1,41501	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,41501	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,41501	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,41501	;FXU WAS SET
	JUMPL	AC+4,S41500	;LOOP ON ERROR SWITCH

S41600:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[400400,,0
		    0,,0]
	DFSB	AC,[377400,,0
		    0,,0]	;EXPECT AROV,FOV,FXU=1,1,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[777400,,0]
	ER3	AC,41601	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,41601	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,41601	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,41601	;FOV WAS CLEAR
	TLNE	AC-1,FXU
	ER13	AC-1,41601	;FXU WAS SET
	JUMPL	AC+4,S41600	;LOOP ON ERROR SWITCH
S41700:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[777000,,0
		    0,,0]
	DFSB	AC,[777400,,0
		    0,,0]	;EXPECT AROV,FOV,FXU=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[777400,,0]
	ER3	AC,41701	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,41701	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,41701	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,41701	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,41701	;FXU WAS SET
	JUMPL	AC+4,S41700	;LOOP ON ERROR SWITCH

S42000:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[777000,,0
		    0,,1]
	DFSB	AC,[777400,,0
		    0,,0]	;EXPECT AROV,FOV,FXU=1,1,1
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400000,,0]
	ER3	AC,42001	;C(AC) FAILED
	CAME	AC+1,[0,,2]
	ER4	AC+1,42001	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,42001	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,42001	;FOV WAS CLEAR
	TLNN	AC-1,FXU
	ER13	AC-1,42001	;FXU WAS CLEAR
	JUMPL	AC+4,S42000	;LOOP ON ERROR SWITCH
SUBTTL	DFMP TEST-DOUBLE FLOATING POINT MULTIPLY AND ROUND

	AC=4
	SAVEAC	(1,1)
	JRSTF	@[.+1]		;CLEAR ALL FLAGS

;CHECK THAT DFMP AC,E DOES NOT ALTER C(E) OR C(E+1)
S50100:	DMOVE	AC,[200777,,-1
		-1,,-1]
	DMOVE	AC+2,[201400,,0
		400000,,-1]
	DFMP	AC,AC+2
	CAME	AC+2,[201400,,0]
	ER5	AC+2,50101	;C(E) WAS ALTERED
	CAME	AC+3,[400000,,-1]
	ER6	AC+3,50101	;C(E+1) WAS ALTERED
	JUMPL	AC+4,S50100	;LOOP ON ERROR SWITCH

	SDFM	502,200400,0,0,0,0,0,0,0,0,0,0,0

	SDFM	503,200400,0,0,0,200400,0,0,0,177400,0,0,0

	SDFM	504,400,0,0,0,400,0,0,0,177400,0,0,0

	SDFM	505,200400,0,0,0,400,0,0,0,377400,0,0,0

	SDFM	506,177400,0,0,0,400,0,0,0,376400,0,0,0

	SDFM	507,377400,0,0,0,400,0,0,0,176400,0,0,0

	SDFM	510,577400,0,0,0,400,0,0,0,400400,0,0,0

	SDFM	511,400,0,0,0,200400,0,0,0,377400,0,0,0

	SDFM	512,200400,0,0,0,577400,0,0,0,600400,0,0,0

	SDFM	513,200400,0,0,0,205400,0,0,0,204400,0,0,0

	SDFM	514,0,0,0,0,577400,0,0,0,0,0,0,0

	SDFM	515,200400,0,0,0,201400,0,0,0,200400,0,0,0

	SDFM	516,200400,0,0,0,202400,0,0,0,201400,0,0,0

	SDFM	517,200400,0,0,0,204400,0,0,0,203400,0,0,0

	SDFM	520,200400,0,0,0,210400,0,0,0,207400,0,0,0

	SDFM	521,200400,0,0,0,220400,0,0,0,217400,0,0,0

	SDFM	522,200400,0,0,0,240400,0,0,0,237400,0,0,0

	SDFM	523,200400,0,0,0,300400,0,0,0,277400,0,0,0

	SDFM	524,201400,0,0,0,200400,0,0,0,200400,0,0,0

	SDFM	525,202400,0,0,0,200400,0,0,0,201400,0,0,0

	SDFM	526,204400,0,0,0,200400,0,0,0,203400,0,0,0

	SDFM	527,210400,0,0,0,200400,0,0,0,207400,0,0,0

	SDFM	530,220400,0,0,0,200400,0,0,0,217400,0,0,0

	SDFM	531,240400,0,0,0,200400,0,0,0,237400,0,0,0

	SDFM	532,300400,0,0,0,200400,0,0,0,277400,0,0,0

	SDFM	533,200400,0,0,0,576400,0,0,0,577400,0,0,0

	SDFM	534,200400,0,0,0,575400,0,0,0,576400,0,0,0

	SDFM	535,200777,-1,0,0,200400,0,0,0,177777,-1,0,0

	SDFM	536,200777,-2,0,0,200400,0,0,0,177777,-2,0,0

	SDFM	537,200777,-3,0,0,200400,0,0,0,177777,-3,0,0

	SDFM	540,200777,-4,0,0,200400,0,0,0,177777,-4,0,0

	SDFM	541,0,0,0,0,200400,0,0,0,0,0,0,0

	SDFM	542,577400,0,0,0,200400,0,0,0,600400,0,0,0

	SDFMKL	543,501700,0,0,0,500400,0,0,0,374100,0,0,0,372400,0,0,0

	SDFMKL	544,502700,0,0,0,500400,0,0,0,373100,0,0,0,371400,0,0,0

	SDFMKL	545,503700,0,0,0,500400,0,0,0,372100,0,0,0,370400,0,0,0

	SDFMKL	546,504700,0,0,0,500400,0,0,0,371100,0,0,0,367400,0,0,0

	SDFMKL	547,505700,0,0,0,500400,0,0,0,370100,0,0,0,366400,0,0,0

	SDFMKL	550,200200,0,0,0,200400,0,0,0,177200,0,0,0,176400,0,0,0

	SDFMKL	551,200100,0,0,0,200400,0,0,0,177100,0,0,0,175400,0,0,0

	SDFMKL	552,200040,0,0,0,200400,0,0,0,177040,0,0,0,174400,0,0,0

	SDFMKL	553,200020,0,0,0,200400,0,0,0,177020,0,0,0,173400,0,0,0

	SDFMKL	554,200010,0,0,0,200400,0,0,0,177010,0,0,0,172400,0,0,0

	SDFMKL	555,200004,0,0,0,200400,0,0,0,177004,0,0,0,171400,0,0,0

	SDFMKL	556,200002,0,0,0,200400,0,0,0,177002,0,0,0,170400,0,0,0

	SDFMKL	557,500700,0,0,0,200400,0,0,0,501700,0,0,0,503400,0,0,0
	SDFMKL	560,500770,0,0,0,200400,0,0,0,501770,0,0,0,506400,0,0,0

	SDFM	561,200775,0,0,0,200775,0,0,0,200772,11000,0,0

	SDFM	562,200774,0,0,0,200774,0,0,0,200770,20000,0,0

	SDFM	563,200773,0,0,0,200773,0,0,0,200766,31000,0,0

	SDFM	564,177477,0,0,0,200700,0,0,0,177427,100000,0,0

	SDFM	565,200777,-1,0,0,200777,-1,0,0,200777,-2,0,400

	SDFM	566,200777,-2,0,0,200777,-1,0,0,200777,-3,0,1000

	SDFM	567,200777,-3,0,0,200777,-1,0,0,200777,-4,0,1400

	SDFM	570,200777,-4,0,0,200777,-1,0,0,200777,-5,0,2000

	SDFM	571,200777,-5,0,0,200777,-1,0,0,200777,-6,0,2400

	SDFM	572,500000,-1,0,0,200777,0,0,0,500001,776777,400,0

	SDFM	573,500000,777770,0,0,200777,0,0,0,500001,776770,4000,0

	SDFM	574,500000,-1,0,0,500000,-1,0,0,376776,1001,377000,400

	SDFM	575,500000,-2,0,0,500000,-2,0,0,376776,1003,376000,2000

	SDFMKL	576,200777,-1,0,0,200000,2,0,0,177000,3,377777,776000,146777,-1,0,0

	SDFM	577,200700,0,0,0,200400,77,0,0,177700,156,100000,0

	SDFM	600,200700,0,0,0,200400,76,0,0,177700,154,200000,0

	SDFM	601,200700,0,0,0,200400,75,0,0,177700,152,300000,0

	SDFM	602,577400,0,0,0,600400,0,0,0,176400,0,0,0

	SDFM	603,600400,77,0,0,177660,0,0,0,602120,152,120000,0

	SDFM	604,600400,76,0,0,177600,0,0,0,602200,135,0,0

	SDFM	605,600400,0,0,0,576400,0,0,0,177400,0,0,0

	SDFM	606,600400,0,0,0,575400,0,0,0,200400,0,0,0

	SDFM	607,400000,1,0,0,201400,0,0,0,400000,1,0,0
;TEST AROV, FOV AND FXU FLAGS - DFMP

	AC=4
	SAVEAC	(1,1)

S61000:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[377400,,0
		    0,,0]
	DFMP	AC,[201777,,-1
		    -1,,-1]	;EXPECT AROV,FOV,FXU=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[377777,,-1]
	ER3	AC,61001	;C(AC) FAILED
	CAME	AC+1,[377777,,-1]
	ER4	AC+1,61001	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,61001	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,61001	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,61001	;FXU WAS SET
	JUMPL	AC+4,S61000	;LOOP ON ERROR SWITCH

S61100:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[377400,,0
		    0,,0]
	DFMP	AC,[202400,,0
		    0,,0]	;EXPECT AROV,FOV,FXU=1,1,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400,,0]
	ER3	AC,61101	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,61101	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,61101	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,61101	;FOV WAS CLEAR
	TLNE	AC-1,FXU
	ER13	AC-1,61101	;FXU WAS SET
	JUMPL	AC+4,S61100	;LOOP ON ERROR SWITCH
S61200:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[1400,,0
		    0,,0]
	DFMP	AC,[200400,,0
		    0,,0]	;EXPECT AROV,FOV,FXU=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400,,0]
	ER3	AC,61201	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,61201	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,61201	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,61201	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,61201	;FXU WAS SET
	JUMPL	AC+4,S61200	;LOOP ON ERROR SWITCH

S61300:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[777,,-1
		    -1,,-1]
	DFMP	AC,[200400,,0
		    0,,0]	;EXPECT AROV,FOV,FXU=1,1,1
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[377777,,-1]
	ER3	AC,61301	;C(AC) FAILED
	CAME	AC+1,[377777,,-1]
	ER4	AC+1,61301	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,61301	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,61301	;FOV WAS CLEAR
	TLNN	AC-1,FXU
	ER13	AC-1,61301	;FXU WAS CLEAR
	JUMPL	AC+4,S61300	;LOOP ON ERROR SWITCH
S61400:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[400400,,0
		    0,,0]
	DFMP	AC,[576000,,00
		    0,,1]	;EXPECT AROV,FOV,FXU=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[377777,,-1]
	ER3	AC,61401	;C(AC) FAILED
	CAME	AC+1,[377777,,-1]
	ER4	AC+1,61401	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,61401	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,61401	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,61401	;FXU WAS SET
	JUMPL	AC+4,S61400	;LOOP ON ERROR SWITCH

S61500:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[400400,,0
		    0,,0]
	DFMP	AC,[575400,,0
		    0,,0]	;EXPECT AROV,FOV,FXU=1,1,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400,,0]
	ER3	AC,61501	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,61501	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,61501	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,61501	;FOV WAS CLEAR
	TLNE	AC-1,FXU
	ER13	AC-1,61501	;FXU WAS SET
	JUMPL	AC+4,S61500	;LOOP ON ERROR SWITCH
S61600:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[776400,,0
		    0,,0]
	DFMP	AC,[577400,,0
		    0,,0]	;EXPECT AROV,FOV,FXU=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400,,0]
	ER3	AC,61601	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,61601	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,61601	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,61601	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,61601	;FXU WAS SET
	JUMPL	AC+4,S61600	;LOOP ON ERROR SWITCH

S61700:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[777000,,0
		    0,,1]
	DFMP	AC,[577400,,0
		    0,,0]	;EXPECT AROV,FOV,FXU=1,1,1
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[377777,,-1]
	ER3	AC,61701		;C(AC) FAILED
	CAME	AC+1,[377777,,-1]
	ER4	AC+1,61701	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,61701	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,61701	;FOV WAS CLEAR
	TLNN	AC-1,FXU
	ER13	AC-1,61701	;FXU WAS CLEAR
	JUMPL	AC+4,S61700	;LOOP ON ERROR SWITCH
SUBTTL	DFDV TEST-DOUBLE FLOATING POINT DIVIDE

	AC=4
	SAVEAC	(1,1)
	JRSTF	@[.+1]		;CLEAR ALL FLAGS

;CHECK THAT DFDV AC,E DOES NOT ALTER C(E) OR C(E+1)
S70100:	DMOVE	AC,[200777,,-1
		-1,,-1]
	DMOVE	AC+2,[200400,,0
		400000,,-1]
	DFDV	AC,AC+2
	CAME	AC+2,[200400,,0]
	ER5	AC+2,70101	;C(E) WAS ALTERED
	CAME	AC+3,[400000,,-1]
	ER6	AC+3,70101	;C(E+1) WAS ALTERED
	JUMPL	AC+4,S70100	;LOOP ON ERROR SWITCH

	SDFD	702,200400,0,0,0,200400,0,0,0,201400,0,0,0

	SDFD	703,201400,0,0,0,201400,0,0,0,201400,0,0,0

	SDFD	704,202400,0,0,0,202400,0,0,0,201400,0,0,0

	SDFD	705,201400,0,0,0,200400,0,0,0,202400,0,0,0

	SDFD	706,202400,0,0,0,202400,0,0,0,201400,0,0,0

	SDFD	707,203400,0,0,0,200400,0,0,0,204400,0,0,0

	SDFD	710,200600,0,0,0,200400,0,0,0,201600,0,0,0

	SDFD	711,200700,0,0,0,200400,0,0,0,201700,0,0,0

	SDFD	712,200740,0,0,0,200400,0,0,0,201740,0,0,0

	SDFD	713,200400,0,0,0,577400,0,0,0,576400,0,0,0

	SDFD	714,200600,0,0,0,577400,0,0,0,576200,0,0,0

	SDFD	715,177400,0,0,0,204400,0,0,0,174400,0,0,0

	SDFD	716,576400,0,0,0,200600,0,0,0,576252,525252,252525,252525

	SDFD	717,600600,0,0,0,577400,0,0,0,177400,0,0,0

	SDFD	720,600400,0,0,0,577400,0,0,0,200400,0,0,0

	SDFD	721,377400,-1,0,0,577400,-1,0,0,777375,773771,373773,776004

	SDFD	722,201400,0,0,0,0,0,0,0,201400,0,0,0

	SDFD	723,377400,0,0,0,400,0,0,0,200400,0,0,0

	SDFD	724,577775,0,0,0,577777,0,0,0,577775,0,0,0

	SDFD	725,577774,0,0,0,577777,0,0,0,577774,0,0,0
	SDFD	726,210777,-1,0,0,170750,0,0,0,221414,456123,150726,20623

	SDFD	727,210777,-1,0,0,170555,0,0,0,221547,63714,314631,463146

	SDFD	730,577000,555555,0,0,200400,0,0,0,576000,555555,0,0

	SDFD	731,210777,-1,-1,-1,170555,0,0,0,221547,63715,200263,431746

	SDFD	732,210777,-3,0,0,170555,0,0,0,221547,63713,145545,545546

	SDFD	733,377400,0,555000,0,100777,0,0,0,77400,400400,355355,355355

	SDFD	735,200777,-1,0,0,200777,-2,0,0,201400,0,200000,400

	SDFD	736,200777,-1,0,0,200777,-4,0,0,201400,1,200000,3000

	SDFD	737,210777,-1,0,0,170555,0,0,0,221547,63714,314631,463146

	SDFD	741,210777,-1,0,0,170555,600000,0,0,221546,272702,301417,730634

	SDFD	742,210777,-1,0,0,170557,0,0,0,221545,111740,234200,262445

	SDFD	743,210777,-1,0,0,170560,0,0,0,221544,131025,220544,131026

	SDFD	744,377400,0,0,0,100777,0,0,0,77400,400400,200200,200200

	SDFD	745,376400,0,0,0,100777,0,0,0,76400,400400,200200,200200

	SDFD	746,375400,0,0,0,100777,0,0,0,75400,400400,200200,200200

	SDFD	747,374400,0,0,0,100777,0,0,0,74400,400400,200200,200200

	SDFD	750,373400,0,0,0,100777,0,0,0,73400,400400,200200,200200

	SDFD	751,372400,0,0,0,100777,0,0,0,72400,400400,200200,200200

	SDFD	752,210777,0,0,0,210777,0,0,0,201400,0,0,0

	SDFD	753,200400,0,0,0,210777,0,0,0,170400,400400,200200,200200

	SDFD	754,371400,0,0,0,100777,0,0,0,71400,400400,200200,200200

	SDFD	755,370400,0,0,0,100777,0,0,0,070400,400400,200200,200200

	SDFD	756,367400,0,0,0,100777,0,0,0,67400,400400,200200,200200
;TEST LEAST SIGNIFICANT BIT DIFFERENCE, GET A DIFFERENT ANSWER
;ON THE KS-10 WITH MICROCODE 104 AND GREATER.

S73400:	DMOVE	AC,[373400,,0
		200777,,0]
	DFDV	AC,[100777,,0
		0,,0]
	SKIPN	SM10
	JRST	S73405		;KL10

	CAME	AC,[73400,,400401]
	ER3	AC,73401

	SKIPE	USER		;USER MODE ?
	JRST	S73408		;YES, ALLOW EITHER ANSWER
	BLKI	APR,0		;NO, GET KS10 CPU ID INFO
	MOVSS			;ISOLATE MICROCODE VERSION
	ANDI	0,777
	CAIGE	0,104		;104 OR GREATER ?
	JRST	S73409		;NO

	CAME	AC+1,[1400,,400401]
	ER4	AC+1,73401

S73406:	JUMPL	AC+4,S73400	;LOOP ON ERROR SWITCH
	JRST	S73407

S73405:	CAME	AC,[73400,,400401] ;CHECK KL10 ANSWER IF RUNNING ON KL10
	ER3	AC,73401
	CAME	AC+1,[1400,,400401]
	ER4	AC+1,73401
	JRST	S73406

S73408:	CAMN	AC+1,[1400,,400400] ;ALLOW EITHER ANSWER ON KS10 IN USER MODE
	JRST	S73406
	CAME	AC+1,[1400,,400401]
	ER4	AC+1,73401
	JRST	S73406

S73409:	CAME	AC+1,[1400,,400400] ;KS10, EXEC, MICROCODE LESS THAN 104
	ER4	AC+1,73401
	JRST	S73406

S73407:	JRST	.+1
;TEST AROV, FOV AND FXU FLAGS-DFDV

	AC=4
	SAVEAC	(1,1)

S75700:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[376777,,-1
			-1,,-1]
	DFDV	AC,[200400,,0
			0,,0]	;EXPECT AROV,FOV,FXU=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[377777,,-1]
	ER3	AC,75701	;C(AC) FAILED
	CAME	AC+1,[377777,,-1]
	ER4	AC+1,75701	;C(AC+1)FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,75701	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,75701	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,75701	;FXU WAS SET
	JUMPL	AC+4,S75700	;LOOP ON ERROR SWITCH

S76000:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[377400,,0
			0,,0]
	DFDV	AC,[200400,,0
			0,,0]	;EXPECT AROV,FOV,FXU=1,1,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400,,0]
	ER3	AC,76001	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,76001	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,76001	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,76001	;FOV WAS CLEAR
	TLNE	AC-1,FXU
	ER13	AC-1,76001	;FXU WAS SET
	JUMPL	AC+4,S76000	;LOOP ON ERROR SWITCH
S76100:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[1400,,0
			0,,0]
	DFDV	AC,[202400,,0
			0,,0]	;EXPECT AROV,FOV,FXU=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400,,0]
	ER3	AC,76101	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,76101	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,76101	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,76101	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,76101	;FXU WAS SET
	JUMPL	AC+4,S76100	;LOOP ON ERROR SWITCH

S76200:JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[777,,-1
			-1,,-1]
	DFDV	AC,[202400,,0
			0,,0]	;EXPECT AROV,FOV,FXU=1,1,1
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[377777,,-1]
	ER3	AC,76201	;C(AC) FAILED
	CAME	AC+1,[377777,,-1]
	ER4	AC+1,76201	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,76201	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,76201	;FOV WAS CLEAR
	TLNN	AC-1,FXU
	ER13	AC-1,76201	;FXU WAS CLEAR
	JUMPL	AC+4,S76200	;LOOP ON ERROR SWITCH
S76300:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[376777,,-1
			-1,,-1]
	DFDV	AC,[577400,,0
			0,,0]	;EXPECT AROV,FOV,FXU=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400000,,0]
	ER3	AC,76301	;C(AC) FAILED
	CAME	AC+1,[0,,1]
	ER4	AC+1,76301	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,76301	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,76301	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,76301	;FXU WAS SET
	JUMPL	AC+4,S76300	;LOOP ON ERROR SWITCH

S76400:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[377400,,0
			0,,0]
	DFDV	AC,[777400,,0
			0,,0]	;EXPECT AROV,FOV,FXU=1,1,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[577400,,0]
	ER3	AC,76401	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,76401	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,76401	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,76401	;FOV WAS CLEAR
	TLNE	AC-1,FXU
	ER13	AC-1,76401	;FXU WAS SET
	JUMPL	AC+4,S76400	;LOOP ON ERROR SWITCH
S76500:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[1400,,0
			0,,0]
	DFDV	AC,[575400,,0
			0,,0]	;EXPECT AROV,FOV,FXU=0,0,0
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[777400,,0]
	ER3	AC,76501	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,76501	;C(AC+1) FAILED
	JOV	.+2
	JRST	.+2
	ER13	AC-1,76501	;AROV WAS SET
	JFOV	.+2
	JRST	.+2
	ER13	AC-1,76501	;FOV WAS SET
	TLNE	AC-1,FXU
	ER13	AC-1,76501	;FXU WAS SET
	JUMPL	AC+4,S76500	;LOOP ON ERROR SWITCH

S76600:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[777,,-1
			-1,,-1]
	DFDV	AC,[575400,,0
			0,,0]	;EXPECT AROV,FOV,FXU=1,1,1
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[400000,,0]
	ER3	AC,76601	;C(AC) FAILED
	CAME	AC+1,[0,,1]
	ER4	AC+1,76601	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,76601	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,76601	;FOV WAS CLEAR
	TLNN	AC-1,FXU
	ER13	AC-1,76601	;FXU WAS CLEAR
	JUMPL	AC+4,S76600	;LOOP ON ERROR SWITCH
;TEST AROV,FOV AND DCK FLAGS-DFDV

S76700:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[201400,,0
			0,,0]
	DFDV	AC,[0,,0
			0,,0]	;EXPECT AROV,FOV,DCK=1,1,1
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[201400,,0]
	ER3	AC,76701	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,76701	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,76701	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,76701	;FOV WAS CLEAR
	TLNN	AC-1,DCK
	ER13	AC-1,76701	;DCK WAS CLEAR
	JUMPL	AC+4,S76700	;LOOP ON ERROR SWITCH

;TEST AROV,FOV AND DCK FLAGS-DFDV

S77000:	JRSTF	@[.+1]		;CLEAR ALL FLAGS
	DMOVE	AC,[201400,,0
			0,,0]
	DFDV	AC,[201200,,0
			0,,0]	;EXPECT AROV,FOV,DCK=1,1,1
	JSP	AC-1,.+1	;SAVE FLAGS
	CAME	AC,[201400,,0]
	ER3	AC,77001	;C(AC) FAILED
	CAME	AC+1,[0,,0]
	ER4	AC+1,77001	;C(AC+1) FAILED
	JOV	.+2
	ER13	AC-1,77001	;AROV WAS CLEAR
	JFOV	.+2
	ER13	AC-1,77001	;FOV WAS CLEAR
	TLNN	AC-1,DCK
	ER13	AC-1,77001	;DCK WAS CLEAR
	JUMPL	AC+4,S77000	;LOOP ON ERROR SWITCH

	JRST	BEGEND