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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
|
\#
\# NASM revision history in nasmdoc format
\#
\H{cl-2.xx} NASM 2 Series
The NASM 2 series supports x86-64, and is the production version of NASM
since 2007.
\S{cl-2.11.02} Version 2.11.02
\b Add the \c{XSAVEC}, \c{XSAVES} and \c{XRSTORS} family instructions.
\S{cl-2.11.01} Version 2.11.01
\b Allow instructions which implicitly uses \c{XMM0} (\c{VBLENDVPD},
\c{VBLENDVPS}, \c{PBLENDVB} and \c{SHA256RNDS2}) to be specified
without an explicit \c{xmm0} on the assembly line. In other words,
the following two lines produce the same output:
\c vblendvpd xmm2,xmm1,xmm0 ; Last operand is fixed xmm0
\c vblendvpd xmm2,xmm1 ; Implicit xmm0 omitted
\b In the ELF backends, don't crash the assembler if \c{section align}
is specified without a value.
\S{cl-2.11} Version 2.11
\b Add support for the Intel AVX-512 instruction set:
\b 16 new, 512-bit SIMD registers. Total 32 \c{(ZMM0 ~ ZMM31)}
\b 8 new opmask registers \c{(K0 ~ K7)}. One of 7 registers \c{(K1 ~ K7)} can
be used as an opmask for conditional execution.
\b A new EVEX encoding prefix. EVEX is based on VEX and provides more
capabilities: opmasks, broadcasting, embedded rounding and compressed
displacements.
\c - opmask
\c VDIVPD zmm0{k1}{z}, zmm1, zmm3 ; conditional vector operation
\c ; using opmask k1.
\c ; {z} is for zero-masking
\c - broadcasting
\c VDIVPS zmm4, zmm5, [rbx]{1to16} ; load single-precision float and
\c ; replicate it 16 times. 32 * 16 = 512
\c - embedded rounding
\c VCVTSI2SD xmm6, xmm7, {rz-sae}, rax ; round toward zero. note that it
\c ; is used as if a separate operand.
\c ; it comes after the last SIMD operand
\b Add support for \c{ZWORD} (512 bits), \c{DZ} and \c{RESZ}.
\b Add support for the MPX and SHA instruction sets.
\b Better handling of section redefinition.
\b Generate manpages when running \c{'make dist'}.
\b Handle all token chains in mmacro params range.
\b Support split [base,index] effective address:
\c mov eax,[eax+8,ecx*4] ; eax=base, ecx=index, 4=scale, 8=disp
This is expected to be most useful for the MPX instructions.
\b Support \c{BND} prefix for branch instructions (for MPX).
\b The \c{DEFAULT} directive can now take \c{BND} and \c{NOBND}
options to indicate whether all relevant branches should be getting
\c{BND} prefixes. This is expected to be the normal for use in MPX
code.
\b Add \c{{evex}}, \c{{vex3}} and \c{{vex2}} instruction prefixes to
have NASM encode the corresponding instruction, if possible, with an EVEX,
3-byte VEX, or 2-byte VEX prefix, respectively.
\b Support for section names longer than 8 bytes in Win32/Win64 COFF.
\b The \c{NOSPLIT} directive by itself no longer forces a single
register to become an index register, unless it has an explicit
multiplier.
\c mov eax,[nosplit eax] ; eax as base register
\c mov eax,[nosplit eax*1] ; eax as index register
\S{cl-2.10.09} Version 2.10.09
\b Pregenerate man pages.
\S{cl-2.10.08} Version 2.10.08
\b Fix \c{VMOVNTDQA}, \c{MOVNTDQA} and \c{MOVLPD} instructions.
\b Fix collision for \c{VGATHERQPS}, \c{VPGATHERQD} instructions.
\b Fix \c{VPMOVSXBQ}, \c{VGATHERQPD}, \c{VSPLLW} instructions.
\b Add a bunch of AMD TBM instructions.
\b Fix potential stack overwrite in numbers conversion.
\b Allow byte size in \c{PREFETCHTx} instructions.
\b Make manual pages up to date.
\b Make \c{F3} and \c{F2} SSE prefixes to override \c{66}.
\b Support of AMD SVM instructions in 32 bit mode.
\b Fix near offsets code generation for \c{JMP}, \c{CALL} instrictions
in long mode.
\b Fix preprocessor parse regression when id is expanding to a whitespace.
\S{cl-2.10.07} Version 2.10.07
\b Fix line continuation parsing being broken in previous version.
\S{cl-2.10.06} Version 2.10.06
\b Always quote the dependency source names when using the automatic
dependency generation options.
\b If no dependency target name is specified via the \c{-MT} or
\c{-MQ} options, quote the default output name.
\b Fix assembly of shift operations in \c{CPU 8086} mode.
\b Fix incorrect generation of explicit immediate byte for shift by 1
under certain circumstances.
\b Fix assembly of the \c{VPCMPGTQ} instruction.
\b Fix RIP-relative relocations in the \c{macho64} backend.
\S{cl-2.10.05} Version 2.10.05
\b Add the \c{CLAC} and \c{STAC} instructions.
\S{cl-2.10.04} Version 2.10.04
\b Add back the inadvertently deleted 256-bit version of the \c{VORPD}
instruction.
\b Correct disassembly of instructions starting with byte \c{82} hex.
\b Fix corner cases in token pasting, for example:
\c %define N 1e%++%+ 5
\c dd N, 1e+5
\S{cl-2.10.03} Version 2.10.03
\b Correct the assembly of the instruction:
\c XRELEASE MOV [absolute],AL
Previous versions would incorrectly generate \c{F3 A2} for this
instruction and issue a warning; correct behavior is to emit \c{F3 88
05}.
\S{cl-2.10.02} Version 2.10.02
\b Add the \c{ifunc} macro package with integer functions, currently
only integer logarithms. See \k{pkg_ifunc}.
\b Add the \c{RDSEED}, \c{ADCX} and \c{ADOX} instructions.
\S{cl-2.10.01} Version 2.10.01
\b Add missing VPMOVMSKB instruction with reg32, ymmreg operands.
\S{cl-2.10} Version 2.10
\b When optimization is enabled, \c{mov r64,imm} now optimizes to the
shortest form possible between:
\c mov r32,imm32 ; 5 bytes
\c mov r64,imm32 ; 7 bytes
\c mov r64,imm64 ; 10 bytes
To force a specific form, use the \c{STRICT} keyword, see \k{strict}.
\b Add support for the Intel AVX2 instruction set.
\b Add support for Bit Manipulation Instructions 1 and 2.
\b Add support for Intel Transactional Synchronization Extensions (TSX).
\b Add support for x32 ELF (32-bit ELF with the CPU in 64-bit mode.)
See \k{elffmt}.
\b Add support for bigendian UTF-16 and UTF-32. See \k{unicode}.
\S{cl-2.09.10} Version 2.09.10
\b Fix up NSIS script to protect uninstaller against registry keys
absence or corruption. It brings in a few additional questions
to a user during deinstallation procedure but still it is better
than unpredictable file removal.
\S{cl-2.09.09} Version 2.09.09
\b Fix initialization of section attributes of \c{bin} output format.
\b Fix \c{mach64} output format bug that crashes NASM due to NULL symbols.
\S{cl-2.09.08} Version 2.09.08
\b Fix \c{__OUTPUT_FORMAT__} assignment when output driver alias
is used. For example when \c{-f elf} is used \c{__OUTPUT_FORMAT__}
must be set to \c{elf}, if \c{-f elf32} is used \c{__OUTPUT_FORMAT__}
must be assigned accordingly, i.e. to \c{elf32}. The rule applies to
all output driver aliases. See \k{ofmtm}.
\S{cl-2.09.07} Version 2.09.07
\b Fix attempts to close same file several times
when \c{-a} option is used.
\b Fixes for VEXTRACTF128, VMASKMOVPS encoding.
\S{cl-2.09.06} Version 2.09.06
\b Fix missed section attribute initialization in \c{bin} output target.
\S{cl-2.09.05} Version 2.09.05
\b Fix arguments encoding for VPEXTRW instruction.
\b Remove invalid form of VPEXTRW instruction.
\b Add \c{VLDDQU} as alias for \c{VLDQQU} to
match specification.
\S{cl-2.09.04} Version 2.09.04
\b Fix incorrect labels offset for VEX intructions.
\b Eliminate bogus warning on implicit operand size override.
\b \c{%if} term could not handle 64 bit numbers.
\b The COFF backend was limiting relocations number to 16 bits even if
in real there were a way more relocations.
\S{cl-2.09.03} Version 2.09.03
\b Print \c{%macro} name inside \c{%rep} blocks on error.
\b Fix preprocessor expansion behaviour. It happened sometime
too early and sometime simply wrong. Move behaviour back to
the origins (down to NASM 2.05.01).
\b Fix unitialized data dereference on OMF output format.
\b Issue warning on unterminated \c{%{} construct.
\b Fix for documentation typo.
\S{cl-2.09.02} Version 2.09.02
\b Fix reversed tokens when \c{%deftok} produces more than one output token.
\b Fix segmentation fault on disassembling some VEX instructions.
\b Missing \c{%endif} did not always cause error.
\b Fix typo in documentation.
\b Compound context local preprocessor single line macro identifiers
were not expanded early enough and as result lead to unresolved
symbols.
\S{cl-2.09.01} Version 2.09.01
\b Fix NULL dereference on missed %deftok second parameter.
\b Fix NULL dereference on invalid %substr parameters.
\S{cl-2.09} Version 2.09
\b Fixed assignment the magnitude of \c{%rep} counter. It is limited
to 62 bits now.
\b Fixed NULL dereference if argument of \c{%strlen} resolves
to whitespace. For example if nonexistent macro parameter is used.
\b \c{%ifenv}, \c{%elifenv}, \c{%ifnenv}, and \c{%elifnenv} directives
introduced. See \k{ifenv}.
\b Fixed NULL dereference if environment variable is missed.
\b Updates of new AVX v7 Intel instructions.
\b \c{PUSH imm32} is now officially documented.
\b Fix for encoding the LFS, LGS and LSS in 64-bit mode.
\b Fixes for compatibility with OpenWatcom compiler and DOS 8.3 file
format limitation.
\b Macros parameters range expansion introduced. See \k{mlmacrange}.
\b Backward compatibility on expanging of local sigle macros restored.
\b 8 bit relocations for \c{elf} and \c{bin} output formats are introduced.
\b Short intersegment jumps are permitted now.
\b An alignment more than 64 bytes are allowed for \c{win32},
\c{win64} output formats.
\b \c{SECTALIGN} directive introduced. See \k{sectalign}.
\b \c{nojmp} option introduced in \c{smartalign} package. See
\k{pkg_smartalign}.
\b Short aliases \c{win}, \c{elf} and \c{macho} for output formats are
introduced. Each stands for \c{win32}, \c{elf32} and \c{macho32}
accordingly.
\b Faster handling of missing directives implemented.
\b Various small improvements in documentation.
\b No hang anymore if unable to open malloc.log file.
\b The environments without vsnprintf function are able to build nasm again.
\b AMD LWP instructions updated.
\b Tighten EA checks. We warn a user if there overflow in EA addressing.
\b Make \c{-Ox} the default optimization level. For the legacy
behavior, specify \c{-O0} explicitly. See \k{opt-O}.
\b Environment variables read with \c{%!} or tested with \c{%ifenv}
can now contain non-identifier characters if surrounded by quotes.
See \k{getenv}.
\b Add a new standard macro package \c{%use fp} for floating-point
convenience macros. See \k{pkg_fp}.
\S{cl-2.08.02} Version 2.08.02
\b Fix crash under certain circumstances when using the \c{%+} operator.
\S{cl-2.08.01} Version 2.08.01
\b Fix the \c{%use} statement, which was broken in 2.08.
\S{cl-2.08} Version 2.08
\b A number of enhancements/fixes in macros area.
\b Support for converting strings to tokens. See \k{deftok}.
\b Fuzzy operand size logic introduced.
\b Fix COFF stack overrun on too long export identifiers.
\b Fix Macho-O alignment bug.
\b Fix crashes with -fwin32 on file with many exports.
\b Fix stack overrun for too long [DEBUG id].
\b Fix incorrect sbyte usage in IMUL (hit only if optimization
flag passed).
\b Append ending token for \c{.stabs} records in the ELF output format.
\b New NSIS script which uses ModernUI and MultiUser approach.
\b Visual Studio 2008 NASM integration (rules file).
\b Warn a user if a constant is too long (and as result will be stripped).
\b The obsoleted pre-XOP AMD SSE5 instruction set which was never actualized
was removed.
\b Fix stack overrun on too long error file name passed from the command line.
\b Bind symbols to the .text section by default (ie in case if SECTION
directive was omitted) in the ELF output format.
\b Fix sync points array index wrapping.
\b A few fixes for FMA4 and XOP instruction templates.
\b Add AMD Lightweight Profiling (LWP) instructions.
\b Fix the offset for \c{%arg} in 64-bit mode.
\b An undefined local macro (\c{%$}) no longer matches a global macro
with the same name.
\b Fix NULL dereference on too long local labels.
\S{cl-2.07} Version 2.07
\b NASM is now under the 2-clause BSD license. See \k{legal}.
\b Fix the section type for the \c{.strtab} section in the \c{elf64}
output format.
\b Fix the handling of \c{COMMON} directives in the \c{obj} output format.
\b New \c{ith} and \c{srec} output formats; these are variants of the
\c{bin} output format which output Intel hex and Motorola S-records,
respectively. See \k{ithfmt} and \k{srecfmt}.
\b \c{rdf2ihx} replaced with an enhanced \c{rdf2bin}, which can output
binary, COM, Intel hex or Motorola S-records.
\b The Windows installer now puts the NASM directory first in the
\c{PATH} of the "NASM Shell".
\b Revert the early expansion behavior of \c{%+} to pre-2.06 behavior:
\c{%+} is only expanded late.
\b Yet another Mach-O alignment fix.
\b Don't delete the list file on errors. Also, include error and
warning information in the list file.
\b Support for 64-bit Mach-O output, see \k{machofmt}.
\b Fix assert failure on certain operations that involve strings with
high-bit bytes.
\S{cl-2.06} Version 2.06
\b This release is dedicated to the memory of Charles A. Crayne, long
time NASM developer as well as moderator of \c{comp.lang.asm.x86} and
author of the book \e{Serious Assembler}. We miss you, Chuck.
\b Support for indirect macro expansion (\c{%[...]}). See \k{indmacro}.
\b \c{%pop} can now take an argument, see \k{pushpop}.
\b The argument to \c{%use} is no longer macro-expanded. Use
\c{%[...]} if macro expansion is desired.
\b Support for thread-local storage in ELF32 and ELF64. See \k{elftls}.
\b Fix crash on \c{%ifmacro} without an argument.
\b Correct the arguments to the \c{POPCNT} instruction.
\b Fix section alignment in the Mach-O format.
\b Update AVX support to version 5 of the Intel specification.
\b Fix the handling of accesses to context-local macros from higher
levels in the context stack.
\b Treat \c{WAIT} as a prefix rather than as an instruction, thereby
allowing constructs like \c{O16 FSAVE} to work correctly.
\b Support for structures with a non-zero base offset. See \k{struc}.
\b Correctly handle preprocessor token concatenation (see \k{concat})
involving floating-point numbers.
\b The \c{PINSR} series of instructions have been corrected and
rationalized.
\b Removed AMD SSE5, replaced with the new XOP/FMA4/CVT16 (rev 3.03)
spec.
\b The ELF backends no longer automatically generate a \c{.comment} section.
\b Add additional "well-known" ELF sections with default attributes. See
\k{elfsect}.
\S{cl-2.05.01} Version 2.05.01
\b Fix the \c{-w}/\c{-W} option parsing, which was broken in NASM 2.05.
\S{cl-2.05} Version 2.05
\b Fix redundant REX.W prefix on \c{JMP reg64}.
\b Make the behaviour of \c{-O0} match NASM 0.98 legacy behavior.
See \k{opt-O}.
\b \c{-w-user} can be used to suppress the output of \c{%warning} directives.
See \k{opt-w}.
\b Fix bug where \c{ALIGN} would issue a full alignment datum instead of
zero bytes.
\b Fix offsets in list files.
\b Fix \c{%include} inside multi-line macros or loops.
\b Fix error where NASM would generate a spurious warning on valid
optimizations of immediate values.
\b Fix arguments to a number of the \c{CVT} SSE instructions.
\b Fix RIP-relative offsets when the instruction carries an immediate.
\b Massive overhaul of the ELF64 backend for spec compliance.
\b Fix the Geode \c{PFRCPV} and \c{PFRSQRTV} instruction.
\b Fix the SSE 4.2 \c{CRC32} instruction.
\S{cl-2.04} Version 2.04
\b Sanitize macro handing in the \c{%error} directive.
\b New \c{%warning} directive to issue user-controlled warnings.
\b \c{%error} directives are now deferred to the final assembly phase.
\b New \c{%fatal} directive to immediately terminate assembly.
\b New \c{%strcat} directive to join quoted strings together.
\b New \c{%use} macro directive to support standard macro directives. See
\k{use}.
\b Excess default parameters to \c{%macro} now issues a warning by default.
See \k{mlmacro}.
\b Fix \c{%ifn} and \c{%elifn}.
\b Fix nested \c{%else} clauses.
\b Correct the handling of nested \c{%rep}s.
\b New \c{%unmacro} directive to undeclare a multi-line macro.
See \k{unmacro}.
\b Builtin macro \c{__PASS__} which expands to the current assembly pass.
See \k{pass_macro}.
\b \c{__utf16__} and \c{__utf32__} operators to generate UTF-16 and UTF-32
strings. See \k{unicode}.
\b Fix bug in case-insensitive matching when compiled on platforms that
don't use the \c{configure} script. Of the official release binaries,
that only affected the OS/2 binary.
\b Support for x87 packed BCD constants. See \k{bcdconst}.
\b Correct the \c{LTR} and \c{SLDT} instructions in 64-bit mode.
\b Fix unnecessary REX.W prefix on indirect jumps in 64-bit mode.
\b Add AVX versions of the AES instructions (\c{VAES}...).
\b Fix the 256-bit FMA instructions.
\b Add 256-bit AVX stores per the latest AVX spec.
\b VIA XCRYPT instructions can now be written either with or without
\c{REP}, apparently different versions of the VIA spec wrote them
differently.
\b Add missing 64-bit \c{MOVNTI} instruction.
\b Fix the operand size of \c{VMREAD} and \c{VMWRITE}.
\b Numerous bug fixes, especially to the AES, AVX and VTX instructions.
\b The optimizer now always runs until it converges. It also runs even
when disabled, but doesn't optimize. This allows most forward references
to be resolved properly.
\b \c{%push} no longer needs a context identifier; omitting the context
identifier results in an anonymous context.
\S{cl-2.03.01} Version 2.03.01
\b Fix buffer overflow in the listing module.
\b Fix the handling of hexadecimal escape codes in `...` strings.
\b The Postscript/PDF documentation has been reformatted.
\b The \c{-F} option now implies \c{-g}.
\S{cl-2.03} Version 2.03
\b Add support for Intel AVX, CLMUL and FMA instructions,
including YMM registers.
\b \c{dy}, \c{resy} and \c{yword} for 32-byte operands.
\b Fix some SSE5 instructions.
\b Intel \c{INVEPT}, \c{INVVPID} and \c{MOVBE} instructions.
\b Fix checking for critical expressions when the optimizer is enabled.
\b Support the DWARF debugging format for ELF targets.
\b Fix optimizations of signed bytes.
\b Fix operation on bigendian machines.
\b Fix buffer overflow in the preprocessor.
\b \c{SAFESEH} support for Win32, \c{IMAGEREL} for Win64 (SEH).
\b \c{%?} and \c{%??} to refer to the name of a macro itself. In particular,
\c{%idefine keyword $%?} can be used to make a keyword "disappear".
\b New options for dependency generation: \c{-MD}, \c{-MF},
\c{-MP}, \c{-MT}, \c{-MQ}.
\b New preprocessor directives \c{%pathsearch} and \c{%depend}; INCBIN
reimplemented as a macro.
\b \c{%include} now resolves macros in a sane manner.
\b \c{%substr} can now be used to get other than one-character substrings.
\b New type of character/string constants, using backquotes (\c{`...`}),
which support C-style escape sequences.
\b \c{%defstr} and \c{%idefstr} to stringize macro definitions before
creation.
\b Fix forward references used in \c{EQU} statements.
\S{cl-2.02} Version 2.02
\b Additional fixes for MMX operands with explicit \c{qword}, as well as
(hopefully) SSE operands with \c{oword}.
\b Fix handling of truncated strings with \c{DO}.
\b Fix segfaults due to memory overwrites when floating-point constants
were used.
\b Fix segfaults due to missing include files.
\b Fix OpenWatcom Makefiles for DOS and OS/2.
\b Add autogenerated instruction list back into the documentation.
\b ELF: Fix segfault when generating stabs, and no symbols have been
defined.
\b ELF: Experimental support for DWARF debugging information.
\b New compile date and time standard macros.
\b \c{%ifnum} now returns true for negative numbers.
\b New \c{%iftoken} test for a single token.
\b New \c{%ifempty} test for empty expansion.
\b Add support for the \c{XSAVE} instruction group.
\b Makefile for Netware/gcc.
\b Fix issue with some warnings getting emitted way too many times.
\b Autogenerated instruction list added to the documentation.
\S{cl-2.01} Version 2.01
\b Fix the handling of MMX registers with explicit \c{qword} tags on
memory (broken in 2.00 due to 64-bit changes.)
\b Fix the PREFETCH instructions.
\b Fix the documentation.
\b Fix debugging info when using \c{-f elf}
(backwards compatibility alias for \c{-f elf32}).
\b Man pages for rdoff tools (from the Debian project.)
\b ELF: handle large numbers of sections.
\b Fix corrupt output when the optimizer runs out of passes.
\S{cl-2.00} Version 2.00
\b Added c99 data-type compliance.
\b Added general x86-64 support.
\b Added win64 (x86-64 COFF) output format.
\b Added \c{__BITS__} standard macro.
\b Renamed the \c{elf} output format to \c{elf32} for clarity.
\b Added \c{elf64} and \c{macho} (MacOS X) output formats.
\b Added Numeric constants in \c{dq} directive.
\b Added \c{oword}, \c{do} and \c{reso} pseudo operands.
\b Allow underscores in numbers.
\b Added 8-, 16- and 128-bit floating-point formats.
\b Added binary, octal and hexadecimal floating-point.
\b Correct the generation of floating-point constants.
\b Added floating-point option control.
\b Added Infinity and NaN floating point support.
\b Added ELF Symbol Visibility support.
\b Added setting OSABI value in ELF header directive.
\b Added Generate Makefile Dependencies option.
\b Added Unlimited Optimization Passes option.
\b Added \c{%IFN} and \c{%ELIFN} support.
\b Added Logical Negation Operator.
\b Enhanced Stack Relative Preprocessor Directives.
\b Enhanced ELF Debug Formats.
\b Enhanced Send Errors to a File option.
\b Added SSSE3, SSE4.1, SSE4.2, SSE5 support.
\b Added a large number of additional instructions.
\b Significant performance improvements.
\b \c{-w+warning} and \c{-w-warning} can now be written as -Wwarning and
-Wno-warning, respectively. See \k{opt-w}.
\b Add \c{-w+error} to treat warnings as errors. See \k{opt-w}.
\b Add \c{-w+all} and \c{-w-all} to enable or disable all suppressible
warnings. See \k{opt-w}.
\H{cl-0.98.xx} NASM 0.98 Series
The 0.98 series was the production versions of NASM from 1999 to 2007.
\S{cl-0.98.39} Version 0.98.39
\b fix buffer overflow
\b fix outas86's \c{.bss} handling
\b "make spotless" no longer deletes config.h.in.
\b \c{%(el)if(n)idn} insensitivity to string quotes difference (#809300).
\b (nasm.c)\c{__OUTPUT_FORMAT__} changed to string value instead of symbol.
\S{cl-0.98.38} Version 0.98.38
\b Add Makefile for 16-bit DOS binaries under OpenWatcom, and modify
\c{mkdep.pl} to be able to generate completely pathless dependencies, as
required by OpenWatcom wmake (it supports path searches, but not
explicit paths.)
\b Fix the \c{STR} instruction.
\b Fix the ELF output format, which was broken under certain
circumstances due to the addition of stabs support.
\b Quick-fix Borland format debug-info for \c{-f obj}
\b Fix for \c{%rep} with no arguments (#560568)
\b Fix concatenation of preprocessor function call (#794686)
\b Fix long label causes coredump (#677841)
\b Use autoheader as well as autoconf to keep configure from generating
ridiculously long command lines.
\b Make sure that all of the formats which support debugging output
actually will suppress debugging output when \c{-g} not specified.
\S{cl-0.98.37} Version 0.98.37
\b Paths given in \c{-I} switch searched for \c{incbin}-ed as
well as \c{%include}-ed files.
\b Added stabs debugging for the ELF output format, patch from
Martin Wawro.
\b Fix \c{output/outbin.c} to allow origin > 80000000h.
\b Make \c{-U} switch work.
\b Fix the use of relative offsets with explicit prefixes, e.g.
\c{a32 loop foo}.
\b Remove \c{backslash()}.
\b Fix the \c{SMSW} and \c{SLDT} instructions.
\b \c{-O2} and \c{-O3} are no longer aliases for \c{-O10} and \c{-O15}.
If you mean the latter, please say so! :)
\S{cl-0.98.36} Version 0.98.36
\b Update rdoff - librarian/archiver - common rec - docs!
\b Fix signed/unsigned problems.
\b Fix \c{JMP FAR label} and \c{CALL FAR label}.
\b Add new multisection support - map files - fix align bug
\b Fix sysexit, movhps/movlps reg,reg bugs in insns.dat
\b \c{Q} or \c{O} suffixes indicate octal
\b Support Prescott new instructions (PNI).
\b Cyrix \c{XSTORE} instruction.
\S{cl-0.98.35} Version 0.98.35
\b Fix build failure on 16-bit DOS (Makefile.bc3 workaround for compiler bug.)
\b Fix dependencies and compiler warnings.
\b Add "const" in a number of places.
\b Add -X option to specify error reporting format (use -Xvc to
integrate with Microsoft Visual Studio.)
\b Minor changes for code legibility.
\b Drop use of tmpnam() in rdoff (security fix.)
\S{cl-0.98.34} Version 0.98.34
\b Correct additional address-size vs. operand-size confusions.
\b Generate dependencies for all Makefiles automatically.
\b Add support for unimplemented (but theoretically available)
registers such as tr0 and cr5. Segment registers 6 and 7 are called
segr6 and segr7 for the operations which they can be represented.
\b Correct some disassembler bugs related to redundant address-size prefixes.
Some work still remains in this area.
\b Correctly generate an error for things like "SEG eax".
\b Add the JMPE instruction, enabled by "CPU IA64".
\b Correct compilation on newer gcc/glibc platforms.
\b Issue an error on things like "jmp far eax".
\S{cl-0.98.33} Version 0.98.33
\b New __NASM_PATCHLEVEL__ and __NASM_VERSION_ID__ standard macros to
round out the version-query macros. version.pl now understands
X.YYplWW or X.YY.ZZplWW as a version number, equivalent to
X.YY.ZZ.WW (or X.YY.0.WW, as appropriate).
\b New keyword "strict" to disable the optimization of specific
operands.
\b Fix the handing of size overrides with JMP instructions
(instructions such as "jmp dword foo".)
\b Fix the handling of "ABSOLUTE label", where "label" points into a
relocatable segment.
\b Fix OBJ output format with lots of externs.
\b More documentation updates.
\b Add -Ov option to get verbose information about optimizations.
\b Undo a braindead change which broke \c{%elif} directives.
\b Makefile updates.
\S{cl-0.98.32} Version 0.98.32
\b Fix NASM crashing when \c{%macro} directives were left unterminated.
\b Lots of documentation updates.
\b Complete rewrite of the PostScript/PDF documentation generator.
\b The MS Visual C++ Makefile was updated and corrected.
\b Recognize .rodata as a standard section name in ELF.
\b Fix some obsolete Perl4-isms in Perl scripts.
\b Fix configure.in to work with autoconf 2.5x.
\b Fix a couple of "make cleaner" misses.
\b Make the normal "./configure && make" work with Cygwin.
\S{cl-0.98.31} Version 0.98.31
\b Correctly build in a separate object directory again.
\b Derive all references to the version number from the version file.
\b New standard macros __NASM_SUBMINOR__ and __NASM_VER__ macros.
\b Lots of Makefile updates and bug fixes.
\b New \c{%ifmacro} directive to test for multiline macros.
\b Documentation updates.
\b Fixes for 16-bit OBJ format output.
\b Changed the NASM environment variable to NASMENV.
\S{cl-0.98.30} Version 0.98.30
\b Changed doc files a lot: completely removed old READMExx and
Wishlist files, incorporating all information in CHANGES and TODO.
\b I waited a long time to rename zoutieee.c to (original) outieee.c
\b moved all output modules to output/ subdirectory.
\b Added 'make strip' target to strip debug info from nasm & ndisasm.
\b Added INSTALL file with installation instructions.
\b Added -v option description to nasm man.
\b Added dist makefile target to produce source distributions.
\b 16-bit support for ELF output format (GNU extension, but useful.)
\S{cl-0.98.28} Version 0.98.28
\b Fastcooked this for Debian's Woody release:
Frank applied the INCBIN bug patch to 0.98.25alt and called
it 0.98.28 to not confuse poor little apt-get.
\S{cl-0.98.26} Version 0.98.26
\b Reorganised files even better from 0.98.25alt
\S{cl-0.98.25alt} Version 0.98.25alt
\b Prettified the source tree. Moved files to more reasonable places.
\b Added findleak.pl script to misc/ directory.
\b Attempted to fix doc.
\S{cl-0.98.25} Version 0.98.25
\b Line continuation character \c{\\}.
\b Docs inadvertantly reverted - "dos packaging".
\S{cl-0.98.24p1} Version 0.98.24p1
\b FIXME: Someone, document this please.
\S{cl-0.98.24} Version 0.98.24
\b Documentation - Ndisasm doc added to Nasm.doc.
\S{cl-0.98.23} Version 0.98.23
\b Attempted to remove rdoff version1
\b Lino Mastrodomenico's patches to preproc.c (%$$ bug?).
\S{cl-0.98.22} Version 0.98.22
\b Update rdoff2 - attempt to remove v1.
\S{cl-0.98.21} Version 0.98.21
\b Optimization fixes.
\S{cl-0.98.20} Version 0.98.20
\b Optimization fixes.
\S{cl-0.98.19} Version 0.98.19
\b H. J. Lu's patch back out.
\S{cl-0.98.18} Version 0.98.18
\b Added ".rdata" to "-f win32".
\S{cl-0.98.17} Version 0.98.17
\b H. J. Lu's "bogus elf" patch. (Red Hat problem?)
\S{cl-0.98.16} Version 0.98.16
\b Fix whitespace before "[section ..." bug.
\S{cl-0.98.15} Version 0.98.15
\b Rdoff changes (?).
\b Fix fixes to memory leaks.
\S{cl-0.98.14} Version 0.98.14
\b Fix memory leaks.
\S{cl-0.98.13} Version 0.98.13
\b There was no 0.98.13
\S{cl-0.98.12} Version 0.98.12
\b Update optimization (new function of "-O1")
\b Changes to test/bintest.asm (?).
\S{cl-0.98.11} Version 0.98.11
\b Optimization changes.
\b Ndisasm fixed.
\S{cl-0.98.10} Version 0.98.10
\b There was no 0.98.10
\S{cl-0.98.09} Version 0.98.09
\b Add multiple sections support to "-f bin".
\b Changed GLOBAL_TEMP_BASE in outelf.c from 6 to 15.
\b Add "-v" as an alias to the "-r" switch.
\b Remove "#ifdef" from Tasm compatibility options.
\b Remove redundant size-overrides on "mov ds, ex", etc.
\b Fixes to SSE2, other insns.dat (?).
\b Enable uppercase "I" and "P" switches.
\b Case insinsitive "seg" and "wrt".
\b Update install.sh (?).
\b Allocate tokens in blocks.
\b Improve "invalid effective address" messages.
\S{cl-0.98.08} Version 0.98.08
\b Add "\c{%strlen}" and "\c{%substr}" macro operators
\b Fixed broken c16.mac.
\b Unterminated string error reported.
\b Fixed bugs as per 0.98bf
\S{cl-0.98.09b with John Coffman patches released 28-Oct-2001} Version 0.98.09b with John Coffman patches released 28-Oct-2001
Changes from 0.98.07 release to 98.09b as of 28-Oct-2001
\b More closely compatible with 0.98 when -O0 is implied
or specified. Not strictly identical, since backward
branches in range of short offsets are recognized, and signed
byte values with no explicit size specification will be
assembled as a single byte.
\b More forgiving with the PUSH instruction. 0.98 requires
a size to be specified always. 0.98.09b will imply the size
from the current BITS setting (16 or 32).
\b Changed definition of the optimization flag:
-O0 strict two-pass assembly, JMP and Jcc are
handled more like 0.98, except that back-
ward JMPs are short, if possible.
-O1 strict two-pass assembly, but forward
branches are assembled with code guaranteed
to reach; may produce larger code than
-O0, but will produce successful assembly
more often if branch offset sizes are not
specified.
-O2 multi-pass optimization, minimize branch
offsets; also will minimize signed immed-
iate bytes, overriding size specification.
-O3 like -O2, but more passes taken, if needed
\S{cl-0.98.07 released 01/28/01} Version 0.98.07 released 01/28/01
\b Added Stepane Denis' SSE2 instructions to a *working*
version of the code - some earlier versions were based on
broken code - sorry 'bout that. version "0.98.07"
01/28/01
\b Cosmetic modifications to nasm.c, nasm.h,
AUTHORS, MODIFIED
\S{cl-0.98.06f released 01/18/01} Version 0.98.06f released 01/18/01
\b - Add "metalbrain"s jecxz bug fix in insns.dat
- alter nasmdoc.src to match - version "0.98.06f"
\S{cl-0.98.06e released 01/09/01} Version 0.98.06e released 01/09/01
\b Removed the "outforms.h" file - it appears to be
someone's old backup of "outform.h". version "0.98.06e"
01/09/01
\b fbk - finally added the fix for the "multiple %includes bug",
known since 7/27/99 - reported originally (?) and sent to
us by Austin Lunnen - he reports that John Fine had a fix
within the day. Here it is...
\b Nelson Rush resigns from the group. Big thanks to Nelson for
his leadership and enthusiasm in getting these changes
incorporated into Nasm!
\b fbk - [list +], [list -] directives - ineptly implemented, should
be re-written or removed, perhaps.
\b Brian Raiter / fbk - "elfso bug" fix - applied to aoutb format
as well - testing might be desirable...
08/07/00
\b James Seter - -postfix, -prefix command line switches.
\b Yuri Zaporogets - rdoff utility changes.
\S{cl-0.98p1} Version 0.98p1
\b GAS-like palign (Panos Minos)
\b FIXME: Someone, fill this in with details
\S{cl-0.98bf (bug-fixed)} Version 0.98bf (bug-fixed)
\b Fixed - elf and aoutb bug - shared libraries
- multiple "%include" bug in "-f obj"
- jcxz, jecxz bug
- unrecognized option bug in ndisasm
\S{cl-0.98.03 with John Coffman's changes released 27-Jul-2000} Version 0.98.03 with John Coffman's changes released 27-Jul-2000
\b Added signed byte optimizations for the 0x81/0x83 class
of instructions: ADC, ADD, AND, CMP, OR, SBB, SUB, XOR:
when used as 'ADD reg16,imm' or 'ADD reg32,imm.' Also
optimization of signed byte form of 'PUSH imm' and 'IMUL
reg,imm'/'IMUL reg,reg,imm.' No size specification is needed.
\b Added multi-pass JMP and Jcc offset optimization. Offsets
on forward references will preferentially use the short form,
without the need to code a specific size (short or near) for
the branch. Added instructions for 'Jcc label' to use the
form 'Jnotcc $+3/JMP label', in cases where a short offset
is out of bounds. If compiling for a 386 or higher CPU, then
the 386 form of Jcc will be used instead.
This feature is controlled by a new command-line switch: "O",
(upper case letter O). "-O0" reverts the assembler to no
extra optimization passes, "-O1" allows up to 5 extra passes,
and "-O2"(default), allows up to 10 extra optimization passes.
\b Added a new directive: 'cpu XXX', where XXX is any of:
8086, 186, 286, 386, 486, 586, pentium, 686, PPro, P2, P3 or
Katmai. All are case insensitive. All instructions will
be selected only if they apply to the selected cpu or lower.
Corrected a couple of bugs in cpu-dependence in 'insns.dat'.
\b Added to 'standard.mac', the "use16" and "use32" forms of
the "bits 16/32" directive. This is nothing new, just conforms
to a lot of other assemblers. (minor)
\b Changed label allocation from 320/32 (10000 labels @ 200K+)
to 32/37 (1000 labels); makes running under DOS much easier.
Since additional label space is allocated dynamically, this
should have no effect on large programs with lots of labels.
The 37 is a prime, believed to be better for hashing. (minor)
\S{cl-0.98.03} Version 0.98.03
"Integrated patchfile 0.98-0.98.01. I call this version 0.98.03 for
historical reasons: 0.98.02 was trashed." --John Coffman
<johninsd@san.rr.com>, 27-Jul-2000
\b Kendall Bennett's SciTech MGL changes
\b Note that you must define "TASM_COMPAT" at compile-time
to get the Tasm Ideal Mode compatibility.
\b All changes can be compiled in and out using the TASM_COMPAT macros,
and when compiled without TASM_COMPAT defined we get the exact same
binary as the unmodified 0.98 sources.
\b standard.mac, macros.c: Added macros to ignore TASM directives before
first include
\b nasm.h: Added extern declaration for tasm_compatible_mode
\b nasm.c: Added global variable tasm_compatible_mode
\b Added command line switch for TASM compatible mode (-t)
\b Changed version command line to reflect when compiled with TASM additions
\b Added response file processing to allow all arguments on a single
line (response file is @resp rather than -@resp for NASM format).
\b labels.c: Changes islocal() macro to support TASM style @@local labels.
\b Added islocalchar() macro to support TASM style @@local labels.
\b parser.c: Added support for TASM style memory references (ie: mov
[DWORD eax],10 rather than the NASM style mov DWORD [eax],10).
\b preproc.c: Added new directives, \c{%arg}, \c{%local}, \c{%stacksize} to directives
table
\b Added support for TASM style directives without a leading % symbol.
\b Integrated a block of changes from Andrew Zabolotny <bit@eltech.ru>:
\b A new keyword \c{%xdefine} and its case-insensitive counterpart \c{%ixdefine}.
They work almost the same way as \c{%define} and \c{%idefine} but expand
the definition immediately, not on the invocation. Something like a cross
between \c{%define} and \c{%assign}. The "x" suffix stands for "eXpand", so
"xdefine" can be deciphered as "expand-and-define". Thus you can do
things like this:
\c %assign ofs 0
\c
\c %macro arg 1
\c %xdefine %1 dword [esp+ofs]
\c %assign ofs ofs+4
\c %endmacro
\b Changed the place where the expansion of %$name macros are expanded.
Now they are converted into ..@ctxnum.name form when detokenizing, so
there are no quirks as before when using %$name arguments to macros,
in macros etc. For example:
\c %macro abc 1
\c %define %1 hello
\c %endm
\c
\c abc %$here
\c %$here
Now last line will be expanded into "hello" as expected. This also allows
for lots of goodies, a good example are extended "proc" macros included
in this archive.
\b Added a check for "cstk" in smacro_defined() before calling get_ctx() -
this allows for things like:
\c %ifdef %$abc
\c %endif
to work without warnings even in no context.
\b Added a check for "cstk" in %if*ctx and %elif*ctx directives -
this allows to use \c{%ifctx} without excessive warnings. If there is
no active context, \c{%ifctx} goes through "false" branch.
\b Removed "user error: " prefix with \c{%error} directive: it just clobbers the
output and has absolutely no functionality. Besides, this allows to write
macros that does not differ from built-in functions in any way.
\b Added expansion of string that is output by \c{%error} directive. Now you
can do things like:
\c %define hello(x) Hello, x!
\c
\c %define %$name andy
\c %error "hello(%$name)"
Same happened with \c{%include} directive.
\b Now all directives that expect an identifier will try to expand and
concatenate everything without whitespaces in between before usage.
For example, with "unfixed" nasm the commands
\c %define %$abc hello
\c %define __%$abc goodbye
\c __%$abc
would produce "incorrect" output: last line will expand to
\c hello goodbyehello
Not quite what you expected, eh? :-) The answer is that preprocessor
treats the \c{%define} construct as if it would be
\c %define __ %$abc goodbye
(note the white space between __ and %$abc). After my "fix" it
will "correctly" expand into
\c goodbye
as expected. Note that I use quotes around words "correct", "incorrect"
etc because this is rather a feature not a bug; however current behaviour
is more logical (and allows more advanced macro usage :-).
Same change was applied to:
\c{%push},\c{%macro},\c{%imacro},\c{%define},\c{%idefine},\c{%xdefine},\c{%ixdefine},
\c{%assign},\c{%iassign},\c{%undef}
\b A new directive [WARNING {+|-}warning-id] have been added. It works only
if the assembly phase is enabled (i.e. it doesn't work with nasm -e).
\b A new warning type: macro-selfref. By default this warning is disabled;
when enabled NASM warns when a macro self-references itself; for example
the following source:
\c [WARNING macro-selfref]
\c
\c %macro push 1-*
\c %rep %0
\c push %1
\c %rotate 1
\c %endrep
\c %endmacro
\c
\c push eax,ebx,ecx
will produce a warning, but if we remove the first line we won't see it
anymore (which is The Right Thing To Do {tm} IMHO since C preprocessor
eats such constructs without warnings at all).
\b Added a "error" routine to preprocessor which always will set ERR_PASS1
bit in severity_code. This removes annoying repeated errors on first
and second passes from preprocessor.
\b Added the %+ operator in single-line macros for concatenating two
identifiers. Usage example:
\c %define _myfunc _otherfunc
\c %define cextern(x) _ %+ x
\c cextern (myfunc)
After first expansion, third line will become "_myfunc". After this
expansion is performed again so it becomes "_otherunc".
\b Now if preprocessor is in a non-emitting state, no warning or error
will be emitted. Example:
\c %if 1
\c mov eax,ebx
\c %else
\c put anything you want between these two brackets,
\c even macro-parameter references %1 or local
\c labels %$zz or macro-local labels %%zz - no
\c warning will be emitted.
\c %endif
\b Context-local variables on expansion as a last resort are looked up
in outer contexts. For example, the following piece:
\c %push outer
\c %define %$a [esp]
\c
\c %push inner
\c %$a
\c %pop
\c %pop
will expand correctly the fourth line to [esp]; if we'll define another
%$a inside the "inner" context, it will take precedence over outer
definition. However, this modification has been applied only to
expand_smacro and not to smacro_define: as a consequence expansion
looks in outer contexts, but \c{%ifdef} won't look in outer contexts.
This behaviour is needed because we don't want nested contexts to
act on already defined local macros. Example:
\c %define %$arg1 [esp+4]
\c test eax,eax
\c if nz
\c mov eax,%$arg1
\c endif
In this example the "if" mmacro enters into the "if" context, so %$arg1
is not valid anymore inside "if". Of course it could be worked around
by using explicitely %$$arg1 but this is ugly IMHO.
\b Fixed memory leak in \c{%undef}. The origline wasn't freed before
exiting on success.
\b Fixed trap in preprocessor when line expanded to empty set of tokens.
This happens, for example, in the following case:
\c #define SOMETHING
\c SOMETHING
\S{cl-0.98} Version 0.98
All changes since NASM 0.98p3 have been produced by H. Peter Anvin <hpa@zytor.com>.
\b The documentation comment delimiter is \# not #.
\b Allow EQU definitions to refer to external labels; reported by
Pedro Gimeno.
\b Re-enable support for RDOFF v1; reported by Pedro Gimeno.
\b Updated License file per OK from Simon and Julian.
\S{cl-0.98p9} Version 0.98p9
\b Update documentation (although the instruction set reference will
have to wait; I don't want to hold up the 0.98 release for it.)
\b Verified that the NASM implementation of the PEXTRW and PMOVMSKB
instructions is correct. The encoding differs from what the Intel
manuals document, but the Pentium III behaviour matches NASM, not
the Intel manuals.
\b Fix handling of implicit sizes in PSHUFW and PINSRW, reported by
Stefan Hoffmeister.
\b Resurrect the -s option, which was removed when changing the
diagnostic output to stdout.
\S{cl-0.98p8} Version 0.98p8
\b Fix for "DB" when NASM is running on a bigendian machine.
\b Invoke insns.pl once for each output script, making Makefile.in
legal for "make -j".
\b Improve the Unix configure-based makefiles to make package
creation easier.
\b Included an RPM .spec file for building RPM (RedHat Package Manager)
packages on Linux or Unix systems.
\b Fix Makefile dependency problems.
\b Change src/rdsrc.pl to include sectioning information in info
output; required for install-info to work.
\b Updated the RDOFF distribution to version 2 from Jules; minor
massaging to make it compile in my environment.
\b Split doc files that can be built by anyone with a Perl interpreter off
into a separate archive.
\b "Dress rehearsal" release!
\S{cl-0.98p7} Version 0.98p7
\b Fixed opcodes with a third byte-sized immediate argument to not
complain if given "byte" on the immediate.
\b Allow \c{%undef} to remove single-line macros with arguments. This
matches the behaviour of #undef in the C preprocessor.
\b Allow -d, -u, -i and -p to be specified as -D, -U, -I and -P for
compatibility with most C compilers and preprocessors. This allows
Makefile options to be shared between cc and nasm, for example.
\b Minor cleanups.
\b Went through the list of Katmai instructions and hopefully fixed the
(rather few) mistakes in it.
\b (Hopefully) fixed a number of disassembler bugs related to ambiguous
instructions (disambiguated by -p) and SSE instructions with REP.
\b Fix for bug reported by Mark Junger: "call dword 0x12345678" should
work and may add an OSP (affected CALL, JMP, Jcc).
\b Fix for environments when "stderr" isn't a compile-time constant.
\S{cl-0.98p6} Version 0.98p6
\b Took officially over coordination of the 0.98 release; so drop
the p3.x notation. Skipped p4 and p5 to avoid confusion with John
Fine's J4 and J5 releases.
\b Update the documentation; however, it still doesn't include
documentation for the various new instructions. I somehow wonder if
it makes sense to have an instruction set reference in the assembler
manual when Intel et al have PDF versions of their manuals online.
\b Recognize "idt" or "centaur" for the -p option to ndisasm.
\b Changed error messages back to stderr where they belong, but add an
-E option to redirect them elsewhere (the DOS shell cannot redirect
stderr.)
\b -M option to generate Makefile dependencies (based on code from Alex
Verstak.)
\b \c{%undef} preprocessor directive, and -u option, that undefines a
single-line macro.
\b OS/2 Makefile (Mkfiles/Makefile.os2) for Borland under OS/2; from
Chuck Crayne.
\b Various minor bugfixes (reported by):
- Dangling \c{%s} in preproc.c (Martin Junker)
\b THERE ARE KNOWN BUGS IN SSE AND THE OTHER KATMAI INSTRUCTIONS. I am
on a trip and didn't bring the Katmai instruction reference, so I
can't work on them right now.
\b Updated the License file per agreement with Simon and Jules to
include a GPL distribution clause.
\S{cl-0.98p3.7} Version 0.98p3.7
\b (Hopefully) fixed the canned Makefiles to include the outrdf2 and
zoutieee modules.
\b Renamed changes.asm to changed.asm.
\S{cl-0.98p3.6} Version 0.98p3.6
\b Fixed a bunch of instructions that were added in 0.98p3.5 which had
memory operands, and the address-size prefix was missing from the
instruction pattern.
\S{cl-0.98p3.5} Version 0.98p3.5
\b Merged in changes from John S. Fine's 0.98-J5 release. John's based
0.98-J5 on my 0.98p3.3 release; this merges the changes.
\b Expanded the instructions flag field to a long so we can fit more
flags; mark SSE (KNI) and AMD or Katmai-specific instructions as
such.
\b Fix the "PRIV" flag on a bunch of instructions, and create new
"PROT" flag for protected-mode-only instructions (orthogonal to if
the instruction is privileged!) and new "SMM" flag for SMM-only
instructions.
\b Added AMD-only SYSCALL and SYSRET instructions.
\b Make SSE actually work, and add new Katmai MMX instructions.
\b Added a -p (preferred vendor) option to ndisasm so that it can
distinguish e.g. Cyrix opcodes also used in SSE. For example:
\c ndisasm -p cyrix aliased.bin
\c 00000000 670F514310 paddsiw mm0,[ebx+0x10]
\c 00000005 670F514320 paddsiw mm0,[ebx+0x20]
\c ndisasm -p intel aliased.bin
\c 00000000 670F514310 sqrtps xmm0,[ebx+0x10]
\c 00000005 670F514320 sqrtps xmm0,[ebx+0x20]
\b Added a bunch of Cyrix-specific instructions.
\S{cl-0.98p3.4} Version 0.98p3.4
\b Made at least an attempt to modify all the additional Makefiles (in
the Mkfiles directory). I can't test it, but this was the best I
could do.
\b DOS DJGPP+"Opus Make" Makefile from John S. Fine.
\b changes.asm changes from John S. Fine.
\S{cl-0.98p3.3} Version 0.98p3.3
\b Patch from Conan Brink to allow nesting of \c{%rep} directives.
\b If we're going to allow INT01 as an alias for INT1/ICEBP (one of
Jules 0.98p3 changes), then we should allow INT03 as an alias for INT3
as well.
\b Updated changes.asm to include the latest changes.
\b Tried to clean up the <CR>s that had snuck in from a DOS/Windows
environment into my Unix environment, and try to make sure than
DOS/Windows users get them back.
\b We would silently generate broken tools if insns.dat wasn't sorted
properly. Change insns.pl so that the order doesn't matter.
\b Fix bug in insns.pl (introduced by me) which would cause conditional
instructions to have an extra "cc" in disassembly, e.g. "jnz"
disassembled as "jccnz".
\S{cl-0.98p3.2} Version 0.98p3.2
\b Merged in John S. Fine's changes from his 0.98-J4 prerelease; see
http://www.csoft.net/cz/johnfine/
\b Changed previous "spotless" Makefile target (appropriate for distribution)
to "distclean", and added "cleaner" target which is same as "clean"
except deletes files generated by Perl scripts; "spotless" is union.
\b Removed BASIC programs from distribution. Get a Perl interpreter
instead (see below.)
\b Calling this "pre-release 3.2" rather than "p3-hpa2" because of
John's contributions.
\b Actually link in the IEEE output format (zoutieee.c); fix a bunch of
compiler warnings in that file. Note I don't know what IEEE output
is supposed to look like, so these changes were made "blind".
\S{cl-0.98p3-hpa} Version 0.98p3-hpa
\b Merged nasm098p3.zip with nasm-0.97.tar.gz to create a fully
buildable version for Unix systems (Makefile.in updates, etc.)
\b Changed insns.pl to create the instruction tables in nasm.h and
names.c, so that a new instruction can be added by adding it *only*
to insns.dat.
\b Added the following new instructions: SYSENTER, SYSEXIT, FXSAVE,
FXRSTOR, UD1, UD2 (the latter two are two opcodes that Intel
guarantee will never be used; one of them is documented as UD2 in
Intel documentation, the other one just as "Undefined Opcode" --
calling it UD1 seemed to make sense.)
\b MAX_SYMBOL was defined to be 9, but LOADALL286 and LOADALL386 are 10
characters long. Now MAX_SYMBOL is derived from insns.dat.
\b A note on the BASIC programs included: forget them. insns.bas is
already out of date. Get yourself a Perl interpreter for your
platform of choice at
\W{http://www.cpan.org/ports/index.html}{http://www.cpan.org/ports/index.html}.
\S{cl-0.98p3} Version 0.98 pre-release 3
\b added response file support, improved command line handling, new layout
help screen
\b fixed limit checking bug, 'OUT byte nn, reg' bug, and a couple of rdoff
related bugs, updated Wishlist; 0.98 Prerelease 3.
\S{cl-0.98p2} Version 0.98 pre-release 2
\b fixed bug in outcoff.c to do with truncating section names longer
than 8 characters, referencing beyond end of string; 0.98 pre-release 2
\S{cl-0.98p1} Version 0.98 pre-release 1
\b Fixed a bug whereby STRUC didn't work at all in RDF.
\b Fixed a problem with group specification in PUBDEFs in OBJ.
\b Improved ease of adding new output formats. Contribution due to
Fox Cutter.
\b Fixed a bug in relocations in the `bin' format: was showing up when
a relocatable reference crossed an 8192-byte boundary in any output
section.
\b Fixed a bug in local labels: local-label lookups were inconsistent
between passes one and two if an EQU occurred between the definition
of a global label and the subsequent use of a local label local to
that global.
\b Fixed a seg-fault in the preprocessor (again) which happened when
you use a blank line as the first line of a multi-line macro
definition and then defined a label on the same line as a call to
that macro.
\b Fixed a stale-pointer bug in the handling of the NASM environment
variable. Thanks to Thomas McWilliams.
\b ELF had a hard limit on the number of sections which caused
segfaults when transgressed. Fixed.
\b Added ability for ndisasm to read from stdin by using `-' as the
filename.
\b ndisasm wasn't outputting the TO keyword. Fixed.
\b Fixed error cascade on bogus expression in \c{%if} - an error in
evaluation was causing the entire \c{%if} to be discarded, thus creating
trouble later when the \c{%else} or \c{%endif} was encountered.
\b Forward reference tracking was instruction-granular not operand-
granular, which was causing 286-specific code to be generated
needlessly on code of the form `shr word [forwardref],1'. Thanks to
Jim Hague for sending a patch.
\b All messages now appear on stdout, as sending them to stderr serves
no useful purpose other than to make redirection difficult.
\b Fixed the problem with EQUs pointing to an external symbol - this
now generates an error message.
\b Allowed multiple size prefixes to an operand, of which only the first
is taken into account.
\b Incorporated John Fine's changes, including fixes of a large number
of preprocessor bugs, some small problems in OBJ, and a reworking of
label handling to define labels before their line is assembled, rather
than after.
\b Reformatted a lot of the source code to be more readable. Included
'coding.txt' as a guideline for how to format code for contributors.
\b Stopped nested \c{%reps} causing a panic - they now cause a slightly more
friendly error message instead.
\b Fixed floating point constant problems (patch by Pedro Gimeno)
\b Fixed the return value of insn_size() not being checked for -1, indicating
an error.
\b Incorporated 3Dnow! instructions.
\b Fixed the 'mov eax, eax + ebx' bug.
\b Fixed the GLOBAL EQU bug in ELF. Released developers release 3.
\b Incorporated John Fine's command line parsing changes
\b Incorporated David Lindauer's OMF debug support
\b Made changes for LCC 4.0 support (\c{__NASM_CDecl__}, removed register size
specification warning when sizes agree).
\H{cl-0.9x} NASM 0.9 Series
Revisions before 0.98.
\S{cl-0.97} Version 0.97 released December 1997
\b This was entirely a bug-fix release to 0.96, which seems to have got
cursed. Silly me.
\b Fixed stupid mistake in OBJ which caused `MOV EAX,<constant>' to
fail. Caused by an error in the `MOV EAX,<segment>' support.
\b ndisasm hung at EOF when compiled with lcc on Linux because lcc on
Linux somehow breaks feof(). ndisasm now does not rely on feof().
\b A heading in the documentation was missing due to a markup error in
the indexing. Fixed.
\b Fixed failure to update all pointers on realloc() within extended-
operand code in parser.c. Was causing wrong behaviour and seg faults
on lines such as `dd 0.0,0.0,0.0,0.0,...'
\b Fixed a subtle preprocessor bug whereby invoking one multi-line
macro on the first line of the expansion of another, when the second
had been invoked with a label defined before it, didn't expand the
inner macro.
\b Added internal.doc back in to the distribution archives - it was
missing in 0.96 *blush*
\b Fixed bug causing 0.96 to be unable to assemble its own test files,
specifically objtest.asm. *blush again*
\b Fixed seg-faults and bogus error messages caused by mismatching
\c{%rep} and \c{%endrep} within multi-line macro definitions.
\b Fixed a problem with buffer overrun in OBJ, which was causing
corruption at ends of long PUBDEF records.
\b Separated DOS archives into main-program and documentation to reduce
download size.
\S{cl-0.96} Version 0.96 released November 1997
\b Fixed a bug whereby, if `nasm sourcefile' would cause a filename
collision warning and put output into `nasm.out', then `nasm
sourcefile -o outputfile' still gave the warning even though the
`-o' was honoured.
Fixed name pollution under Digital UNIX: one of its header files
defined R_SP, which broke the enum in nasm.h.
\b Fixed minor instruction table problems: FUCOM and FUCOMP didn't have
two-operand forms; NDISASM didn't recognise the longer register
forms of PUSH and POP (eg FF F3 for PUSH BX); TEST mem,imm32 was
flagged as undocumented; the 32-bit forms of CMOV had 16-bit operand
size prefixes; `AAD imm' and `AAM imm' are no longer flagged as
undocumented because the Intel Architecture reference documents
them.
\b Fixed a problem with the local-label mechanism, whereby strange
types of symbol (EQUs, auto-defined OBJ segment base symbols)
interfered with the `previous global label' value and screwed up
local labels.
\b Fixed a bug whereby the stub preprocessor didn't communicate with
the listing file generator, so that the -a and -l options in
conjunction would produce a useless listing file.
\b Merged `os2' object file format back into `obj', after discovering
that `obj' _also_ shouldn't have a link pass separator in a module
containing a non-trivial MODEND. Flat segments are now declared
using the FLAT attribute. `os2' is no longer a valid object format
name: use `obj'.
\b Removed the fixed-size temporary storage in the evaluator. Very very
long expressions (like `mov ax,1+1+1+1+...' for two hundred 1s or
so) should now no longer crash NASM.
\b Fixed a bug involving segfaults on disassembly of MMX instructions,
by changing the meaning of one of the operand-type flags in nasm.h.
This may cause other apparently unrelated MMX problems; it needs to
be tested thoroughly.
\b Fixed some buffer overrun problems with large OBJ output files.
Thanks to DJ Delorie for the bug report and fix.
\b Made preprocess-only mode actually listen to the \c{%line} markers as it
prints them, so that it can report errors more sanely.
\b Re-designed the evaluator to keep more sensible track of expressions
involving forward references: can now cope with previously-nightmare
situations such as:
\c mov ax,foo | bar
\c foo equ 1
\c bar equ 2
\b Added the ALIGN and ALIGNB standard macros.
\b Added PIC support in ELF: use of WRT to obtain the four extra
relocation types needed.
\b Added the ability for output file formats to define their own
extensions to the GLOBAL, COMMON and EXTERN directives.
\b Implemented common-variable alignment, and global-symbol type and
size declarations, in ELF.
\b Implemented NEAR and FAR keywords for common variables, plus
far-common element size specification, in OBJ.
\b Added a feature whereby EXTERNs and COMMONs in OBJ can be given a
default WRT specification (either a segment or a group).
\b Transformed the Unix NASM archive into an auto-configuring package.
\b Added a sanity-check for people applying SEG to things which are
already segment bases: this previously went unnoticed by the SEG
processing and caused OBJ-driver panics later.
\b Added the ability, in OBJ format, to deal with `MOV EAX,<segment>'
type references: OBJ doesn't directly support dword-size segment
base fixups, but as long as the low two bytes of the constant term
are zero, a word-size fixup can be generated instead and it will
work.
\b Added the ability to specify sections' alignment requirements in
Win32 object files and pure binary files.
\b Added preprocess-time expression evaluation: the \c{%assign} (and
\c{%iassign}) directive and the bare \c{%if} (and \c{%elif}) conditional. Added
relational operators to the evaluator, for use only in \c{%if}
constructs: the standard relationals = < > <= >= <> (and C-like
synonyms == and !=) plus low-precedence logical operators &&, ^^ and
||.
\b Added a preprocessor repeat construct: \c{%rep} / \c{%exitrep} / \c{%endrep}.
\b Added the __FILE__ and __LINE__ standard macros.
\b Added a sanity check for number constants being greater than
0xFFFFFFFF. The warning can be disabled.
\b Added the %0 token whereby a variadic multi-line macro can tell how
many parameters it's been given in a specific invocation.
\b Added \c{%rotate}, allowing multi-line macro parameters to be cycled.
\b Added the `*' option for the maximum parameter count on multi-line
macros, allowing them to take arbitrarily many parameters.
\b Added the ability for the user-level forms of EXTERN, GLOBAL and
COMMON to take more than one argument.
\b Added the IMPORT and EXPORT directives in OBJ format, to deal with
Windows DLLs.
\b Added some more preprocessor \c{%if} constructs: \c{%ifidn} / \c{%ifidni} (exact
textual identity), and \c{%ifid} / \c{%ifnum} / \c{%ifstr} (token type testing).
\b Added the ability to distinguish SHL AX,1 (the 8086 version) from
SHL AX,BYTE 1 (the 286-and-upwards version whose constant happens to
be 1).
\b Added NetBSD/FreeBSD/OpenBSD's variant of a.out format, complete
with PIC shared library features.
\b Changed NASM's idiosyncratic handling of FCLEX, FDISI, FENI, FINIT,
FSAVE, FSTCW, FSTENV, and FSTSW to bring it into line with the
otherwise accepted standard. The previous behaviour, though it was a
deliberate feature, was a deliberate feature based on a
misunderstanding. Apologies for the inconvenience.
\b Improved the flexibility of ABSOLUTE: you can now give it an
expression rather than being restricted to a constant, and it can
take relocatable arguments as well.
\b Added the ability for a variable to be declared as EXTERN multiple
times, and the subsequent definitions are just ignored.
\b We now allow instruction prefixes (CS, DS, LOCK, REPZ etc) to be
alone on a line (without a following instruction).
\b Improved sanity checks on whether the arguments to EXTERN, GLOBAL
and COMMON are valid identifiers.
\b Added misc/exebin.mac to allow direct generation of .EXE files by
hacking up an EXE header using DB and DW; also added test/binexe.asm
to demonstrate the use of this. Thanks to Yann Guidon for
contributing the EXE header code.
\b ndisasm forgot to check whether the input file had been successfully
opened. Now it does. Doh!
\b Added the Cyrix extensions to the MMX instruction set.
\b Added a hinting mechanism to allow [EAX+EBX] and [EBX+EAX] to be
assembled differently. This is important since [ESI+EBP] and
[EBP+ESI] have different default base segment registers.
\b Added support for the PharLap OMF extension for 4096-byte segment
alignment.
\S{cl-0.95 released July 1997} Version 0.95 released July 1997
\b Fixed yet another ELF bug. This one manifested if the user relied on
the default segment, and attempted to define global symbols without
first explicitly declaring the target segment.
\b Added makefiles (for NASM and the RDF tools) to build Win32 console
apps under Symantec C++. Donated by Mark Junker.
\b Added `macros.bas' and `insns.bas', QBasic versions of the Perl
scripts that convert `standard.mac' to `macros.c' and convert
`insns.dat' to `insnsa.c' and `insnsd.c'. Also thanks to Mark
Junker.
\b Changed the diassembled forms of the conditional instructions so
that JB is now emitted as JC, and other similar changes. Suggested
list by Ulrich Doewich.
\b Added `@' to the list of valid characters to begin an identifier
with.
\b Documentary changes, notably the addition of the `Common Problems'
section in nasm.doc.
\b Fixed a bug relating to 32-bit PC-relative fixups in OBJ.
\b Fixed a bug in perm_copy() in labels.c which was causing exceptions
in cleanup_labels() on some systems.
\b Positivity sanity check in TIMES argument changed from a warning to
an error following a further complaint.
\b Changed the acceptable limits on byte and word operands to allow
things like `~10111001b' to work.
\b Fixed a major problem in the preprocessor which caused seg-faults if
macro definitions contained blank lines or comment-only lines.
\b Fixed inadequate error checking on the commas separating the
arguments to `db', `dw' etc.
\b Fixed a crippling bug in the handling of macros with operand counts
defined with a `+' modifier.
\b Fixed a bug whereby object file formats which stored the input file
name in the output file (such as OBJ and COFF) weren't doing so
correctly when the output file name was specified on the command
line.
\b Removed [INC] and [INCLUDE] support for good, since they were
obsolete anyway.
\b Fixed a bug in OBJ which caused all fixups to be output in 16-bit
(old-format) FIXUPP records, rather than putting the 32-bit ones in
FIXUPP32 (new-format) records.
\b Added, tentatively, OS/2 object file support (as a minor variant on
OBJ).
\b Updates to Fox Cutter's Borland C makefile, Makefile.bc2.
\b Removed a spurious second fclose() on the output file.
\b Added the `-s' command line option to redirect all messages which
would go to stderr (errors, help text) to stdout instead.
\b Added the `-w' command line option to selectively suppress some
classes of assembly warning messages.
\b Added the `-p' pre-include and `-d' pre-define command-line options.
\b Added an include file search path: the `-i' command line option.
\b Fixed a silly little preprocessor bug whereby starting a line with a
`%!' environment-variable reference caused an `unknown directive'
error.
\b Added the long-awaited listing file support: the `-l' command line
option.
\b Fixed a problem with OBJ format whereby, in the absence of any
explicit segment definition, non-global symbols declared in the
implicit default segment generated spurious EXTDEF records in the
output.
\b Added the NASM environment variable.
\b From this version forward, Win32 console-mode binaries will be
included in the DOS distribution in addition to the 16-bit binaries.
Added Makefile.vc for this purpose.
\b Added `return 0;' to test/objlink.c to prevent compiler warnings.
\b Added the __NASM_MAJOR__ and __NASM_MINOR__ standard defines.
\b Added an alternative memory-reference syntax in which prefixing an
operand with `&' is equivalent to enclosing it in square brackets,
at the request of Fox Cutter.
\b Errors in pass two now cause the program to return a non-zero error
code, which they didn't before.
\b Fixed the single-line macro cycle detection, which didn't work at
all on macros with no parameters (caused an infinite loop). Also
changed the behaviour of single-line macro cycle detection to work
like cpp, so that macros like `extrn' as given in the documentation
can be implemented.
\b Fixed the implementation of WRT, which was too restrictive in that
you couldn't do `mov ax,[di+abc wrt dgroup]' because (di+abc) wasn't
a relocatable reference.
\S{cl-0.94 released April 1997} Version 0.94 released April 1997
\b Major item: added the macro processor.
\b Added undocumented instructions SMI, IBTS, XBTS and LOADALL286. Also
reorganised CMPXCHG instruction into early-486 and Pentium forms.
Thanks to Thobias Jones for the information.
\b Fixed two more stupid bugs in ELF, which were causing `ld' to
continue to seg-fault in a lot of non-trivial cases.
\b Fixed a seg-fault in the label manager.
\b Stopped FBLD and FBSTP from _requiring_ the TWORD keyword, which is
the only option for BCD loads/stores in any case.
\b Ensured FLDCW, FSTCW and FSTSW can cope with the WORD keyword, if
anyone bothers to provide it. Previously they complained unless no
keyword at all was present.
\b Some forms of FDIV/FDIVR and FSUB/FSUBR were still inverted: a
vestige of a bug that I thought had been fixed in 0.92. This was
fixed, hopefully for good this time...
\b Another minor phase error (insofar as a phase error can _ever_ be
minor) fixed, this one occurring in code of the form
\c rol ax,forward_reference
\c forward_reference equ 1
\b The number supplied to TIMES is now sanity-checked for positivity,
and also may be greater than 64K (which previously didn't work on
16-bit systems).
\b Added Watcom C makefiles, and misc/pmw.bat, donated by Dominik Behr.
\b Added the INCBIN pseudo-opcode.
\b Due to the advent of the preprocessor, the [INCLUDE] and [INC]
directives have become obsolete. They are still supported in this
version, with a warning, but won't be in the next.
\b Fixed a bug in OBJ format, which caused incorrect object records to
be output when absolute labels were made global.
\b Updates to RDOFF subdirectory, and changes to outrdf.c.
\S{cl-0.93 released January 1997} Version 0.93 released January 1997
This release went out in a great hurry after semi-crippling bugs
were found in 0.92.
\b Really \e{did} fix the stack overflows this time. *blush*
\b Had problems with EA instruction sizes changing between passes, when
an offset contained a forward reference and so 4 bytes were
allocated for the offset in pass one; by pass two the symbol had
been defined and happened to be a small absolute value, so only 1
byte got allocated, causing instruction size mismatch between passes
and hence incorrect address calculations. Fixed.
\b Stupid bug in the revised ELF section generation fixed (associated
string-table section for .symtab was hard-coded as 7, even when this
didn't fit with the real section table). Was causing `ld' to
seg-fault under Linux.
\b Included a new Borland C makefile, Makefile.bc2, donated by Fox
Cutter <lmb@comtch.iea.com>.
\S{cl-0.92 released January 1997} Version 0.92 released January 1997
\b The FDIVP/FDIVRP and FSUBP/FSUBRP pairs had been inverted: this was
fixed. This also affected the LCC driver.
\b Fixed a bug regarding 32-bit effective addresses of the form
\c{[other_register+ESP]}.
\b Documentary changes, notably documentation of the fact that Borland
Win32 compilers use `obj' rather than `win32' object format.
\b Fixed the COMENT record in OBJ files, which was formatted
incorrectly.
\b Fixed a bug causing segfaults in large RDF files.
\b OBJ format now strips initial periods from segment and group
definitions, in order to avoid complications with the local label
syntax.
\b Fixed a bug in disassembling far calls and jumps in NDISASM.
\b Added support for user-defined sections in COFF and ELF files.
\b Compiled the DOS binaries with a sensible amount of stack, to
prevent stack overflows on any arithmetic expression containing
parentheses.
\b Fixed a bug in handling of files that do not terminate in a newline.
\S{cl-0.91 released November 1996} Version 0.91 released November 1996
\b Loads of bug fixes.
\b Support for RDF added.
\b Support for DBG debugging format added.
\b Support for 32-bit extensions to Microsoft OBJ format added.
\b Revised for Borland C: some variable names changed, makefile added.
\b LCC support revised to actually work.
\b JMP/CALL NEAR/FAR notation added.
\b `a16', `o16', `a32' and `o32' prefixes added.
\b Range checking on short jumps implemented.
\b MMX instruction support added.
\b Negative floating point constant support added.
\b Memory handling improved to bypass 64K barrier under DOS.
\b \c{$} prefix to force treatment of reserved words as identifiers added.
\b Default-size mechanism for object formats added.
\b Compile-time configurability added.
\b \c{#}, \c{@}, \c{~} and c\{?} are now valid characters in labels.
\b \c{-e} and \c{-k} options in NDISASM added.
\S{cl-0.90 released October 1996} Version 0.90 released October 1996
First release version. First support for object file output. Other
changes from previous version (0.3x) too numerous to document.
|