-
Notifications
You must be signed in to change notification settings - Fork 1
/
TESTDFP1.MLC
1503 lines (1503 loc) · 40 KB
/
TESTDFP1.MLC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
*********************************************************************
* Copyright 2006 Automated Software Tools Corporation *
* This source code is part of z390 assembler/emulator package *
* The z390 package is distributed under GNU general public license *
* Author - Don Higgins *
* Date - 12/09/06 *
*********************************************************************
* TEST DFP DECIMAL FLOATING POINT
*********************************************************************
* Maintenance:
* 12/09/06 RPI 407 ADD ADTR, SDTR, MDTR, DDTR, CDTR, CSDTR
* 12/15/06 RPI 518 ADD AXTR, SXTR, MXTR, DXTR
* 12/18/06 RPI 406 ADD REMAINING DFP INSTRUCTIONS
* KDTR, KXTR, CEDTR, CEXTR, CDGTR, CXGTR, CDSTR, CXSTR
* CDUTR, CXUTR, CGDTR, CGXTR, CUDTR, CUXTR, ESDTR, ESXTR
* IEDTR, IEXTR, FIDTR, FIXTR
* SRNMT, SFASR, LFAS
* LDETR, LXDTR, LEDTR, LDXTR, QADTR, QAXTR, RRDTR, RRXTR
* SLDT, SLXT SRDT, SRXT
* TDCDT, TDCET, TDCXT, TDGDT, TDGET, TDGXT
* 12/29/06 RPI 527 ADD MISSING DFP INS
* LPDFR, LNDFR, CPSDR, LCDFR, LDGR, LGDR
* 01/08/07 RPI 527 CORRECT CGDTR, CGXTR ROUNDING
* 01/10/07 RPI 533 CORRECT CGDTR, CGXTR ROUNDING
* 01/12/08 RPI 786 CHANGE BIAS BAASED ON NEW CANONIZATION
* 01/13/08 RPI 786 USE FP COMPARES TO HANDLE EQUIVALENT DFP VALUES
* 01/17/08 RPI 790 CORRECT TEST FOR EXPECTED BIAS BASED ON DFP CONST.
* 01/22/08 RPI 791 TEST CGDTR AND CGXTR SETTING CC3 IF TOO BIG
* 02/27/08 RPI 811 TEST THE FOLLOWING FIXES
* 1. CSDTR FIX FOR HIGH DIGIT 0 IF NEGATIVE
* 2. SRDT/SLDT/SRXT/SLXT INCORRECT FOR EXP > 0
* 03/13/08 RPI 820 TEST IEEE DIV,OVF,UNF EXCEPTION HANDLING
* 06/20/08 RPI 845 CHANGE EPIED TO IHAEPIE
*********************************************************************
MACRO
&N CLCED &S1,&S2
&N LE F0,&S1
LDETR F0,F0,0
LE F1,&S2
LDETR F1,F1,0
CDTR F0,R1
MEND
MACRO
&N CLCDD &S1,&S2
&N LD F0,&S1
LD F1,&S2
CDTR F0,F1
MEND
MACRO
&N CLCLD &S1,&S2
&N LX F0,&S1
LX F1,&S2
CXTR F0,F1
MEND
PRINT DATA
TESTDFP1 RT1 MAIN
DD1 DC DD'0'
ED1 DC ED'0'
LD1 DC LD'0'
PL16 DC PL16'0'
WORK DC XL16'00'
ED_BIAS EQU 101 S,C5,BXCF6,CCF20
DD_BIAS EQU 398 S,C5,BXCF8,CCF50
LD_BIAS EQU 6176 S,C5,BXDF12,CCF110
DDMIN DC DD'(MIN)' RPI 820
DDMAX DC DD'(MAX)' RPI 820
LDMIN DC LD'(MIN)' RPI 820
LDMAX DC LD'(MAX)' RPI 820
FPCREG DC F'0' FPC BFP/DFP CONTROL REG WORK AREA
FPCDXC EQU FPCREG+2 REASON CODES FOR 0C7 DATA EXCEPTIONS
TDCPZ EQU X'800' TEST DFP DATA CLASS PLUS ZERO
TDCMZ EQU X'400' TEST DFP DATA CLASS MINUS ZERO
TDCPSN EQU X'200' TEST DFP DATA CLASS PLUS SUBNORMAL <MIN OR >MAX
TDCMSN EQU X'100' TEST DFP DATA CLASS MINUS SUBNORMAL
TDCPN EQU X'080' TEST DFP DATA CLASS PLUS NORMAL IN RANGE
TDCMN EQU X'040' TEST DFP DATA CLASS MINUS NORMAL
TDCPI EQU X'020' TEST DFP DATA CLASS PLUS INFINITY
TDCMI EQU X'010' TEST DFP DATA CLASS MINUS INFINITY
TDCPQ EQU X'008' TEST DFP DATA CLASS PLUS QUIET NAN
TDCMQ EQU X'004' TEST DFP DATA CLASS MINUS QUIET NAN
TDCPSG EQU X'002' TEST DFP DATA CLASS PLUS SIGNAL NAN
TDCMSG EQU X'001' TEST DFP DATA CLASS MINUS SIGNAL NAN
TDGPSZ EQU X'800' TEST DFP DATA GROUP PLUS SAFE ZERO
TDGMSZ EQU X'400' TEST DFP DATA GROUP MINUS SAVE ZERO
TDGPEZ EQU X'200' TEST DFP DATA GROUP PLUS EXTREME EXP ZERO
TDGMEZ EQU X'100' TEST DFP DATA GROUP MINUS EXTREME EXP ZERO
TDGPEF EQU X'080' TEST DFP DATA GROUP PLUS EXTRENE FINITE
TDGMEF EQU X'040' TEST DFP DATA GROUP MINUS EXTREME FINITE
TDGPSF EQU X'020' TEST DFP DATA GROUP PLUS SAFE FINITE
TDGMSF EQU X'010' TEST DFP DATA GROUP MINUS SAFE FINITE
TDGPDF EQU X'008' TEST DFP DATA GROUP PLUS FIRST DIGIT NON EXT EXP
TDGMDF EQU X'004' TEST DFP DATA GROUP MINUS FIRST DIGIT NON EXT EXP
TDGPIN EQU X'002' TEST DFP DATA GROUP PLUS INFINITY OR NAN
TDGMIN EQU X'001' TEST DFP DATA GROUP MINUS INFINITY OR NAM
EQUREGS REGS=GPR
EQUREGS REGS=FPR
ESPIE_EXIT DS 0H
USING *,R15
USING EPIE,R1
L R0,EPIEPARM
ST R0,EPIEPSW+4
BR R14
DROP R15,R1
RT1 START
* B2B9 SRNMT
SRNMT 1 SET DFP ROUND TO ZERO
LD 4,=DD'1.5'
FIDTR 1,0,4,0
LD 5,=DD'1'
CDTR 1,5
RT1 CC0
SRNMT 0 RESET TO DFP ROUND HALF EVEN
LD 4,=DD'1.5'
FIDTR 1,0,4,0
LD 5,=DD'2'
CDTR 1,5
RT1 CC0
* B2BD LFAS
STFPC FPCREG
OI FPCREG+3,X'10'
LFAS FPCREG SET DFP ROUND MODE 1 - RND TO ZERO
LD 4,=DD'1.5'
FIDTR 1,0,4,0
LD 5,=DD'1'
CDTR 1,5
RT1 CC0
NI FPCREG+3,X'8F' RESET DFP RND TO 0 - NEAR HALF EVEN
LFAS FPCREG
LD 4,=DD'1.5'
FIDTR 1,0,4,0
LD 5,=DD'2'
CDTR 1,5
RT1 CC0
* B370 LPDFR
LD 2,=DD'1'
LD 3,=DD'1'
LPDFR 1,2
CDTR 1,3
RT1 CC0
LD 2,=DD'-1'
LD 3,=DD'1'
LPDFR 1,2
CDTR 1,3
RT1 CC0
* B371 LNDFR
LD 2,=DD'1'
LD 3,=DD'-1'
LNDFR 1,2
CDTR 1,3
RT1 CC0
LD 2,=DD'-1'
LD 3,=DD'-1'
LNDFR 1,2
CDTR 1,3
RT1 CC0
* B372 CPSDR
LD 2,=DD'2'
LD 3,=DD'-3'
LD 4,=DD'3'
CPSDR 1,2,3
CDTR 1,4
RT1 CC0
LD 2,=DD'-2'
LD 3,=DD'3'
LD 4,=DD'-3'
CPSDR 1,2,3
CDTR 1,4
RT1 CC0
* B373 LCDFR
LD 2,=DD'1'
LD 3,=DD'-1'
LCDFR 1,2
CDTR 1,3
RT1 CC0
LD 2,=DD'-1'
LD 3,=DD'1'
LCDFR 1,2
CDTR 1,3
RT1 CC0
* B385 SFASR
STFPC FPCREG
OI FPCREG+3,X'10'
L 1,FPCREG
SFASR 1 SET DFP ROUND MODE 1 - RND TO ZERO
LD 4,=DD'1.5'
FIDTR 1,0,4,0
LD 5,=DD'1'
CDTR 1,5
RT1 CC0
NI FPCREG+3,X'8F' RESET DFP RND TO 0 - NEAR HALF EVEN
L 1,FPCREG
SFASR 1
LD 4,=DD'1.5'
FIDTR 1,0,4,0
LD 5,=DD'2'
CDTR 1,5
RT1 CC0
* B3C1 LDGR
LG 2,=DD'1'
LD 3,=DD'1'
LDGR 1,2
CDTR 1,3
RT1 CC0
LG 2,=DD'2'
LD 3,=DD'2'
LDGR 1,2
CDTR 1,3
RT1 CC0
* B3CD LGDR
LD 2,=DD'1'
LG 3,=DD'1'
LGDR 1,2
CGR 1,3
RT1 CC0
LD 2,=DD'2'
LG 3,=DD'2'
LGDR 1,2
CGR 1,3
RT1 CC0
* B3D0 MDTR
LD 2,=DD'30'
LD 3,=DD'20'
MDTR 1,2,3
STD 1,DD1
CLCDD DD1,=DD'600'
RT1 CCE
LD 2,=DD'-30'
LD 3,=DD'-20'
MDTR 1,2,3
STD 1,DD1
CLCDD DD1,=DD'600'
RT1 CCE
ESPIE SET,ESPIE_EXIT,7,PARAM=MDTR1 DFP OVERFLOW FPCDXC=20
LD R0,=DD'1'
LD R1,DDMAX
MDTR R0,R0,R1
RT1 ABORT
MDTR1 ESPIE RESET,=F'0'
WTO 'ESPIE DFP MDTR OVERFLOW OK'
* B3D1 DDTR
LD 2,=DD'600'
LD 3,=DD'20'
DDTR 1,2,3
STD 1,DD1
CLCDD DD1,=DD'30'
RT1 CCE
LD 2,=DD'10'
LD 3,=DD'3'
DDTR 1,2,3
STD 1,DD1
CLCDD DD1,=DD'3.333333333333333'
RT1 CCE
ESPIE SET,ESPIE_EXIT,7,PARAM=DDTR1 DFP DIV FPCDXC=40 RPI 820
LD R4,=DD'1'
LD R5,=DD'0'
DDTR R1,R4,R5
RT1 ABORT
DDTR1 ESPIE RESET,=F'0'
STFPC FPCREG
CLI FPCDXC,X'40'
RT1 CCE
WTO 'ESPIE DFP DDTR DIVIDE OK'
* B3D2 ADTR
LD 2,=DD'1234567890123456'
LD 3,=DD'1111111111111111'
ADTR 1,2,3
RT1 CC2
STD 1,DD1
CLCDD DD1,=DD'2345679001234567'
RT1 CCE
LD 2,=DD'1'
LD 3,=DD'2'
ADTR 1,2,3
RT1 CC2
STD 1,DD1
CLCDD DD1,=DD'3'
RT1 CCE
LD 2,=DD'1.1'
LD 3,=DD'2.2'
ADTR 1,2,3
RT1 CC2
STD 1,DD1
CLCDD DD1,=DD'3.3'
RT1 CCE
LD 2,=DD'1'
LD 3,=DD'-1'
ADTR 1,2,3
RT1 CC0
STD 1,DD1
CLCDD DD1,=DD'0'
RT1 CCE
LD 2,=DD'1'
LD 3,=DD'-2'
ADTR 1,2,3
RT1 CC1
STD 1,DD1
CLCDD DD1,=DD'-1'
RT1 CCE
ESPIE SET,ESPIE_EXIT,7,PARAM=ADTR1 DFP OVERFLOW FPCDXC=20
LD R0,DDMAX
LD R1,DDMAX
ADTR R0,R0,R1
RT1 ABORT
ADTR1 ESPIE RESET,=F'0'
STFPC FPCREG
CLI FPCDXC,X'20'
RT1 CCE
WTO 'ESPIE DFP ADTR OVERFLOW OK'
* B3D3 SDTR
LD 2,=DD'1234567890123456'
LD 3,=DD'1111111111111111'
SDTR 1,2,3
RT1 CC2
STD 1,DD1
CLCDD DD1,=DD'123456779012345'
RT1 CCE
LD 2,=DD'1'
LD 3,=DD'1'
SDTR 1,2,3
RT1 CC0
STD 1,DD1
CLCDD DD1,=DD'0'
RT1 CCE
LD 2,=DD'0'
LD 3,=DD'1'
SDTR 1,2,3
RT1 CC1
STD 1,DD1
CLCDD DD1,=DD'-1'
RT1 CCE
ESPIE SET,ESPIE_EXIT,7,PARAM=SDTR1 DFP UNDERFLOW FPCDXC=10
LD R4,DDMIN
LD R5,DDMIN
ADTR R4,R4,R5
SDTR R4,R4,R5
RT1 ABORT
SDTR1 ESPIE RESET,=F'0'
STFPC FPCREG
CLI FPCDXC,X'10'
RT1 CCE
WTO 'ESPIE DFP SDTR UNDERFLOW OK'
* B3D4 LDETR
LE 4,=ED'123'
LDETR 1,4,0
LD 5,=DD'123'
CDTR 1,5
RT1 CC0
* B3D5 LEDTR
LD 4,=DD'1234568.5'
LEDTR 1,0,4,0 DEFAULT NEAREST HALF EVEN
STE 1,ED1
CLCED ED1,=ED'1234568'
RT1 CC0
LD 4,=DD'1234565.5'
LEDTR 1,0,4,0 DEFAULT NEAREST HALF EVEN
STE 1,ED1
CLCED ED1,=ED'1234566'
RT1 CC0
LD 4,=DD'1234568.5'
LEDTR 1,8+1,4,0 ROUND TOWARD ZERO
STE 1,ED1
CLCED ED1,=ED'1234568'
RT1 CC0
LD 4,=DD'1234567.5'
LEDTR 1,8+1,4,0 ROUND TOWARD ZERO
STE 1,ED1
CLCED ED1,=ED'1234567'
RT1 CC0
* B3D6 LTDTR
LD 4,=DD'1'
LTDTR 1,4
RT1 CCH
CDTR 1,4
RT1 CC0
LD 4,=DD'0'
LTDTR 1,4
RT1 CC0
CDTR 1,4
RT1 CC0
LD 4,=DD'-1'
LTDTR 1,4
RT1 CC1
CDTR 1,4
RT1 CC0
* B3D7 FIDTR
LD 4,=DD'123'
FIDTR 1,0,4,0
LD 5,=DD'123'
CDTR 1,5
RT1 CC0
LD 4,=DD'1.5'
FIDTR 1,0,4,0
LD 5,=DD'2'
CDTR 1,5
RT1 CC0
* B3D8 MXTR
LX 4,=LD'30'
LX 5,=LD'20'
MXTR 1,4,5
STX 1,LD1
CLCLD LD1,=LD'600'
RT1 CCE
LX 4,=LD'-30'
LX 5,=LD'-20'
MXTR 1,4,5
STX 1,LD1
CLCLD LD1,=LD'600'
RT1 CCE
ESPIE SET,ESPIE_EXIT,7,PARAM=MXTR1 DFP OVERFLOW FPCDXC=20
LX R0,=LD'1'
LX R1,LDMAX
MXTR R0,R0,R1
RT1 ABORT
MXTR1 ESPIE RESET,=F'0'
WTO 'ESPIE DFP MXTR OVERFLOW OK'
* B3D9 DXTR
LX 4,=LD'600'
LX 5,=LD'20'
DXTR 1,4,5
STX 1,LD1
CLCLD LD1,=LD'30'
RT1 CCE
LX 4,=LD'10'
LX 5,=LD'3'
DXTR 1,4,5
STX 1,LD1
CLCLD LD1,=LD'3.333333333333333333333333333333333'
RT1 CCE
ESPIE SET,ESPIE_EXIT,7,PARAM=DXTR1 DFP DIV FPCDXC=40 RPI 820
LX R4,=LD'1'
LX R5,=LD'0'
DXTR R0,R4,R5
RT1 ABORT
DXTR1 ESPIE RESET,=F'0'
STFPC FPCREG
CLI FPCDXC,X'40'
RT1 CCE
WTO 'ESPIE DFP DXTR DIVIDE OK'
* B3DA AXTR
LX 4,=LD'1234567890123456789012345678901234'
LX 5,=LD'1111111111111111111111111111111111'
AXTR 1,4,5
RT1 CC2
STX 1,LD1
CLCLD LD1,=LD'2345679001234567900123456790012345'
RT1 CCE
LX 4,=LD'1'
LX 5,=LD'2'
AXTR 1,4,5
RT1 CC2
STX 1,LD1
CLCLD LD1,=LD'3'
RT1 CCE
LX 4,=LD'1.1'
LX 5,=LD'2.2'
AXTR 1,4,5
RT1 CC2
STX 1,LD1
CLCLD LD1,=LD'3.3'
RT1 CCE
LX 4,=LD'1'
LX 5,=LD'-1'
AXTR 1,4,5
RT1 CC0
STX 1,LD1
CLCLD LD1,=LD'0'
RT1 CCE
LX 4,=LD'1'
LX 5,=LD'-2'
AXTR 1,4,5
RT1 CC1
STX 1,LD1
CLCLD LD1,=LD'-1'
RT1 CCE
ESPIE SET,ESPIE_EXIT,7,PARAM=AXTR1 DFP OVERFLOW FPCDXC=20
LX R0,LDMAX
LX R1,LDMAX
AXTR R0,R0,R1
RT1 ABORT
AXTR1 ESPIE RESET,=F'0'
STFPC FPCREG
CLI FPCDXC,X'20'
RT1 CCE
WTO 'ESPIE DFP AXTR OVERFLOW OK'
* B3DB SXTR
LX 4,=LD'1234567890123456789012345678901234'
LX 5,=LD'1111111111111111111111111111111111'
SXTR 1,4,5
RT1 CC2
STX 1,LD1
CLCLD LD1,=LD'123456779012345677901234567790123'
RT1 CCE
LX 4,=LD'1'
LX 5,=LD'1'
SXTR 1,4,5
RT1 CC0
STX 1,LD1
CLCLD LD1,=LD'0'
RT1 CCE
LX 4,=LD'0'
LX 5,=LD'1'
SXTR 1,4,5
RT1 CC1
STX 1,LD1
CLCLD LD1,=LD'-1'
RT1 CCE
ESPIE SET,ESPIE_EXIT,7,PARAM=SXTR1 DFP UNDERFLOW FPCDXC=10
LX R4,LDMIN
LX R5,LDMIN
AXTR R4,R4,R5
SXTR R4,R4,R5
RT1 ABORT
SXTR1 ESPIE RESET,=F'0'
STFPC FPCREG
CLI FPCDXC,X'10'
RT1 CCE
WTO 'ESPIE DFP SXTR UNDERFLOW OK'
* B3DC LXDTR
LD 4,=DD'123'
LXDTR 1,4,0
LX 5,=LD'123'
CXTR 1,5
RT1 CC0
* B3DD LDXTR
LX 4,=LD'1234567890123456.5'
LDXTR 1,0,4,0 DEFAULT NEAREST HALF EVEN
LD 5,=DD'1234567890123456'
CDTR 1,5
RT1 CC0
LX 4,=LD'1234567890123457.5'
LDXTR 1,0,4,0 DEFAULT NEAREST HALF EVEN
LD 5,=DD'1234567890123458'
CDTR 1,5
RT1 CC0
LX 4,=LD'1234567890123456.5'
LDXTR 1,8+1,4,0 ROUND TOWARD ZERO
LD 5,=DD'1234567890123456'
CDTR 1,5
RT1 CC0
LX 4,=LD'1234567890123457.5'
LDXTR 1,8+1,4,0 ROUND TOWARD ZERO
LD 5,=DD'1234567890123457'
CDTR 1,5
RT1 CC0
* B3DF FIXTR
LX 4,=LD'123'
FIXTR 1,0,4,0
LX 5,=LD'123'
CXTR 1,5
RT1 CC0
LX 4,=LD'1.5'
FIXTR 1,0,4,0
LX 5,=LD'2'
CXTR 1,5
RT1 CC0
LX 4,=LD'1.5'
FIXTR 1,0,4,0
LX 5,=LD'2'
CXTR 1,5
RT1 CC0
* B3E0 KDTR
LD 1,=DD'1'
LD 2,=DD'2'
KDTR 1,2
RT1 CC1
LD 1,=DD'1'
LD 2,=DD'1'
KDTR 1,2
RT1 CC0
LD 1,=DD'2'
LD 2,=DD'1'
KDTR 1,2
RT1 CC2
* B3DE LTXTR
LX 4,=LD'1'
LTXTR 1,4
RT1 CCH
CXTR 1,4
RT1 CC0
LX 4,=LD'0'
LTXTR 1,4
RT1 CC0
CXTR 1,4
RT1 CC0
LX 4,=LD'-1'
LTXTR 1,4
RT1 CC1
CXTR 1,4
RT1 CC0
* B3E1 CGDTR
LD 4,=DD'1234567890123456'
CGDTR 1,0,4
RT1 CCH
CLG 1,=FD'1234567890123456'
RT1 CC0
LD 4,=DD'-1234567890123456'
CGDTR 1,0,4
RT1 CCL
CLG 1,=FD'-1234567890123456'
RT1 CC0
LD 4,=DD'0'
CGDTR 1,0,4
RT1 CC0
CLG 1,=FD'0'
RT1 CC0
LD 4,=DD'1.5'
CGDTR 1,0,4
RT1 CCH
CLG 1,=FD'2'
RT1 CC0
LD 1,=DD'(MAX)' RPI 791
CGDTR 0,0,1
RT1 CC3
* MORE THAN HALF
LD 4,=DD'999.99'
CGDTR 1,8+0,4 RPI 533 NEAREST, HALF EVEN DEFAULT
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LD 4,=DD'999.99'
CGDTR 1,8+1,4 RPI 533 NEAREST, HALF TOWARD ZERO
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LD 4,=DD'999.99'
CGDTR 1,8+2,4 RPI 533 TOWARD +INFINITY
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LD 4,=DD'999.99'
CGDTR 1,8+3,4 RPI 533 TOWARD -INFINITY
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LD 4,=DD'999.99'
CGDTR 1,8+4,4 RPI 533 NEAREST, HALF AWAY FROM 0
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LD 4,=DD'999.99'
CGDTR 1,8+5,4 RPI 533 NEAREST, HALF TOWARD 0
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LD 4,=DD'999.99'
CGDTR 1,8+6,4 RPI 533 AWAY FROM ZERO
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
* LESS THAN HALF
LD 4,=DD'999.11'
CGDTR 1,8+0,4 RPI 533 NEAREST, HALF EVEN DEFAULT
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LD 4,=DD'999.11'
CGDTR 1,8+1,4 RPI 533 NEAREST, HALF TOWARD ZERO
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LD 4,=DD'999.11'
CGDTR 1,8+2,4 RPI 533 TOWARD +INFINITY
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LD 4,=DD'999.11'
CGDTR 1,8+3,4 RPI 533 TOWARD -INFINITY
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LD 4,=DD'999.11'
CGDTR 1,8+4,4 RPI 533 NEAREST, HALF AWAY FROM 0
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LD 4,=DD'999.11'
CGDTR 1,8+5,4 RPI 533 NEAREST, HALF TOWARD 0
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LD 4,=DD'999.11'
CGDTR 1,8+6,4 RPI 533 AWAY FROM ZERO
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
* ODD HALF
LD 4,=DD'999.5'
CGDTR 1,8+0,4 RPI 533 NEAREST, HALF EVEN DEFAULT
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LD 4,=DD'999.5'
CGDTR 1,8+1,4 RPI 533 NEAREST, HALF TOWARD ZERO
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LD 4,=DD'999.5'
CGDTR 1,8+2,4 RPI 533 TOWARD +INFINITY
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LD 4,=DD'999.5'
CGDTR 1,8+3,4 RPI 533 TOWARD -INFINITY
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LD 4,=DD'999.5'
CGDTR 1,8+4,4 RPI 533 NEAREST, HALF AWAY FROM 0
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LD 4,=DD'999.5'
CGDTR 1,8+5,4 RPI 533 NEAREST, HALF TOWARD 0
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LD 4,=DD'999.5'
CGDTR 1,8+6,4 RPI 533 AWAY FROM ZERO
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
* EVEN HALF
LD 4,=DD'998.5'
CGDTR 1,8+0,4 RPI 533 NEAREST, HALF EVEN DEFAULT
RT1 CCH
CLG 1,=FD'998'
RT1 CC0
LD 4,=DD'998.5'
CGDTR 1,8+1,4 RPI 533 NEAREST, HALF TOWARD ZERO
RT1 CCH
CLG 1,=FD'998'
RT1 CC0
LD 4,=DD'998.5'
CGDTR 1,8+2,4 RPI 533 TOWARD +INFINITY
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LD 4,=DD'998.5'
CGDTR 1,8+3,4 RPI 533 TOWARD -INFINITY
RT1 CCH
CLG 1,=FD'998'
RT1 CC0
LD 4,=DD'998.5'
CGDTR 1,8+4,4 RPI 533 NEAREST, HALF AWAY FROM 0
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LD 4,=DD'998.5'
CGDTR 1,8+5,4 RPI 533 NEAREST, HALF TOWARD 0
RT1 CCH
CLG 1,=FD'998'
RT1 CC0
LD 4,=DD'998.5'
CGDTR 1,8+6,4 RPI 533 AWAY FROM ZERO
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
* B3E2 CUDTR
LD 1,=DD'1'
CUDTR 0,1
CG 0,=XL8'1' RPI 790
RT1 CCE
LD 1,=DD'-1'
CUDTR 0,1
CG 0,=XL8'1' RPI 790
RT1 CCE
LD 1,=DD'1234567890123456' RPI 786
CUDTR 0,1
CG 0,=XL8'1234567890123456' RPI 786
RT1 CCE
* B3E3 CSDTR
LD 1,=DD'1'
CSDTR 0,1,0
CG 0,=PL8'1' RPI 790
RT1 CCE
CSDTR 0,1,1
CG 0,=XL8'000000000000001F' RPI 790
RT1 CCE
LD 1,=DD'-1'
CSDTR 0,1,0
CG 0,=PL8'-1' RPI 790
RT1 CCE
CSDTR 0,1,1
CG 0,=XL8'000000000000001D' RPI 790
RT1 CCE
LD 1,=DD'123456789012345'
CSDTR 0,1,0
CG 0,=PL8'123456789012345'
RT1 CCE
LD 1,=DD'-123456789012345'
CSDTR 0,1,0
CG 0,=PL8'-123456789012345'
RT1 CCE
* B3E4 CDTR
LD 1,=DD'1'
LD 2,=DD'2'
CDTR 1,2
RT1 CC1
LD 1,=DD'1'
LD 2,=DD'1'
CDTR 1,2
RT1 CC0
LD 1,=DD'2'
LD 2,=DD'1'
CDTR 1,2
RT1 CC2
* B3E5 EEDTR
LD 2,=DD'1'
EEDTR 1,2
CG 1,=FD'398' RPI 790
RT1 CC0
LD 2,=DD'1E1'
EEDTR 1,2
CG 1,=FD'399' RPI 790
RT1 CC0
LD 2,=DD'.1'
EEDTR 1,2
CG 1,=FD'397' RPI 790
RT1 CC0
* B3E7 ESDTR
LD 4,=DD'0'
ESDTR 1,4
CG 1,=FD'0' RPI 786
RT1 CC0
LD 4,=DD'1'
ESDTR 1,4
CG 1,=FD'1'
RT1 CC0
LD 4,=DD'-1'
ESDTR 1,4
CG 1,=FD'1'
RT1 CC0
LD 4,=DD'12'
ESDTR 1,4
CG 1,=FD'2'
RT1 CC0
LD 4,=DD'1234567890123456'
ESDTR 1,4
CG 1,=FD'16'
RT1 CC0
LD 0,=DD'1000000'
LD 0,=XL8'2238000000100000'
ESDTR 1,0
CG 1,=FD'7'
RT1 CC0
* B3E8 KXTR
LX 4,=LD'1'
LX 5,=LD'2'
KXTR 4,5
RT1 CC1
LX 4,=DD'1'
LX 5,=DD'1'
KXTR 4,5
RT1 CC0
LX 4,=DD'2'
LX 5,=DD'1'
KXTR 4,5
RT1 CC2
* B3E9 CGXTR
LX 4,=LD'123456789012345678'
CGXTR 1,0,4
RT1 CCH
CLG 1,=FD'123456789012345678'
RT1 CC0
LX 4,=LD'-123456789012345678'
CGXTR 1,0,4
RT1 CCL
CLG 1,=FD'-123456789012345678'
RT1 CC0
LX 4,=LD'0'
CGXTR 1,0,4
RT1 CC0
CLG 1,=FD'0'
RT1 CC0
LX 4,=LD'1.5'
CGXTR 1,0,4
RT1 CCH
CLG 1,=FD'2'
RT1 CC0
LX 1,=LD'(MAX)' RPI 791
CGDTR 0,0,1
RT1 CC3
* MORE THAN HALF
LX 4,=LD'999.99'
CGXTR 1,8+0,4 RPI 533 NEAREST, HALF EVEN DEFAULT
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LX 4,=LD'999.99'
CGXTR 1,8+1,4 RPI 533 NEAREST, HALF TOWARD ZERO
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LX 4,=LD'999.99'
CGXTR 1,8+2,4 RPI 533 TOWARD +INFINITY
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LX 4,=LD'999.99'
CGXTR 1,8+3,4 RPI 533 TOWARD -INFINITY
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LX 4,=LD'999.99'
CGXTR 1,8+4,4 RPI 533 NEAREST, HALF AWAY FROM 0
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LX 4,=LD'999.99'
CGXTR 1,8+5,4 RPI 533 NEAREST, HALF TOWARD 0
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LX 4,=LD'999.99'
CGXTR 1,8+6,4 RPI 533 AWAY FROM ZERO
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
* LESS THAN HALF
LX 4,=LD'999.11'
CGXTR 1,8+0,4 RPI 533 NEAREST, HALF EVEN DEFAULT
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LX 4,=LD'999.11'
CGXTR 1,8+1,4 RPI 533 NEAREST, HALF TOWARD ZERO
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LX 4,=LD'999.11'
CGXTR 1,8+2,4 RPI 533 TOWARD +INFINITY
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LX 4,=LD'999.11'
CGXTR 1,8+3,4 RPI 533 TOWARD -INFINITY
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LX 4,=LD'999.11'
CGXTR 1,8+4,4 RPI 533 NEAREST, HALF AWAY FROM 0
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LX 4,=LD'999.11'
CGXTR 1,8+5,4 RPI 533 NEAREST, HALF TOWARD 0
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LX 4,=LD'999.11'
CGXTR 1,8+6,4 RPI 533 AWAY FROM ZERO
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
* ODD HALF
LX 4,=LD'999.5'
CGXTR 1,8+0,4 RPI 533 NEAREST, HALF EVEN DEFAULT
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LX 4,=LD'999.5'
CGXTR 1,8+1,4 RPI 533 NEAREST, HALF TOWARD ZERO
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LX 4,=LD'999.5'
CGXTR 1,8+2,4 RPI 533 TOWARD +INFINITY
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LX 4,=LD'999.5'
CGXTR 1,8+3,4 RPI 533 TOWARD -INFINITY
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LX 4,=LD'999.5'
CGXTR 1,8+4,4 RPI 533 NEAREST, HALF AWAY FROM 0
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
LX 4,=LD'999.5'
CGXTR 1,8+5,4 RPI 533 NEAREST, HALF TOWARD 0
RT1 CCH
CLG 1,=FD'999'
RT1 CC0
LX 4,=LD'999.5'
CGXTR 1,8+6,4 RPI 533 AWAY FROM ZERO
RT1 CCH
CLG 1,=FD'1000'
RT1 CC0
* EVEN HALF
LD 4,=DD'998.5'
CGDTR 1,8+0,4 RPI 533 NEAREST, HALF EVEN DEFAULT
RT1 CCH
CLG 1,=FD'998'
RT1 CC0
LD 4,=DD'998.5'
CGDTR 1,8+1,4 RPI 533 NEAREST, HALF TOWARD ZERO
RT1 CCH
CLG 1,=FD'998'