Trailing-Edge
-
PDP-10 Archives
-
klad_sources
-
klad.sources/dakcbm.mac
There are no other files named dakcbm.mac in the archive.
SUBTTL DIAGNOSTIC SECTION,
; GENERAL DESCRIPTION
;PART I-FMP AND EXPONENT CALCULATE
;PART II-GEN TEST-FMP,FDV,DFN
;PART III - FMP AND EXPONENT CALCULATE
RENTR1: DROPDV ;CLOSE LOGICAL OUTPUT FILE
CALL [SIXBIT .EXIT.]
PGMNAM: ASCIZ?
PDP-10 KA10 ADVANCED INSTRUCTION DIAGNOSTIC #2 (DAKCB)
(FLOATING MUL/DIV, DFN)
?
;INITIALIZE SUBROUTINES
START: PGMINT
MOVE [ASCIZ/CB/]
MOVEM TLET ;INITIALIZE TEST LETTER
STARTA: JRST CB00 ;GO PERFORM DIAGNOSTIC
LALL
;TEST FMP
;TEST APPARENT ABILITY TO FCE,
;SCA AND DECODE
;FCE FAILING RESULTS IN -NR ALL ZERO
;SAC FAILS - C(AC)=ORIGINAL
CB00: AC=14
SAVEAC (1,1)
;TEST FCE
P100: MOVSI AC,200400 ;SETUP AC
SETZ AC-1, ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
SKIPE AC ;TEST PROD=0
ER3 AC,101 ;FCE FAILED
JUMPL AC+2,P100 ;LOOP ON ERROR SWITCH
;TEST SAC
P200: MOVSI AC,200400 ;SETUP AC
MOVSI AC-1,200400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-1 ;TEST C(AC)=ORIG
ER3 AC,201 ;SAC FAILED
JUMPL AC+2,P200 ;LOOP ON ERROR SWITCH
;TEST FMP-EXP CAL
;AR=000400000000
;BR=000400000000
;CORR PROD=177400000000 AND OVERFLOW
;ERR PROD=177400000000 AND NOT OVERFLOW
AC=14
SAVEAC (1,1)
P300: JFCL 10,.+1 ;CLEAR AROV, EXEC NEXT INST
MOVSI AC-2,177400 ;SETUP FOR COMPARISON
MOVSI AC,400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
JSP AC-3,.+1 ;SAVE FLAGS
JFCL 10,.+2 ;TEST FOR OVERFLOW
ER13 AC-3,301 ;AROV FLAG WAS NOT SET
CAME AC,AC-2 ;TEST PROD=177400000000
ER3 AC,301
JUMPL AC+2,P300 ;LOOP ON ERROR SWITCH
;TEST FMP - EXP CAL
;AR=000400000000
;BR=000400000000
;CORR PROD=177400000000 AND UNDERFLOW
;ERR PROD=377400000000 AND UNDERFLOW
AC=13
SAVEAC (1,1)
P400: JRST 2,@[.+1] ;CLEAR AR FXU FLAG
MOVSI AC-2,177400 ;SETUP FOR COMPARISON
MOVSI AC,400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
JSP AC-3,.+1 ;STORE FLAGS AND PC
TLNN AC-3,FXU ;EXAMINE FXU FLAG
ER13 AC-3,401 ;FXU FLAG WAS NOT SET
CAME AC,AC-2 ;TEST PROD=177400000000
ER3 AC,401
JOV .+2 ;EXAMINE AROV FLAG
ER13 AC-3,401 ;AROV WAS NOT SET
JFOV .+2 ;EXAMINE FOV FLAG
ER13 AC-3,401 ;FOV WAS NOT SET
JUMPL AC+2,P400 ;LOOP ON ERROR SWITCH
;TEST FMP
;AR=000400000000
;BR=000400000000
;CORR PROD=177400000000 AND OVERFLOW
;ERR PROD=600400000000 AND OVERFLOW
AC=12
SAVEAC (1,1)
P500: JFCL 10,.+1 ;CLEAR AROV, EXEC NEXT INST
MOVSI AC-2,177400 ;SETUP FOR COMPARISON
MOVSI AC,400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
JSP AC-3,.+1 ;SAVE FLAGS
JFCL 10,.+2 ;TEST AROV FLAG
ER13 AC-3,501 ;NOT OVERFLOW
CAME AC,AC-2 ;TEST PROD=177400000000
ER3 AC,501
JUMPL AC+2,P500 ;LOOP ON ERROR SWITCH
;TEST FMP
;AR=200400000000
;BR=000400000000
;CORR PROD=377400000000 AND OVERFLOW
;ERR PROD=1774000000000 AND NOT OVERFLOW
AC=5
SAVEAC (1,1)
P600: JFCL 10,.+1 ;CLR AROV,EXEC NEXT INST
MOVSI AC-2,377400 ;SETUP FOR COMPARISON
MOVSI AC,200400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
JSP AC-3,.+1 ;SAVE FLAGS
JFCL 10,.+2 ;TEST AROV FLAG
ER13 AC-3,601 ;AROV NOT SET
CAME AC,AC-2 ;TEST PROD=377400000000
ER3 AC,601
JUMPL AC+2,P600 ;LOOP ON ERROR SWITCH
;TEST FMP
;AR=000400000000
;BR=000400000000
;CORRECT PROD=177400000000 AND OVERFLOW
;FAILURE OF EITHER RESULTS IN AN
;ERROR PROD=144400000000 AND OVERFLOW
AC=11
SAVEAC (1,1)
P700: MOVSI AC-2,177400 ;SETUP FOR COMPARISON
MOVSI AC,400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
JSP AC-3,.+1 ;SAVE FLAGS
JOV .+2 ;EXAMINE AROV FLAG
ER13 AC-3,701 ;AROV NOT SET
JFOV .+2 ;EXAMINE FOV FLAG
ER13 AC-3,701 ;FOV NOT SET
CAME AC,AC-2 ;TEST PROD=144400000000
ER3 AC,701
JUMPL AC+2,P700 ;LOOP ON ERROR SWITCH
;TEST FMP
;AR=000400000000
;BR=000400000000
;FAILURE OF A BIT TO SET RESULTS
;IN A PROD=176.4, 173.4, 137.4,
;165.4,153.4
;CORRECT PROD=177400000000 AND OVERFLOW
;NOTE-FAILURE TO INH FP EXP ADD LEVEL
;(TEST NOT FP EXP ADD
;MAY LOOK LIKE BIT 8 FAILING TO SET
AC=10
SAVEAC (1,1)
SN=1000
ZZ=201400
;TEST SC8,6 SET
P1000: REPEAT ^D2,<
SN=SN+1
ZZ=ZZ-3000
MOVSI AC-2,ZZ ;SETUP FOR COMPARISON
MOVSI AC,400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD
ER3 AC,SN ;BIT UNDER TEST FAILED TO SET
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
PAGE
SN=1100
ZZ=11400
;TEST SC3, 2 SET
P1100: REPEAT ^D2,<
SN=SN+1
ZZ=ZZ+26000
MOVSI AC-2,ZZ ;SETUP FOR COMPARISON
MOVSI AC,400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD
ER3 AC,SN ;BIT UNDER TEST FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
;TEST SC1 SET
P1200: MOVSI AC-2,153400 ;SETUP FOR COMPARISON
MOVSI AC,400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) + C(E)
CAMN AC,AC-2 ;TEST PROD
ER3 AC,1201 ;SC1 FAILED TO SET
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
;TEST FMP
;AR=000400000000
;BR=000400000000
;CORR PROD=177400000000 AND OVERFLOW
;FAILURE RESULTS IN LOSS OF MULTIPLICAND
;AND AN NR ALL ZERO COND
AC=7
SAVEAC (1,1)
P1300: MOVSI AC,400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
SKIPN AC ;TEST PROD=0
ER3 AC,1301
JUMPL AC+2,P1300 ;LOOP ON ERROR SWITCH
;TEST FMP - EXP CAL
;AR=200400000000
;BR=000400000000
;CORR PROD=377400000000 AND OVERFLOW
;ERR PROD=177400000000 AND OVERFLOW
AC=6
SAVEAC (1,1)
P1400: JFCL 10,.+1 ;CLEAR AROV, EXEC NEXT INST
MOVSI AC-2,177400 ;SETUP FOR COMPARISON
MOVSI AC,200400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
JSP AC-3,.+1 ;SAVE FLAGS
JFCL 10,.+2 ;TEST AROV FLAG
ER13 AC-3,1401 ;NOT OVERFLOW
CAMN AC,AC-2 ;TEST PROD=177400000000
ER3 AC,1401
JUMPL AC+2,P1400 ;LOOP ON ERROR SWITCH
;TEST FMP - EXP CAL
;TEST ABILITY TO SET INDIVIDUAL BITS
;OF FE AND SC
;AR=177400000000
;BR=000400000000
;CORR PROD=376400000000 AND UNDERFLOW
;ERR PRODS=375.4, 374.4, 372.4,
;366.4, 356.4, 336.4, 276.4, 176.4, 376.4 (CORR PROD, NOT UNDERFLOW)
AC=14
SAVEAC (1,1)
SN=1500
ZZ=376400
;TEST BITS 8, 7 SET
P1500: REPEAT ^D2,<
SN=SN+1
ZZ=ZZ-1000
MOVSI AC-2,ZZ ;SETUP FOR COMPARISON
MOVSI AC,177400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD
ER3 AC,SN ;BIT UNDER TEST FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
PAGE
;TEST BIT 6 SET
P1600: MOVSI AC-2,372400 ;SETUP FOR COMPARISON
MOVSI AC,177400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD
ER3 AC,1601 ;FE BIT 6 FAILED TO SET
JUMPL AC+2,P1600 ;LOOP ON ERROR SWITCH
SN=1700
ZZ=367400
;TEST BITS 5-4 SET
P1700: REPEAT ^D2,<
SN=SN+1
ZZ=ZZ-1000
MOVSI AC-2,ZZ ;SETUP FOR COMPARISON
MOVSI AC,177400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD
ER3 AC,SN ;BIT UNDER TEST FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
SN=2000
ZZ=376400
;TEST BITS 3,2 SET
P2000: REPEAT ^D2,<
SN=SN+1
ZZ=ZZ-40000
MOVSI AC-2,ZZ ;SETUP FOR COMPARISON
MOVSI AC,177400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD
ER3 AC,SN ;BIT UNDER TEST FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
;TEST BIT 1 SET
P2100: MOVSI AC-2,176400 ;SETUP FOR COMPARISON
MOVSI AC,177400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD
ER3 AC,2101 ;BIT UNDER TEST FAILED
JUMPL AC+2,P2100 ;LOOP ON ERROR SWITCH
PAGE
;TEST BIT 0 SET
P2200: JRST 2,@[.+1] ;CLEAR ARFXU FLAG
MOVSI AC-2,376400 ;SETUP FOR COMPARISON
MOVSI AC,177400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
JSP AC-3,.+1 ;STORE FLAGS AND PC
TLNN AC-3,FXU ;EXAMINE FXU FLAG
ER13 AC-3,2201 ;FXU NOT SET
CAME AC,AC-2 ;TEST PROD=376400000000
ER3 AC,2201 ;BIT 0 FAILED TO SET
JRST 2,5(AC-3) ;CLEAR AROV, ARFOV FLAGS
JUMPL AC+2,P2200 ;LOOP ON ERROR SWITCH
;TEST FMP - EXP CAL
;AR=377400000000
;BR=000400000000
;CORR PROD=176400000000
;ERR PROD=142400000000
AC=14
SAVEAC (1,1)
P2300: MOVSI AC-2,142400 ;SETUP FOR COMPARISON
MOVSI AC,377400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD=142400000000
ER3 AC,2301
JUMPL AC+2,P2300 ;LOOP ON ERROR SWITCH
;TEST FMP - EXP CAL
;TEST ABILITY TO CLEAR SC BITS 7, 5, 4
;AR=377400000000
;BR=000400000000
;CORR PROD=176400000000
;ERR PRODS=112.4, 120.4, 130.4
AC=13
SAVEAC (1,1)
;TEST SC7 CLEARING
P2400: MOVSI AC-2,112400 ;SETUP FOR COMPARISON
MOVSI AC,377400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD=112400000000
ER3 AC,2401 ;SC7 FAILED TO CLEAR
JUMPL AC+2,P2400 ;LOOP ON ERROR SWITCH
;TEST SC5 CLEARING
P2500: MOVSI AC-2,120400 ;SETUP FOR COMPARISON
MOVSI AC,377400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD=120400000000
ER3 AC,2501 ;SC5 FAILED TO CLEAR
JUMPL AC+2,P2500 ;LOOP ON ERROR SWITCH
;TEST SC4 CLEARING
P2600: MOVSI AC-2,130400 ;SETUP FOR COMPARISON
MOVSI AC,377400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD=130400000000
ER3 AC,2601 ;SC4 FAILED TO CLEAR
JUMPL AC+2,P2600 ;LOOP ON ERROR SWITCH
;TEST FMP - EXP CAL
;AR=377400000000
;BR=000400000000
;CORR PROD=176400000000
;ERR PROD=601400000000
AC=12
SAVEAC (1,1)
P2700: MOVSI AC-2,601400 ;SETUP FOR COMPARISON
MOVSI AC,377400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD=601400000000
ER3 AC,2701
JUMPL AC+2,P2700 ;LOOP ON ERROR SWITCH
;TEST FMP - EXP CAL
;AR=577400000000
;BR=000400000000
;CORR PROD=377400000000 AND UNDERFLOW
;ERR PROD=376400000000
AC=11
SAVEAC (1,1)
P3000: MOVSI AC-2,376400 ;SETUP FOR COMPARISON
MOVSI AC,577400 ;SETUP AC
MOVSI AC-1,400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD=376400000000
ER3 AC,3001
JUMPL AC+2,P3000 ;LOOP ON ERROR SWITCH
;TEST FMP - EXP CAL
;AR=000400000000
;BR=200400000000
;CORR PROD=377400000000 AND UNDERFLOW
;ERR PROD=177400000000 AND OVERFLOW
AC=10
SAVEAC (1,1)
P3100: JFCL 10,.+1 ;CLEAR AROV, EXEC NEXT INST
MOVSI AC-2,177400 ;SETUP FOR COMPARISON
MOVSI AC,400 ;SETUP AC
MOVSI AC-1,200400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
JSP AC-3,.+1 ;READ FLAGS
JFCL 10,.+2 ;TEST FOR OVERFLOW
ER13 AC-3,3101 ;AROV NOT SET
TLNN AC-3,FXU ;EXAMINE FXU FLAG
ER13 AC-3,3101 ;FXU NOT SET
CAMN AC,AC-2 ;TEST PROD=177400000000
ER3 AC,3101
JUMPL AC+2,P3100 ;LOOP ON ERROR SWITCH
;TEST FMP - EXP CAL
;AR=000400000000
;BR=200400000000
;CORR PROD=377400000000 AND UNDERFLOW
;ERR PROD=376400000000 AND OVER/UNDERFLOW NOT
AC=7
SAVEAC (1,1)
P3200: MOVSI AC-2,376400 ;SETUP FOR COMPARISON
MOVSI AC,400 ;SETUP AC
MOVSI AC-1,200400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD=376400000000
ER3 AC,3201 ;FP EXP ADD ASSERTED
JUMPL AC+2,P3200 ;LOOP ON ERROR SWITCH
;TEST FMP - EXP CAL
;AR=200400000000 (+1/2)
;BR=577400000000 (-1/2)
;CORR PROD=600400000000 (-1/4)
;ERR PROD=401400000000
AC=6
SAVEAC (1,1)
P3300: MOVSI AC-2,401400 ;SETUP FOR COMPARISON
MOVSI AC,200400 ;SETUP AC
MOVSI AC-1,577400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD=401400000000
ER3 AC,3301 ;FP EXP ADD FAILED
JUMPL AC+2,P3300 ;LOOP ON ERROR SWITCH
;TEST FMP - EXP CAL
;AR=200400000000
;BR=200400000000
;CORR PROD=177400000000
;ERR PROD=377400000000 AND UNDERFLOW
AC=5
SAVEAC (1,1)
P3400: JRST 2,@[.+1] ;CLEAR AR FXU, EXEC NEXT INST
MOVSI AC-2,377400 ;SETUP FOR COMPARISON
MOVSI AC,200400 ;SETUP AC
MOVSI AC-1,200400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
JSP AC-3,.+1 ;STORE FLAGS, PC
TLNE AC-3,FXU ;EXAMINE FXU FLAG
ER13 AC-3,3401 ;FXU IS SET
CAMN AC,AC-2 ;TEST PROD=377400000000
ER3 AC,3401
JRST 2,5(AC-3) ;CLEAR AROV, ARFOV FLAGS
JUMPL AC+2,P3400 ;LOOP ON ERROR SWITCH
;TEST FMP - EXP CAL
;AR=200400000000 (+1/2)
;BR=205400000000 (+20)
;CORR PROD=204400000000 (+10)
;ERR PROD=372400000000 AND OVERFLOW
AC=14
SAVEAC (1,1)
P3500: JFCL 10,.+1 ;CLEAR AROV, EXEC NEXT INST
MOVSI AC-2,372400 ;SETUP FOR COMPARISON
MOVSI AC,200400 ;SETUP AC
MOVSI AC-1,205400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
JSP AC-3,.+1 ;SAVE FLAGS
JFCL 10,.+2 ;TEST AROV
JRST .+2
ER13 AC-3,3501 ;AROV SET
CAMN AC,AC-2 ;TEST PROD=372400000000
ER3 AC,3501
JUMPL AC+2,P3500 ;LOOP ON ERROR SWITCH
;TEST FMP
;AR=0
;BR=577400000000
;CORR PROD=0 (NR ALL ZERO COND)
;ERR PROD=312400000000 AND UNDERFLOW
AC=14
SAVEAC (1,1)
P3600: MOVSI AC-2,312400 ;SETUP FOR COMPARISON
SETZ AC, ;SETUP AC
MOVSI AC-1,577400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAMN AC,AC-2 ;TEST PROD=312400000000
ER3 AC,3601
JUMPL AC+2,P3600 ;LOOP ON ERROR SWITCH
SUBTTL PART IIIB-GEN TEST-FMP,FDV AND DFN
;PART IIIB-GENTEST -FMP, FDV AND DFN
;TEST FMP-EXPCAL
;NR NORMAL
;TWO POSITIVES, INCREASING BR EXPONENT
;AR=200400000000
;BR=201.4,202.4,204.4,210.4,220.4
;240.4,300.4
;PRODS=200.4,201.4,203.4,207.4,217.4
;237.4,277.4
AC=14
SAVEAC (1,1)
SN=3700
ZZ=400
;TEST FMP
P3700: REPEAT ^D7,<
SN=SN+1
ZZ=ZZ+ZZ
XX=ZZ-1000
MOVSI AC-2,200400+XX ;SETUP FOR COMPARISON
MOVSI AC,200400 ;SETUP AC
MOVSI AC-1,200400+ZZ ;SETUP BR
FMP AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST PROD
ER3 AC,SN ;FMP FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
;TEST FMP-EXP CAL
;NR NORMAL
;TWO POSITIVES, INCREASING AR EXPONENT
;AR=201.4,202.4,204.4,210.4,220.4,
;240.4,300.4
;BR=200400000000
;PRODS=200.4 201.4,203.4,207.4,217.4,237.4,277.4
AC=14
SAVEAC (1,1)
SN=4000
ZZ=400
;TEST FMP
P4000: REPEAT ^D7,<
SN=SN+1
ZZ=ZZ+ZZ
XX=ZZ-1000
MOVSI AC-2,200400+XX ;SETUP FOR COMPARISON
MOVSI AC,200400+ZZ ;SETUP AC
MOVSI AC-1,200400 ;SETUP BR
FMP AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST PROD
ER3 AC,SN ;FMP FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
PAGE
;TEST FMP - EXP CAL
;FP EXP ADD, NR NORMAL
;AR=200400000000
;BR=577.4,576.4,575.4
;PRODS=600.4,577.4,576.4
AC=13
SAVEAC (1,1)
SN=4100
XX=601400
ZZ=600400
;TEST FMP
P4100: REPEAT ^D3,<
SN=SN+1
XX=XX-1000
ZZ=ZZ-1000
MOVSI AC-2,XX ;SETUP FOR COMPARISON
MOVSI AC,200400 ;SETUP AC
MOVSI AC-1,ZZ ;SETUP BR
FMP AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST PROD
ER3 AC,SN ;FMP FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
;TEST FMP
;AR=200777777777,6,5,4
;BR=200400000000
;PRODS=177777777777,6,5,4
AC=12
SAVEAC (1,1)
SN=4200
ZZ=0
;TEST FMP
P4200: REPEAT ^D4,<
SN=SN+1
ZZ=ZZ-1
HRLI AC-2,177777 ;SETUP AC-2
HRRI AC-2,ZZ ;FOR COMPARISON
HRLI AC,200777 ;SETUP
HRRI AC,ZZ ;AC
MOVSI AC-1,200400 ;SETUP BR
FMP AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST PROD
ER3 AC,SN ;FMP FAILED
JUMPL AC+2,.-^D8 ;LOOP ON ERROR SWITCH
>
;TEST FMP-EXP CAL
;NR ALL ZERO
;AR=0
;BR=200400000000
;PROD=0
AC=11
SAVEAC (1,1)
P4300: SETZ AC, ;SETUP AC
MOVSI AC-1,200400 ;SETUP BR
FMP AC,AC-1 ;C(AC)XC(E)
SKIPE AC ;TEST PROD
ER3 AC,4301 ;FMP FAILED
JUMPL AC+2,P4300 ;LOOP ON ERROR SWITCH
;TEST FMP-EXP CAL
;NEGATIVE AR EXP
;AR=577400000000
;BR=200400000000
;PROD=600400000000
AC=10
SAVEAC (1,1)
P4400: MOVSI AC-2,600400 ;SETUP FOR COMPARISON
MOVSI AC,577400 ;SETUP AC
MOVSI AC-1,200400 ;SETUP BR
FMP AC,AC-1 ;C(AC) X C(E)
CAME AC,AC-2 ;TEST PROD
ER3 AC,4401 ;FMP FAILED
JUMPL AC+2,P4400 ;LOOP ON ERROR SWITCH
;TEST FMP-EXP CAL
;TWO NEGATIVES-INCREASING AR EXPONENT
;AR=501.7,502.7,503.7,504.7,505.7
;BR=500400000000
;PRODS=372.4,371.4,370.4,367.4,366.4
AC=11
SAVEAC (1,1)
SN=4500
XX=373400
ZZ=500700
;TEST FMP
P4500: REPEAT ^D5,<
SN=SN+1
XX=XX-1000
ZZ=ZZ+1000
MOVSI AC-2,XX ;SETUP FOR COMPARISON
MOVSI AC,ZZ ;SETUP AC
MOVSI AC-1,500400 ;SETUP BR
FMP AC,AC-1 ;C(AC)+C(E)
CAME AC,AC-2 ;TEST PROD
ER3 AC,SN ;FMP FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
;TEST FMP-EXP CAL
;TWO POSITIVES
;AR MANTISSA DECREASING
;NR NORM TEST
;AR=200.2,200.1,200.04,200.02,200.01,200.004,200.002
;BR=200400000000
;PRODS=176.4,175.4,174.4,173.4,172.4,171.4,170.4
AC=7
SAVEAC (1,1)
SN=4600
XX=177400
ZZ=400
;TEST FMP
P4600: REPEAT ^D7,<
SN=SN+1
XX=XX-1000
ZZ=ZZ/2
MOVSI AC-2,XX ;SETUP FOR COMPARISON
MOVSI AC,200000+ZZ ;SETUP AC
MOVSI AC-1,200400 ;SETUP BR
FMP AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST PROD
ER3 AC,SN ;FMP FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
;TEST FMP-EXP CAL
;AR=500.7,500.77
;BR=200400000000
;PRODS=503.4,506.4
AC=6
SAVEAC (1,1)
SN=4700
XX=500400
ZZ=500610
;TEST FMP
P4700: REPEAT ^D2,<
SN=SN+1
XX=XX+3000
ZZ=ZZ+70
MOVSI AC-2,XX ;SETUP FOR COMPARISON
MOVSI AC,ZZ ;SETUP AC
MOVSI AC-1,200400 ;SETUP BR
FMP AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST PROD
ER3 AC,SN ;FMP FAILED
CAME AC-1,[200400,,0];EXAMINE C(E)
ER5 AC-1,SN ;C(E) WAS CLOBBERED
JUMPL AC+2,.-^D8 ;LOOP ON ERROR SWITCH
>
;TEST ECO49
;TEST UNDERFLOW
;AR=000400000000
;BR=000400000000
;FLAGS=440100
;SMALLEST NORMALIZED NUMBER SQUARED SHOULD CAUSE UNDERFLOW
AC=6
SAVEAC (1,1)
P5000: JRST 2,@.+1 ;CLEAR PC FLAGS
XWD 0,.+1
MOVSI AC,000400 ;GET SMALLEST NORMALIZED NUMBER
FMP AC,AC ;SQUARE IT AND CAUSE UNDERFLOW
JSP AC-2,.+1 ;GET PC FLAGS
TLNN AC-2,FXU ;UNDERFLOW SHOULD BE A ONE
ER13 AC-2,5001 ;ERROR
JUMPL AC+2,P5000 ;LOOP ON ERROR SWITCH
;TEST FMPB
;AR=200775000000
;BR=200775000000
;PROD=200772011000
AC=5
SAVEAC (1,1)
P5100: HRLI AC-2,200772 ;SETUP AC-2
HRRI AC-2,11000 ;FOR COMPARISON
MOVSI AC,200775 ;SETUP AC
MOVSI AC-1,200775 ;SETUP BR
FMPB AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST PROD (AC)
ER3 AC,5101 ;C(AC) FAILED
CAME AC-1,AC-2 ;TEST PROD (E)
ER5 AC-1,5101 ;C(E) FAILED
JUMPL AC+2,P5100 ;LOOP ON ERROR SWITCH
;TEST FMPB
;AR=200774000000
;BR=200774000000
;PROD=200770020000
AC=14
SAVEAC (1,1)
P5200: HRLI AC-2,200770 ;SETUP AC-2
HRRI AC-2,20000 ;FOR COMPARISON
MOVSI AC,200774 ;SETUP AC
MOVSI AC-1,200774 ;SETUP BR
FMPB AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST PROD (AC)
ER3 AC,5201 ;C(AC) FAILED
CAME AC-1,AC-2 ;TEST PROD (E)
ER5 AC-1,5201 ;C(E) FAILED
JUMPL AC+2,P5200 ;LOOP ON ERROR SWITCH
;TEST FMPM
;AR=200773000000
;BR=200773000000
;PROD=200766031000
AC=14
SAVEAC (1,1)
P5300: HRLI AC-2,200766 ;SETUP AC-2
HRRI AC-2,31000 ;FOR COMPARISON
MOVSI AC,200773 ;SETUP AC
MOVSI AC-1,200773 ;SETUP BR
FMPM AC,AC-1 ;C(AC)XC(E)
CAME AC-1,AC-2 ;TEST PROD
ER5 AC-1,5301 ;FMPM FAILED
JUMPL AC+2,P5300 ;LOOP ON ERROR SWITCH
;TEST FMPM
;AR=177477000000
;BR=200700000000
;PROD=177427100000
AC=13
SAVEAC (1,1)
P5400: HRLI AC-2,177427 ;SETUP AC-2
HRRI AC-2,100000 ;FOR COMPARISON
MOVSI AC,177477 ;SETUP AC
MOVSI AC-1,200700 ;SETUP BR
FMPM AC,AC-1 ;C(AC)XC(E)
CAME AC,[177477,,0] ;EXAMINE C(AC)
ER3 AC,5401 ;C(AC) WAS CLOBBERED
CAME AC-1,AC-2 ;TEST PROD
ER5 AC-1,5401 ;FMPM FAILED
JUMPL AC+2,P5400 ;LOOP ON ERROR SWITCH
;TEST FMPL
;AR=200777777777,6,5,4,3
;BR=200777777777
;HIGH PROD=200777777776,5,4,3,2
;LOW PROD=145000000001,2,3,4,5
AC=12
SAVEAC (1,1)
SN=5500
WW=0
XX=-1
ZZ=0
;TEST FMPL
P5500: REPEAT ^D5,<
SN=SN+1
WW=WW-1
XX=XX-1
ZZ=ZZ+1
HRLI AC-2,200777 ;SETUP AC-2
HRRI AC-2,XX ;FOR COMPARISON
HRLI AC,200777 ;SETUP
HRRI AC,WW ;AC
HRLI AC-1,200777 ;SETUP
HRRI AC-1,-1 ;BR
FMPL AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST HIGH PROD
ER3 AC,SN ;HIGH PROD ERROR
HRLI AC-2,145000 ;SETUP AC-2
HRRI AC-2,ZZ ;FOR COMPARISON
CAME AC+1,AC-2 ;TEST LOW PROD
ER4 AC+1,SN ;LOW PROD ERROR
CAME AC-1,[200777,,-1] ;EXAMINE C(E)
ER5 AC-1,SN ;C(E) WAS CLOBBERED
JUMPL AC+2,.-^D15 ;LOOP ON ERROR SWITCH
>
;TEST FMPL
;AR=500000777777,777770
;BR=200777000000
;HIGH PROD=500001776777,776770
;LOW PROD=244001000000,244010000000
AC=11
SAVEAC (1,1)
SN=5600
WW=6
XX=777006
ZZ=243772
;TEST FMPL
P5600: REPEAT ^D2,<
SN=SN+1
WW=WW-7
XX=XX-7
ZZ=ZZ+7
HRLI AC-2,500001 ;SETUP AC-2
HRRI AC-2,XX ;FOR COMPARISON
HRLI AC,500000 ;SETUP
HRRI AC,WW ;AC
MOVSI AC-1,200777 ;SETUP BR
FMPL AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST HIGH PROD
ER3 AC,SN ;HIGH PROD ERROR
MOVSI AC-2,ZZ ;SETUP FOR COMPARISON
CAME AC+1,AC-2 ;TEST LOW PROD
ER4 AC+1,SN ;LOW PROD ERROR
JUMPL AC+2,.-^D11 ;LOOP ON ERROR SWITCH
>
;TEST FMPL
;AR=500000777777
;BR=500000777777
;HIGH PROD=376776001001
;LOW PROD=343776000001
AC=10
SAVEAC (1,1)
P5700: HRLI AC-2,376776 ;SETUP AC-2
HRRI AC-2,1001 ;FOR COMPARISON
HRLI AC,500000 ;SETUP
HRRI AC,-1 ;AC
MOVEM AC,AC-1 ;SETUP BR
FMPL AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST HIGH PROD
ER3 AC,5701 ;HIGH PROD ERROR
HRLI AC-2,343776 ;SETUP AC-2
HRRI AC-2,1 ;FOR COMPARISON
CAME AC+1,AC-2 ;TEST LOW PROD
ER4 AC+1,5701 ;LOW PROD ERROR
JUMPL AC+2,P5700 ;LOOP ON ERROR SWITCH
;TEST FMPL
;AR=500000777776
;BR=500000777776
;HIGH PROD=376776001003
;LOW PROD=343774000004
AC=7
SAVEAC (1,1)
P6000: HRLI AC-2,376776 ;SETUP AC-2
HRRI AC-2,1003 ;FOR COMPARISON
HRLI AC,500000 ;SETUP
HRRI AC,-2 ;AC
MOVEM AC,AC-1 ;SETUP BR
FMPL AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST HIGH PROD
ER3 AC,6001 ;HIGH PROD ERROR
HRLI AC-2,343774 ;SETUP AC-2
HRRI AC-2,4 ;FOR COMPARISON
CAME AC+1,AC-2 ;TEST LOW PROD
ER4 AC+1,6001 ;LOW PROD ERROR
JUMPL AC+2,P6000 ;LOOP ON ERROR SWITCH
;TEST FMPR
;(NOT ROUND COND)
;AR=200777777777
;BR=200000000002
;PROD=146777777777
AC=6
SAVEAC (1,1)
P6100: HRLI AC-2,146777 ;SETUP AC-2
HRRI AC-2,-1 ;FOR COMPARISON
HRLI AC,200777 ;SETUP
HRRI AC,-1 ;AC
MOVSI AC-1,200000 ;SETUP
ADDI AC-1,2 ;BR
FMPR AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST PROD
ER3 AC,6101 ;FMPR FAILED
JUMPL AC+2,P6100 ;LOOP ON ERROR SWITCH
PAGE
;TEST FMPR
;AR=200700000000
;BR=200400000077,(76)
;PROD=177700000156,(155)
AC=14
SAVEAC (1,1)
SN=6200
XX=100
ZZ=157
;TEST FMPR
P6200: REPEAT ^D2,<
SN=SN+1
XX=XX-1
ZZ=ZZ-1
HRLI AC-2,177700 ;SETUP AC-2
HRRI AC-2,ZZ ;FOR COMPARISON
MOVSI AC,200700 ;SETUP AC
HRLI AC-1,200400 ;SETUP
HRRI AC-1,XX ;BR
FMPR AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST PROD
ER3 AC,SN ;FMPR FAILED
CAME AC-1,[200400,,XX] ;EXAMINE C(E)
ER5 AC-1,SN ;C(E) WAS CLOBBERED
JUMPL AC-2,.-^D10 ;LOOP ON ERROR SWITCH
>
;TEST FMPRM
;AR=200700000000
;BR=200400000075
;PROD=177700000153
AC=14
SAVEAC (1,1)
P6300: HRLI AC-2,177700 ;SETUP AC-2
HRRI AC-2,153 ;FOR COMPARISON
MOVSI AC,200700 ;SETUP AC
HRLI AC-1,200400 ;SETUP
HRRI AC-1,75 ;BR
FMPRM AC,AC-1 ;C(AC)XC(E)
CAME AC,[200700,,0] ;EXAMINE C(AC)
ER3 AC,6301 ;C(AC) WAS CLOBBERED
CAME AC-1,AC-2 ;TEST PROD
ER5 AC-1,6301 ;FMPRM FAILED
JUMPL AC+2,P6300 ;LOOP ON ERROR SWITCH
;TEST FMPRB
;AR=577400000000
;BR=600400000000
;PROD=176400000000
AC=13
SAVEAC (1,1)
P6400: MOVSI AC-2,176400 ;SETUP FOR COMPARISON
MOVSI AC,577400 ;SETUP AC
MOVSI AC-1,600400 ;SETUP BR
FMPRB AC,AC-1 ;C(AC)XC(E)
CAME AC,AC-2 ;TEST PROD (AC)
ER3 AC,6401 ;C(AC) FAILED
CAME AC-1,AC-2 ;TEST PROD (E)
ER5 AC-1,6401 ;FMPRB FAILED
JUMPL AC+2,P6400 ;LOOP ON ERROR SWITCH
;TEST FMPRI
;AR=600400000077,(76)
;E=177600
;PRODS=602200000136,(135),
AC=12
SAVEAC (1,1)
SN=6500
XX=137
ZZ=100
;TEST FMPRI
P6500: REPEAT ^D2,<
SN=SN+1
XX=XX-1
ZZ=ZZ-1
HRLI AC-2,602200 ;SETUP AC-2
HRRI AC-2,XX ;FOR COMPARISON
HRLI AC,600400 ;SETUP
HRRI AC,ZZ ;AC
FMPRI AC,177600 ;C(AC)X E
CAME AC,AC-2 ;TEST PROD
ER3 AC,SN ;FMPRI FAILED
JUMPL AC+2,.-7 ;LOOP ON ERROR SWITCH
>
PAGE
;TEST FMPRI
;AR=600400000000
;E=576400,575400
;PROD=177400000000,200400000000
AC=11
SAVEAC (1,1)
SN=6600
XX=176400
ZZ=577400
;TEST FMPRI
P6600: REPEAT ^D2,<
SN=SN+1
XX=XX+1000
ZZ=ZZ-1000
MOVSI AC-2,XX ;SETUP FOR COMPARISON
MOVSI AC,600400 ;SETUP AC
FMPRI AC,ZZ ;C(AC)X E
CAME AC,AC-2 ;TEST PROD
ER3 AC,6601 ;FMPRI FAILED
JUMPL AC+2,.-5 ;LOOP ON ERROR SWITCH
>
;TEST ECO49
;TEST CLEAR MQ LOGIC
;AR=400000000001
;E=1.0
;PROD=400000000001
;ERROR PROD=777400000000
;FLAGS=0
AC=11
SAVEAC (1,1)
P6700: JRST 2,@.+1 ;CLEAR PC FLAGS
XWD 0,.+1
MOVE AC,[XWD 400000,000001] ;GET LARGEST NEGATIVE FP NUMBER
FMPRI AC,(1.0) ;MULTIPLY IT BY ONE
CAMN AC,[XWD 777400,0] ;CLEAR MQ LOGIC WORKING
ER3 AC,6701 ;NO
CAME AC,[XWD 400000,000001] ;CORRECT ANSWER
ER3 AC,6701 ;NO
JSP AC-2,.+1 ;GET PC FLAGS
TLNE AC-2,640140 ;ARE ALL FLAGS ZERO
ER13 AC-2,6701 ;NO, THEY SHOULD BE
JOV .+2 ;EXAMINE ARCV FLAG
JRST .+2
ER13 AC-2,6701 ;AROV IS SET
JUMPL AC+2,P6700 ;LOOP ON ERROR SWITCH
PAGE
;TEST FDV
;AR=200.4,201.4,202.4
;BR=200.4,201.4,202.4
;QUOT=201400000000
AC=14
SAVEAC (1,1)
SN=7000
ZZ=177400
;TEST FDV
P7000: REPEAT ^D3,<
SN=SN+1
ZZ=ZZ+1000
MOVSI AC-2,201400 ;SETUP FOR COMPARISON
MOVSI AC,ZZ ;SETUP AC
MOVSI AC-1,ZZ ;SETUP BR
FDV AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT
ER3 AC,7001 ;FDV FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
;TEST FDV
;AR=201.4,202.4,203.4
;BR=200400000000
;QUOT=202.4,203.4,204.4
AC=14
SAVEAC (1,1)
SN=7100
XX=201400
ZZ=200400
;TEST FDV
P7100: REPEAT ^D3,<
SN=SN+1
XX=XX+1000
ZZ=ZZ+1000
MOVSI AC-2,XX ;SETUP FOR COMPARISON
MOVSI AC,ZZ ;SETUP AC
MOVSI AC-1,200400 ;SETUP BR
FDV AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT
ER3 AC,7101 ;FDV FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
;TEST FDV
;AR=200.6,200.7,200.74
;BR=200400000000
;QUOT=201.6,201.7,201.74
AC=13
SAVEAC (1,1)
SN=7200
WW=200
XX=201400
ZZ=200400
;TEST FDV
P7200: REPEAT ^D3,<
SN=SN+1
XX=XX+WW
ZZ=ZZ+WW
WW=WW/2
MOVSI AC-2,XX ;SETUP FOR COMPARISON
MOVSI AC,ZZ ;SETUP AC
MOVSI AC-1,200400 ;SETUP BR
FDV AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT
ER3 AC,SN ;FDV FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
;TEST FDV
;AR=200.4,200.6
;BR=577400000000
;QUOT=576.4,576.2
AC=12
SAVEAC (1,1)
SN=7300
XX=576600
ZZ=200200
;TEST FDV
P7300: REPEAT ^D2,<
SN=SN+1
XX=XX-200
ZZ=ZZ+200
MOVSI AC-2,XX ;SETUP FOR COMPARISON
MOVSI AC,ZZ ;SETUP AC
MOVSI AC-1,577400 ;SETUP BR
FDV AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT
ER3 AC,SN ;FDV FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
PAGE
;TEST FDV
;AR=177400000000
;BR=204400000000
;QUOT=1744000000
AC=11
SAVEAC (1,1)
P7400: MOVSI AC-2,174400 ;SETUP FOR COMPARISON
MOVSI AC,177400 ;SETUP AC
MOVSI AC-1,204400 ;SETUP BR
FDV AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT
ER3 AC,7401 ;FDV FAILED
JUMPL AC+2,P7400 ;LOOP ON ERROR SWITCH
;TEST FDV
;AR=576400000000
;BR=200600000000
;KI10
;QUOT=576252525253
;KL10
;QUOT=576252525252
AC=10
SAVEAC (1,1)
P7500: HRLI AC-2,576252 ;SETUP AC-2
HRRI AC-2,525253 ;FOR COMPARISON - KI10
SKIPE KLFLG
HRRI AC-2,525252 ;FOR COMPARISON - KL10
MOVSI AC,576400 ;SETUP AC
MOVSI AC-1,200600 ;SETUP BR
FDV AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT
ER3 AC,7501 ;FDV FAILED
JUMPL AC+2,P7500 ;LOOP ON ERROR SWITCH
PAGE
;TEST FDV
;AR=600.6,600.4
;BR=577400000000
;QUOT=177.4,200.4
AC=7
SAVEAC (1,1)
SN=7600
XX=176400
ZZ=601000
;TEST FDV
P7600: REPEAT ^D2,<
SN=SN+1
XX=XX+1000
ZZ=ZZ-200
MOVSI AC-2,XX ;SETUP FOR COMPARISON
MOVSI AC,ZZ ;SETUP AC
MOVSI AC-1,577400 ;SETUP BR
FDV AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT
ER3 AC,SN ;FDV FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
;TEST FDV
;AR=377400777777
;BR=577400777777
;KI10
;QUOT=777375773772
;KL10
;QUOT=777375773771
AC=6
SAVEAC (1,1)
P7700: HRLI AC-2,777375 ;SETUP AC-2
HRRI AC-2,773772 ;FOR COMPARISON - KI10
SKIPE KLFLG
HRRI AC-2,773771 ;FOR COMPARISON - KL10
HRLI AC,377400 ;SETUP
HRRI AC,-1 ;AC
HRLI AC-1,577400 ;SETUP
HRRI AC-1,-1 ;BR
FDV AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT
ER3 AC,7701 ;FDV FAILED
CAME AC-1,[577400,,-1] ;EXAMINE C(E)
ER5 AC-1,7701 ;C(E) WAS CLOBBERED
JUMPL AC+2,P7700 ;LOOP ON ERROR SWITCH
;TEST ECO49
;TEST FDV DIVIDE CHECK
;AR=201400000000, 1.0
;BR=0
;FLAGS=440040
AC=6
SAVEAC (1,1)
P10000: JRST 2,@.+1 ;CLEAR PC FLAGS
XWD 0,.+1
MOVSI AC,201400 ;SETUP DVND
MOVEI AC-1,0 ;SETUP DVSR
FDV AC,AC-1 ;FLOATING DIVIDE 1.0 BY 0
JSP AC-2,.+1 ;STORE PC AND FLAGS
TLNN AC-2,40 ;TEST BIT 12
ER13 AC-2,10001 ;AR DCK FAILED TO SET
JUMPL AC+2,P10000 ;LOOP ON ERROR SWITCH
;TEST ECO49
;TEST UNDERFLOW
;AR=377400000000
;BR=000400000000
;FLAGS=440000
AC=6
SAVEAC (1,1)
P10100: JRST 2,@.+1 ;CLEAR PC FLAGS
XWD 0,.+1
MOVSI AC,377400 ;SETUP DVND
MOVSI AC-1,000400 ;SETUP DVSR
FDV AC,AC-1 ;FLOATING DIVIDE
JSP AC-2,.+1 ;GET PC FLAGS
TLNE AC-2,FXU ;UNDERFLOW SHOULD BE 0
ER13 AC-2,10101 ;ERROR
JUMPL AC+2,P10100 ;LOOP ON ERROR SWITCH
;TEST FDVM
;AR=577775000000,577774000000
;BR=577777000000
;QUOT=577777000000
AC=5
SAVEAC (1,1)
SN=10200
ZZ=577776
;TEST FDVM
P10200: REPEAT ^D2,<
SN=SN+1
ZZ=ZZ-1
MOVSI AC-2,577777 ;SETUP FOR COMPARISON
MOVSI AC,ZZ ;SETUP AC
MOVSI AC-1,577777 ;SETUP BR
FDVM AC,AC-1 ;C(AC)/C(E)
CAME AC-1,AC-2 ;TEST QUOT
ER5 AC-1,SN ;FDVM FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
PAGE
;TEST FDVM
;AR=210777777777
;BR=170750000000
;QUOT=221414456123
AC=14
SAVEAC (1,1)
P10300: HRLI AC-2,221414 ;SETUP AC-2
HRRI AC-2,456123 ;FOR COMPARISON
HRLI AC,210777 ;SETUP
HRRI AC,-1 ;AC
MOVSI AC-1,170750 ;SETUP BR
FDVM AC,AC-1 ;C(AC)/C(E)
CAME AC,[210777,,-1] ;EXAMINE C(AC)
ER3 AC,10301 ;C(AC) WAS CLOBBERED
CAME AC-1,AC-2 ;TEST QUOT
ER5 AC-1,10301 ;FDVM FAILED
JUMPL AC+2,P10300 ;LOOP ON ERROR SWITCH
;TEST FDVB
;AR=210777777777
;BR=170555000000
;QUOT=221547063714
AC=14
SAVEAC (1,1)
P10400: HRLI AC-2,221547 ;SETUP AC-2
HRRI AC-2,63714 ;FOR COMPARISON
HRLI AC,210777 ;SETUP
HRRI AC,-1 ;AC
MOVSI AC-1,170555 ;SETUP BR
FDVB AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT(AC)
ER3 AC,10401 ;C(AC) FAILED
CAME AC-1,AC-2 ;TEST QUOT(E)
ER5 AC-1,10401 ;FDVB FAILED
JUMPL AC+2,P10400 ;LOOP ON ERROR SWITCH
;TEST FDVB
;AR=577000555555
;BR=200400000000
;QUOT=576000555555
AC=13
SAVEAC (1,1)
P10500: HRLI AC-2,576000 ;SETUP AC-2
HRRI AC-2,555555 ;FOR COMPARISON
HRLI AC,577000 ;SETUP
HRRI AC,555555 ;AC
MOVSI AC-1,200400 ;SETUP BR
FDVB AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT(AC)
ER3 AC,10501 ;C(AC) FAILED
CAME AC-1,AC-2 ;TEST QUOT(E)
ER5 AC-1,10501 ;FDVB FAILED
JUMPL AC+2,P10500 ;LOOP ON ERROR SWITCH
;TEST FDVL
;AR=210777777777
;BR=170555000000
;HIGH ORDER=221547063715
;LOW ORDER=156266777777
AC=12
SAVEAC (1,1)
P10600: HRLI AC-2,221547 ;SETUP AC-2
HRRI AC-2,63715 ;FOR COMPARISON
HRLI AC,210777 ;SETUP
HRRI AC,-1 ;AC
SETO AC+1, ;SETUP AC+1
MOVSI AC-1,170555 ;SETUP BR
FDVL AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST HIGH ORDER
ER3 AC,10601 ;HIGH ORDER ERROR
HRLI AC-2,156266 ;SETUP AC-2
HRRI AC-2,-1 ;FOR COMPARISON
CAME AC+1,AC-2 ;TEST LOW ORDER
ER4 AC+1,10601 ;LOW ORDER ERROR
JUMPL AC+2,P10600 ;LOOP ON ERROR SWITCH
;TEST FDVL
;AR=210777777775
;BR=170555000000
;HIGH ORDER=221547063713
;LOW ORDER=156221000000
AC=11
SAVEAC (1,1)
P10700: HRLI AC-2,221547 ;SETUP AC-2
HRRI AC-2,63713 ;FOR COMPARISON
HRLI AC,210777 ;SETUP
HRRI AC,777775 ;AC
SETZ AC+1, ;SETUP AC+1
MOVSI AC-1,170555 ;SETUP BR
FDVL AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST HIGH ORDER
ER3 AC,10701 ;HIGH ORDER ERROR
MOVSI AC-2,156221 ;SETUP FOR COMPARISON
CAME AC+1,AC-2 ;TEST LOW ORDER
ER4 AC+1,10701 ;LOW ORDER ERROR
JUMPL AC+2,P10700 ;LOOP ON ERROR SWITCH
;TEST FDVL
;AR=377400000000
;BR=100777000000
;HIGH ORDER=077400400400
;LOW ORDER=344400000000
AC=10
SAVEAC (1,1)
P11000: HRLI AC-2,77400 ;SETUP AC-2
HRRI AC-2,400400 ;FOR COMPARISON
MOVSI AC,377400 ;SETUP AC
MOVSI AC+1,555000 ;SETUP AC+1
MOVSI AC-1,100777 ;SETUP BR
FDVL AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST HIGH ORDER
ER3 AC,11001 ;HIGH ORDER ERROR
MOVSI AC-2,344400 ;SETUP FOR COMPARISON
CAME AC+1,AC-2 ;TEST LOW ORDER
ER4 AC+1,11001 ;LOW ORDER ERROR
JUMPL AC+2,P11000 ;LOOP ON ERROR SWITCH
;TEST FDVL
;AR=373400000000
;BR=100777000000
;HIGH ORDER=073400400401
;LOW ORDER=340400000000
AC=7
SAVEAC (1,1)
P11100: HRLI AC-2,73400 ;SETUP AC-2
HRRI AC-2,400401 ;FOR COMPARISON
MOVSI AC,373400 ;SETUP AC
MOVSI AC+1,200777 ;SETUP AC+1
MOVSI AC-1,100777 ;SETUP BR
FDVL AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST HIGH ORDER
ER3 AC,11101 ;HIGH ORDER ERROR
MOVSI AC-2,340400 ;SETUP FOR COMPARISON
CAME AC+1,AC-2 ;TEST LOW ORDER
ER4 AC+1,11102 ;LOW ORDER ERROR
CAME AC-1,[100777,,0];EXAMINE C(E)
ER5 AC-1,11101 ;C(E) WAS CLOBBERED
JUMPL AC+2,P11100 ;LOOP ON ERROR SWITCH
;TEST FDVR
;AR=200777777777
;BR=200777777776,200777777774
;QUOT=201400000001,201400000002
AC=6
SAVEAC (1,1)
SN=11200
XX=0
ZZ=2
;TEST FDVR
P11200: REPEAT ^D2,<
SN=SN+1
XX=XX+1
ZZ=ZZ-2
IFE ZZ,<ZZ=-2>
HRLI AC-2,201400 ;SETUP AC-2
HRRI AC-2,XX ;FOR COMPARISON
HRLI AC,200777 ;SETUP
HRRI AC,-1 ;AC
HRLI AC-1,200777 ;SETUP
HRRI AC-1,ZZ ;BR
FDVR AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT
ER3 AC,SN ;FDVR FAILED
JUMPL AC+2,.-^D9 ;LOOP ON ERROR SWITCH
>
;TEST FDVR
;AR=210777777777
;BR=170555000000
;QUOT=221547063715
AC=5
SAVEAC (1,1)
P11300: HRLI AC-2,221547 ;SETUP AC-2
HRRI AC-2,63715 ;FOR COMPARISON
HRLI AC,210777 ;SETUP
HRRI AC,-1 ;AC
MOVSI AC-1,170555 ;SETUP BR
FDVR AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT
ER3 AC,11301 ;FDVR FAILED
JUMPL AC+2,P11300 ;LOOP ON ERROR SWITCH
;TEST FDVR
;AR=210777777776
;BR=170555000000
;QUOT=221547063714(NOT ROUND)
AC=14
SAVEAC (1,1)
P11400: HRLI AC-2,221547 ;SETUP AC-2
HRRI AC-2,63714 ;FOR COMPARISON
HRLI AC,210777 ;SETUP
HRRI AC,-2 ;AC
MOVSI AC-1,170555 ;SETUP BR
FDVR AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT
ER3 AC,11401 ;FDVR FAILED
JUMPL AC+2,P11400 ;LOOP ON ERROR SWITCH
;TEST FDVR
;AR=210777777777
;BR=170555600000
;QUOT=221546272703
AC=14
SAVEAC (1,1)
P11500: HRLI AC-2,221546 ;SETUP AC-2
HRRI AC-2,272703 ;FOR COMPARISON
HRLI AC,210777 ;SETUP
HRRI AC,-1 ;AC
HRLI AC-1,170555 ;SETUP
HRRI AC-1,600000 ;BR
FDVR AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT
ER3 AC,11501 ;FDVR FAILED
CAME AC-1,[170555,,600000] ;EXAMINE C(E)
ER5 AC-1,11501 ;C(E) WAS CLOBBERED
JUMPL AC+2,P11500 ;LOOP ON ERROR SWITCH
;TEST FDVRM
;AR=210777777777
;BR=170557000000
;QUOT=221545111741
AC=13
SAVEAC (1,1)
P11600: HRLI AC-2,221545 ;SETUP AC-2
HRRI AC-2,111741 ;FOR COMPARISON
HRLI AC,210777 ;SETUP
HRRI AC,-1 ;AC
MOVSI AC-1,170557 ;SETUP BR
FDVRM AC,AC-1 ;C(AC)/C(E)
CAME AC-1,AC-2 ;TEST QUOT
ER5 AC-1,11601 ;FDVRM FAILED
JUMPL AC+2,P11600 ;LOOP ON ERROR SWITCH
;TEST FDVRM
;AR=210777777777
;BR=170560000000
;QUOT=221544131026
AC=12
SAVEAC (1,1)
P11700: HRLI AC-2,221544 ;SETUP AC-2
HRRI AC-2,131026 ;FOR COMPARISON
HRLI AC,210777 ;SETUP
HRRI AC,-1 ;AC
MOVSI AC-1,170560 ;SETUP BR
FDVRM AC,AC-1 ;C(AC)/C(E)
CAME AC,[210777,,-1] ;EXAMINE C(AC)
ER3 AC,11701 ;C(AC) WAS CLOBBERED
CAME AC-1,AC-2 ;TEST QUOT
ER5 AC-1,11701 ;FDVRM FAILED
JUMPL AC+2,P11700 ;LOOP ON ERROR SWITCH
;TEST FDVRB
;AR=377400000000
;BR=100777000000
;QUOT=077400400401
AC=11
SAVEAC (1,1)
P12000: HRLI AC-2,77400 ;SETUP AC-2
HRRI AC-2,400401 ;FOR COMPARISON
MOVSI AC,377400 ;SETUP AC
MOVSI AC-1,100777 ;SETUP BR
FDVRB AC,AC-1 ;C(AC(/C(E)
CAMN AC,AC-2 ;TEST QUOT(AC)
CAME AC-1,AC-2 ;TEST QUOT(E)
ER5 AC-1,12001 ;FDVRB FAILED
JUMPL AC+2,P12000 ;LOOP ON ERROR SWITCH
;TEST FDVRB
;AR=376.4,375.4,374.4,373.4,372.4
;BR=100777000000
;QUOT=076,075,074,073,072:400400401
AC=10
SAVEAC (1,1)
SN=12100
XX=77400
ZZ=377400
;TEST FDVRB
P12100: REPEAT ^D5,<
SN=SN+1
XX=XX-1000
ZZ=ZZ-1000
HRLI AC-2,XX ;SETUP AC-2
HRRI AC-2,400401 ;FOR COMPARISON
MOVSI AC,ZZ ;SETUP AC
MOVSI AC-1,100777 ;SETUP BR
FDVRB AC,AC-1 ;C(AC)/C(E)
CAME AC,AC-2 ;TEST QUOT(AC)
ER3 AC,SN ;C(AC) FAILED
CAME AC-1,AC-2 ;TEST QUOT(E)
ER5 AC-1,SN ;FDVRB FAILED
JUMPL AC+2,.-^D9 ;LOOP ON ERROR SWITCH
>
;TEST FDVRI
;AR=210777000000
;E=210777
;QUOT=201400000000
AC=7
SAVEAC (1,1)
P12200: MOVSI AC-2,201400 ;SETUP FOR COMPARISON
MOVSI AC,210777 ;SETUP AC
FDVRI AC,210777 ;C(AC)/E
CAME AC,AC-2 ;TEST QUOT
ER3 AC,12201 ;FDVRI FAILED
JUMPL AC+2,P12200 ;LOOP ON ERROR SWITCH
;TEST FDVRI
;AR=200400000000
;E=210777
;QUOT=170400400401
AC=6
SAVEAC (1,1)
P12300: HRLI AC-2,170400 ;SETUP AC-2
HRRI AC-2,400401 ;FOR COMPARISON
MOVSI AC,200400 ;SETUP AC
FDVRI AC,210777 ;C(AC)/E
CAME AC,AC-2 ;TEST QUOT
ER3 AC,12301 ;FDVRI FAILED
JUMPL AC+2,P12300 ;LOOP ON ERROR SWITCH
;TEST FDVRI
;AR=371.4,370.4,367.4
;E=100777
;QUOT=071,070,067:400400401
AC=5
SAVEAC (1,1)
SN=12400
XX=72400
ZZ=372400
;TEST FDVRI
P12400: REPEAT ^D3,<
SN=SN+1
XX=XX-1000
ZZ=ZZ-1000
HRLI AC-2,XX ;SETUP AC-2
HRRI AC-2,400401 ;FOR COMPARISON
MOVSI AC,ZZ ;SETUP AC
FDVRI AC,100777 ;C(AC)/E
CAME AC,AC-2 ;TEST QUOT
ER3 AC,SN ;FDVRI FAILED
JUMPL AC+2,.-6 ;LOOP ON ERROR SWITCH
>
;TEST DFN
;AR=076400400401
;BR=343001000000
;HIGH ORDER=701377377376
;LOW ORDER=343777000000
AC=14
SAVEAC (1,1)
P12500: HRLI AC-2,701377 ;SETUP AC-2
HRRI AC-2,377376 ;FOR COMPARISON
HRLI AC,76400 ;SETUP
HRRI AC,400401 ;AC
MOVSI AC+1,343001 ;SETUP BR
DFN AC,AC+1 ;NEGATE
CAME AC,AC-2 ;TEST HIGH ORDER
ER3 AC,12501 ;HIGH ORDER ERROR
MOVSI AC-2,343777 ;SETUP FOR COMPARISON
CAME AC+1,AC-2 ;TEST LOW ORDER
ER4 AC+1,12501 ;LOW ORDER ERROR
JUMPL AC+2,P12500 ;LOOP ON ERROR SWITCH
;TEST DFN
;AR=075400400400
;BR=342401000000
;HIGH ORDER=702377377377
;LOW ORDER=342377000000
AC=14
SAVEAC (1,1)
P12600: HRLI AC-2,702377 ;SETUP AC-2
HRRI AC-2,377377 ;FOR COMPARISON
HRLI AC,75400 ;SETUP
HRRI AC,400400 ;AC
MOVSI AC+1,342401 ;SETUP BR
DFN AC,AC+1 ;NEGATE
CAME AC,AC-2 ;TEST HIGH ORDER
ER3 AC,12601 ;HIGH ORDER ERROR
MOVSI AC-2,342377 ;SETUP FOR COMPARISON
CAME AC+1,AC-2 ;TEST LOW ORDER
ER4 AC+1,12601 ;LOW ORDER ERROR
JUMPL AC+2,P12600 ;LOOP ON ERROR SWITCH
;TEST DFN
;AR=177400777777
;BR=177400777777
;HIGH ORDER=600377000000
;LOW ORDER=177377000001
AC=13
SAVEAC (1,1)
P12700: MOVSI AC-2,600377 ;SETUP FOR COMPARISON
HRLI AC,177400 ;SETUP
HRRI AC,-1 ;AC
MOVEM AC,AC+1 ;SETUP BR
DFN AC,AC+1 ;NEGATE
CAME AC,AC-2 ;TEST HIGH ORDER
ER3 AC,12701 ;HIGH ORDER ERROR
MOVSI AC-2,177377 ;SETUP AC-2
AOJ AC-2, ;FOR COMPARISON
CAME AC+1,AC-2 ;TEST LOW ORDER
ER4 AC+1,12701 ;LOW ORDER ERROR
JUMPL AC+2,P12700 ;LOOP ON ERROR SWITCH
;TEST DFN
;AR=376400000000
;BR=401377000000
;HIGH ORDER=401377777777
;LOW ORDER=401401000000
AC=12
SAVEAC (1,1)
P13000: HRLI AC-2,401377 ;SETUP AC-2
HRRI AC-2,-1 ;FOR COMPARISON
MOVSI AC,376400 ;SETUP AC
MOVSI AC+1,401377 ;SETUP BR
DFN AC,AC+1 ;NEGATE
CAME AC,AC-2 ;TEST HIGH ORDER
ER3 AC,13001 ;HIGH ORDER ERROR
MOVSI AC-2,401401 ;SETUP FOR COMPARISON
CAME AC+1,AC-2 ;TEST LOW ORDER
ER4 AC+1,13001 ;LOW ORDER ERROR
JUMPL AC+2,P12000 ;LOOP ON ERROR SWITCH
;TEST DFN
;AR=371400000000
;BR=401372000000
;HIGH ORDER=406377777777
;LOW ORDER=401406000000
AC=11
SAVEAC (1,1)
P13100: HRLI AC-2,406377 ;SETUP AC-2
HRRI AC-2,-1 ;FPR COMPARISON
MOVSI AC,371400 ;SETUP AC
MOVSI AC+1,401372 ;SETUP BR
DFN AC,AC+1 ;NEGATE
CAME AC,AC-2 ;TEST HIGH ORDER
ER3 AC,13101 ;HIGH ORDER ERROR
MOVSI AC-2,401406 ;SETUP FOR COMPARISON
CAME AC+1,AC-2 ;TEST LOW ORDER
ER4 AC+1,13101 ;LOW ORDER ERROR
JUMPL AC+2,P13100 ;LOOP ON ERROR SWITCH
JRST BEGEND ;REPEAT DIAGNOSTIC