-
Notifications
You must be signed in to change notification settings - Fork 1
/
TESTDFP2.MLC
188 lines (187 loc) · 6.41 KB
/
TESTDFP2.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
*********************************************************************
* Copyright 2007 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 - 01/18/08 *
*********************************************************************
* TEST DFP DECIMAL FLOATING POINT CONSTANTS
*********************************************************************
* 01/18/08 RPI 790 CORRECT EXPLICIT DECIMAL POINT SETTING EXPONENT
* 06/06/08 RPI 843 TEST HALF-EVEN ROUNDING FOR DD
*********************************************************************
PRINT DATA
TESTDFP2 SUBENTRY
WTO 'TESTDFP2 CHECK DPP DD, ED, AND LD CONSTANTS'
LM R4,R7,=A(DCGEN,DCGEN_END-DCGEN,DCVER,DCVER_END-DCVER)
CLCL R4,R6
BNE ERROR
WTO 'TESTDFP2 ENDED OK'
SUBEXIT
ERROR WTO ' TESTDFP2 ENDED WITH VERIFY ERROR'
ABEND 111,DUMP
EQUREGS
LTORG
DS 0D
DC CL8'**DCGEN='
DCGEN DS 0D
* DD
DC DD'0'
DC DD'1E-398'
DC DD'0.1234567890123456'
DC DD'0.12345678901234560'
DC DD'1'
DC DD'2'
DC DD'7.5'
DC DD'7.50'
DC DD'1E2'
DC DD'123456789012345'
DC DD'1.23456789012345E14'
DC DD'1234567890123456'
DC DD'12345678901234560' TRUNCATED TO ...456E1
DC DD'12345678901234565' HALF-EVEN TO ...456E1 RPI 843
DC DD'12345678901234575' HALF-EVEN TO ...458E1 RPI 843
DC DD'1234567890123456E300'
DC DD'9999999999999999E369'
DC DD'-1'
DC DD'-2'
DC DD'-1E2'
* ED
DC ED'0'
DC ED'1E-101'
DC ED'0.1234567'
DC ED'0.12345670'
DC ED'1'
DC ED'2'
DC ED'3'
DC ED'7.5'
DC ED'7.50'
DC ED'1E2'
DC ED'1234567'
DC ED'12345670' TRUNC TO ...567E1
DC ED'1234567' ROUND TO ...568E1
DC ED'1.234567E6'
DC ED'1234567E90'
DC ED'9999999E90'
DC ED'-1'
DC ED'-2'
DC ED'-1E2'
* LD
DS 0L RPI 1073 REQUIRED FOR NOALIGN
DC LD'0'
DC LD'0.1234567890123456789012345678901234'
DC LD'0.12345678901234567890123456789012340'
DC LD'1E-6176'
DC LD'1'
DC LD'2'
DC LD'7.5'
DC LD'7.50'
DC LD'1E2'
DC LD'1234567890123456789012345678901234'
DC LD'12345678901234567890123456789012340' TRUNK ..234E1
DC LD'12345678901234567890123456789012345' HALF-EVEN RPI 843
DC LD'12345678901234567890123456789012355' HALF-EVEN RPI 843
DC LD'1.234567890123456789012345678901234E33'
DC LD'1234567890123456789012345678901234'
DC LD'1234567890123456789012345678901234E6111'
DC LD'9999999999999999999999999999999999E6111'
DC LD'1E6111'
DC LD'-1'
DC LD'-2'
DC LD'-1E2'
DCGEN_END EQU *
DC CL8'**DCVER='
DCVER DS 0D
*
* DD
*
DC X'2238000000000000' DD'0'
DC X'0000000000000001' DD'1E-398'
DC X'25F934B9C1E28E56' DD'0.1234567890123456'
DC X'25F934B9C1E28E56' DD'0.12345678901234560'
DC X'2238000000000001' DD'1'
DC X'2238000000000002' DD'2'
DC X'2234000000000075' DD'7.5'
DC X'22300000000003D0' DD'7.50'
DC X'2240000000000001' DD'1E2'
DC X'2238A395BCF049C5' DD'123456789012345'
DC X'2238A395BCF049C5' DD'1.23456789012345E14'
DC X'263934B9C1E28E56' DD'1234567890123456'
DC X'263D34B9C1E28E56' DD'12345678901234560' TRUNCATED
DC X'263D34B9C1E28E56' DD'12345678901234565' HALF-EVEN RPI 843
DC X'263D34B9C1E28E58' DD'12345678901234575' HALF-EVEN RPI 843
DC X'46E934B9C1E28E56' DD'1234567890123456E300'
DC X'77FCFF3FCFF3FCFF' DD'9999999999999999E369'
DC X'A238000000000001' DD'-1'
DC X'A238000000000002' DD'-2'
DC X'A240000000000001' DD'-1E2'
*
* ED
*
DC X'22500000' ED'0'
DC X'00000001' ED'1E-101'
DC X'25E4D2E7' ED'0.1234567'
DC X'25E4D2E7' ED'0.12345670'
DC X'22500001' ED'1'
DC X'22500002' ED'2'
DC X'22500003' ED'3'
DC X'22400075' ED'7.5'
DC X'223003D0' ED'7.50'
DC X'22700001' ED'1E2'
DC X'2654D2E7' ED'1234567'
DC X'2664D2E7' ED'12345670' TRUNC TO ...567E1
DC X'2654D2E7' ED'1234567' ROUND TO ...568E1
DC X'2654D2E7' ED'1.234567E6'
DC X'47F4D2E7' ED'1234567E90'
DC X'77F3FCFF' ED'9999999E90'
DC X'A2500001' ED'-1'
DC X'A2500002' ED'-2'
DC X'A2700001' ED'-1E2'
*
* LD
*
DS 0D
DC X'2208000000000000' LD'0'
DC X'0000000000000000'
DC X'25FF934B9C1E28E5' LD'0.1234567890123456789012345678901234'
DC X'6F3C127177823534'
DC X'25FF934B9C1E28E5' LD'0.12345678901234567890123456789012340'
DC X'6F3C127177823534'
DC X'0000000000000000' LD'1E-6176'
DC X'0000000000000001'
DC X'2208000000000000' LD'1'
DC X'0000000000000001'
DC X'2208000000000000' LD'2'
DC X'0000000000000002'
DC X'2207C00000000000' LD'7.5'
DC X'0000000000000075'
DC X'2207800000000000' LD'7.50'
DC X'00000000000003D0'
DC X'2208800000000000' LD'1E2'
DC X'0000000000000001'
DC X'2608134B9C1E28E5' LD'1234567890123456789012345678901234'
DC X'6F3C127177823534'
DC X'2608534B9C1E28E5' LD'12345678901234567890123456789012340' 34E1
DC X'6F3C127177823534'
DC X'2608534B9C1E28E5' LD'12345678901234567890123456789012345'
DC X'6F3C127177823534' HALF=EVEN RPI 843
DC X'2608534B9C1E28E5' LD'12345678901234567890123456789012355'
DC X'6F3C127177823536' HALF=EVEN RPI 843
DC X'2608134B9C1E28E5' LD'1.234567890123456789012345678901234E33'
DC X'6F3C127177823534'
DC X'2608134B9C1E28E5' LD'1234567890123456789012345678901234'
DC X'6F3C127177823534'
DC X'47FFD34B9C1E28E5' LD'1234567890123456789012345678901234E6111'
DC X'6F3C127177823534'
DC X'77FFCFF3FCFF3FCF' LD'9999999999999999999999999999999999E6111'
DC X'F3FCFF3FCFF3FCFF'
DC X'43FFC00000000000' LD'1E6111'
DC X'0000000000000001'
DC X'A208000000000000' LD'-1'
DC X'0000000000000001'
DC X'A208000000000000' LD'-2'
DC X'0000000000000002'
DC X'A208800000000000' LD'-1E2'
DC X'0000000000000001'
DCVER_END EQU *
END