NASM 0.96
[platform/upstream/nasm.git] / Changes
1 Change log for NASM
2 ===================
3
4 0.90 released October 1996
5 --------------------------
6
7 First release version. First support for object file output. Other
8 changes from previous version (0.3x) too numerous to document.
9
10 0.91 released November 1996
11 ---------------------------
12
13 Loads of bug fixes.
14 Support for RDF added.
15 Support for DBG debugging format added.
16 Support for 32-bit extensions to Microsoft OBJ format added.
17 Revised for Borland C: some variable names changed, makefile added.
18 LCC support revised to actually work.
19 JMP/CALL NEAR/FAR notation added.
20 `a16', `o16', `a32' and `o32' prefixes added.
21 Range checking on short jumps implemented.
22 MMX instruction support added.
23 Negative floating point constant support added.
24 Memory handling improved to bypass 64K barrier under DOS.
25 $ prefix to force treatment of reserved words as identifiers added.
26 Default-size mechanism for object formats added.
27 Compile-time configurability added.
28 `#', `@', `~' and `?' are now valid characters in labels.
29 `-e' and `-k' options in NDISASM added.
30
31 0.92 released January 1997
32 --------------------------
33
34 The FDIVP/FDIVRP and FSUBP/FSUBRP pairs had been inverted: this was
35 fixed. This also affected the LCC driver.
36
37 Fixed a bug regarding 32-bit effective addresses of the form
38 [other_register+ESP].
39
40 Documentary changes, notably documentation of the fact that Borland
41 Win32 compilers use `obj' rather than `win32' object format.
42
43 Fixed the COMENT record in OBJ files, which was formatted
44 incorrectly.
45
46 Fixed a bug causing segfaults in large RDF files.
47
48 OBJ format now strips initial periods from segment and group
49 definitions, in order to avoid complications with the local label
50 syntax.
51
52 Fixed a bug in disassembling far calls and jumps in NDISASM.
53
54 Added support for user-defined sections in COFF and ELF files.
55
56 Compiled the DOS binaries with a sensible amount of stack, to
57 prevent stack overflows on any arithmetic expression containing
58 parentheses.
59
60 Fixed a bug in handling of files that do not terminate in a newline.
61
62 0.93 released January 1997
63 --------------------------
64
65 This release went out in a great hurry after semi-crippling bugs
66 were found in 0.92.
67
68 Really _did_ fix the stack overflows this time. *blush*
69
70 Had problems with EA instruction sizes changing between passes, when
71 an offset contained a forward reference and so 4 bytes were
72 allocated for the offset in pass one; by pass two the symbol had
73 been defined and happened to be a small absolute value, so only 1
74 byte got allocated, causing instruction size mismatch between passes
75 and hence incorrect address calculations. Fixed.
76
77 Stupid bug in the revised ELF section generation fixed (associated
78 string-table section for .symtab was hard-coded as 7, even when this
79 didn't fit with the real section table). Was causing `ld' to
80 seg-fault under Linux.
81
82 Included a new Borland C makefile, Makefile.bc2, donated by Fox
83 Cutter <lmb@comtch.iea.com>.
84
85 0.94 released April 1997
86 ------------------------
87
88 Major item: added the macro processor.
89
90 Added undocumented instructions SMI, IBTS, XBTS and LOADALL286. Also
91 reorganised CMPXCHG instruction into early-486 and Pentium forms.
92 Thanks to Thobias Jones for the information.
93
94 Fixed two more stupid bugs in ELF, which were causing `ld' to
95 continue to seg-fault in a lot of non-trivial cases.
96
97 Fixed a seg-fault in the label manager.
98
99 Stopped FBLD and FBSTP from _requiring_ the TWORD keyword, which is
100 the only option for BCD loads/stores in any case.
101
102 Ensured FLDCW, FSTCW and FSTSW can cope with the WORD keyword, if
103 anyone bothers to provide it. Previously they complained unless no
104 keyword at all was present.
105
106 Some forms of FDIV/FDIVR and FSUB/FSUBR were still inverted: a
107 vestige of a bug that I thought had been fixed in 0.92. This was
108 fixed, hopefully for good this time...
109
110 Another minor phase error (insofar as a phase error can _ever_ be
111 minor) fixed, this one occurring in code of the form
112    rol ax,forward_reference
113    forward_reference equ 1
114
115 The number supplied to TIMES is now sanity-checked for positivity,
116 and also may be greater than 64K (which previously didn't work on
117 16-bit systems).
118
119 Added Watcom C makefiles, and misc/pmw.bat, donated by Dominik Behr.
120
121 Added the INCBIN pseudo-opcode.
122
123 Due to the advent of the preprocessor, the [INCLUDE] and [INC]
124 directives have become obsolete. They are still supported in this
125 version, with a warning, but won't be in the next.
126
127 Fixed a bug in OBJ format, which caused incorrect object records to
128 be output when absolute labels were made global.
129
130 Updates to RDOFF subdirectory, and changes to outrdf.c.
131
132 0.95 not released yet
133 ---------------------
134
135 Fixed yet another ELF bug. This one manifested if the user relied on
136 the default segment, and attempted to define global symbols without
137 first explicitly declaring the target segment.
138
139 Added makefiles (for NASM and the RDF tools) to build Win32 console
140 apps under Symantec C++. Donated by Mark Junker.
141
142 Added `macros.bas' and `insns.bas', QBasic versions of the Perl
143 scripts that convert `standard.mac' to `macros.c' and convert
144 `insns.dat' to `insnsa.c' and `insnsd.c'. Also thanks to Mark
145 Junker.
146
147 Changed the diassembled forms of the conditional instructions so
148 that JB is now emitted as JC, and other similar changes. Suggested
149 list by Ulrich Doewich.
150
151 Added `@' to the list of valid characters to begin an identifier
152 with.
153
154 Documentary changes, notably the addition of the `Common Problems'
155 section in nasm.doc.
156
157 Fixed a bug relating to 32-bit PC-relative fixups in OBJ.
158
159 Fixed a bug in perm_copy() in labels.c which was causing exceptions
160 in cleanup_labels() on some systems.
161
162 Positivity sanity check in TIMES argument changed from a warning to
163 an error following a further complaint.
164
165 Changed the acceptable limits on byte and word operands to allow
166 things like `~10111001b' to work.
167
168 Fixed a major problem in the preprocessor which caused seg-faults if
169 macro definitions contained blank lines or comment-only lines.
170
171 Fixed inadequate error checking on the commas separating the
172 arguments to `db', `dw' etc.
173
174 Fixed a crippling bug in the handling of macros with operand counts
175 defined with a `+' modifier.
176
177 Fixed a bug whereby object file formats which stored the input file
178 name in the output file (such as OBJ and COFF) weren't doing so
179 correctly when the output file name was specified on the command
180 line.
181
182 Removed [INC] and [INCLUDE] support for good, since they were
183 obsolete anyway.
184
185 Fixed a bug in OBJ which caused all fixups to be output in 16-bit
186 (old-format) FIXUPP records, rather than putting the 32-bit ones in
187 FIXUPP32 (new-format) records.
188
189 Added, tentatively, OS/2 object file support (as a minor variant on
190 OBJ).
191
192 Updates to Fox Cutter's Borland C makefile, Makefile.bc2.
193
194 Removed a spurious second fclose() on the output file.
195
196 Added the `-s' command line option to redirect all messages which
197 would go to stderr (errors, help text) to stdout instead.
198
199 Added the `-w' command line option to selectively suppress some
200 classes of assembly warning messages.
201
202 Added the `-p' pre-include and `-d' pre-define command-line options.
203
204 Added an include file search path: the `-i' command line option.
205
206 Fixed a silly little preprocessor bug whereby starting a line with a
207 `%!' environment-variable reference caused an `unknown directive'
208 error.
209
210 Added the long-awaited listing file support: the `-l' command line
211 option.
212
213 Fixed a problem with OBJ format whereby, in the absence of any
214 explicit segment definition, non-global symbols declared in the
215 implicit default segment generated spurious EXTDEF records in the
216 output.
217
218 Added the NASM environment variable.
219
220 From this version forward, Win32 console-mode binaries will be
221 included in the DOS distribution in addition to the 16-bit binaries.
222 Added Makefile.vc for this purpose.
223
224 Added `return 0;' to test/objlink.c to prevent compiler warnings.
225
226 Added the __NASM_MAJOR__ and __NASM_MINOR__ standard defines.
227
228 Added an alternative memory-reference syntax in which prefixing an
229 operand with `&' is equivalent to enclosing it in square brackets,
230 at the request of Fox Cutter.
231
232 Errors in pass two now cause the program to return a non-zero error
233 code, which they didn't before.
234
235 Fixed the single-line macro cycle detection, which didn't work at
236 all on macros with no parameters (caused an infinite loop). Also
237 changed the behaviour of single-line macro cycle detection to work
238 like cpp, so that macros like `extrn' as given in the documentation
239 can be implemented.
240
241 Fixed the implementation of WRT, which was too restrictive in that
242 you couldn't do `mov ax,[di+abc wrt dgroup]' because (di+abc) wasn't
243 a relocatable reference.
244
245 0.96 not released yet
246 ---------------------
247
248 Fixed a bug whereby, if `nasm sourcefile' would cause a filename
249 collision warning and put output into `nasm.out', then `nasm
250 sourcefile -o outputfile' still gave the warning even though the
251 `-o' was honoured.
252
253 Fixed name pollution under Digital UNIX: one of its header files
254 defined R_SP, which broke the enum in nasm.h.
255
256 Fixed minor instruction table problems: FUCOM and FUCOMP didn't have
257 two-operand forms; NDISASM didn't recognise the longer register
258 forms of PUSH and POP (eg FF F3 for PUSH BX); TEST mem,imm32 was
259 flagged as undocumented; the 32-bit forms of CMOV had 16-bit operand
260 size prefixes; `AAD imm' and `AAM imm' are no longer flagged as
261 undocumented because the Intel Architecture reference documents
262 them.
263
264 Fixed a problem with the local-label mechanism, whereby strange
265 types of symbol (EQUs, auto-defined OBJ segment base symbols)
266 interfered with the `previous global label' value and screwed up
267 local labels.
268
269 Fixed a bug whereby the stub preprocessor didn't communicate with
270 the listing file generator, so that the -a and -l options in
271 conjunction would produce a useless listing file.
272
273 Merged `os2' object file format back into `obj', after discovering
274 that `obj' _also_ shouldn't have a link pass separator in a module
275 containing a non-trivial MODEND. Flat segments are now declared
276 using the FLAT attribute. `os2' is no longer a valid object format
277 name: use `obj'.
278
279 Removed the fixed-size temporary storage in the evaluator. Very very
280 long expressions (like `mov ax,1+1+1+1+...' for two hundred 1s or
281 so) should now no longer crash NASM.
282
283 Fixed a bug involving segfaults on disassembly of MMX instructions,
284 by changing the meaning of one of the operand-type flags in nasm.h.
285 This may cause other apparently unrelated MMX problems; it needs to
286 be tested thoroughly.
287
288 Fixed some buffer overrun problems with large OBJ output files.
289 Thanks to DJ Delorie for the bug report and fix.
290
291 Made preprocess-only mode actually listen to the %line markers as it
292 prints them, so that it can report errors more sanely.
293
294 Re-designed the evaluator to keep more sensible track of expressions
295 involving forward references: can now cope with previously-nightmare
296 situations such as
297    mov ax,foo | bar
298    foo equ 1
299    bar equ 2
300
301 Added the ALIGN and ALIGNB standard macros.
302
303 Added PIC support in ELF: use of WRT to obtain the four extra
304 relocation types needed.
305
306 Added the ability for output file formats to define their own
307 extensions to the GLOBAL, COMMON and EXTERN directives.
308
309 Implemented common-variable alignment, and global-symbol type and
310 size declarations, in ELF.
311
312 Implemented NEAR and FAR keywords for common variables, plus
313 far-common element size specification, in OBJ.
314
315 Added a feature whereby EXTERNs and COMMONs in OBJ can be given a
316 default WRT specification (either a segment or a group).
317
318 Transformed the Unix NASM archive into an auto-configuring package.
319
320 Added a sanity-check for people applying SEG to things which are
321 already segment bases: this previously went unnoticed by the SEG
322 processing and caused OBJ-driver panics later.
323
324 Added the ability, in OBJ format, to deal with `MOV EAX,<segment>'
325 type references: OBJ doesn't directly support dword-size segment
326 base fixups, but as long as the low two bytes of the constant term
327 are zero, a word-size fixup can be generated instead and it will
328 work.
329
330 Added the ability to specify sections' alignment requirements in
331 Win32 object files and pure binary files.
332
333 Added preprocess-time expression evaluation: the %assign (and
334 %iassign) directive and the bare %if (and %elif) conditional. Added
335 relational operators to the evaluator, for use only in %if
336 constructs: the standard relationals = < > <= >= <> (and C-like
337 synonyms == and !=) plus low-precedence logical operators &&, ^^ and
338 ||.
339
340 Added a preprocessor repeat construct: %rep / %exitrep / %endrep.
341
342 Added the __FILE__ and __LINE__ standard macros.
343
344 Added a sanity check for number constants being greater than
345 0xFFFFFFFF. The warning can be disabled.
346
347 Added the %0 token whereby a variadic multi-line macro can tell how
348 many parameters it's been given in a specific invocation.
349
350 Added %rotate, allowing multi-line macro parameters to be cycled.
351
352 Added the `*' option for the maximum parameter count on multi-line
353 macros, allowing them to take arbitrarily many parameters.
354
355 Added the ability for the user-level forms of EXTERN, GLOBAL and
356 COMMON to take more than one argument.
357
358 Added the IMPORT and EXPORT directives in OBJ format, to deal with
359 Windows DLLs.
360
361 Added some more preprocessor %if constructs: %ifidn / %ifidni (exact
362 textual identity), and %ifid / %ifnum / %ifstr (token type testing).
363
364 Added the ability to distinguish SHL AX,1 (the 8086 version) from
365 SHL AX,BYTE 1 (the 286-and-upwards version whose constant happens to
366 be 1).
367
368 Added NetBSD/FreeBSD/OpenBSD's variant of a.out format, complete
369 with PIC shared library features.
370
371 Changed NASM's idiosyncratic handling of FCLEX, FDISI, FENI, FINIT,
372 FSAVE, FSTCW, FSTENV, and FSTSW to bring it into line with the
373 otherwise accepted standard. The previous behaviour, though it was a
374 deliberate feature, was a deliberate feature based on a
375 misunderstanding. Apologies for the inconvenience.
376
377 Improved the flexibility of ABSOLUTE: you can now give it an
378 expression rather than being restricted to a constant, and it can
379 take relocatable arguments as well.
380
381 Added the ability for a variable to be declared as EXTERN multiple
382 times, and the subsequent definitions are just ignored.
383
384 We now allow instruction prefixes (CS, DS, LOCK, REPZ etc) to be
385 alone on a line (without a following instruction).
386
387 Improved sanity checks on whether the arguments to EXTERN, GLOBAL
388 and COMMON are valid identifiers.
389
390 Added misc/exebin.mac to allow direct generation of .EXE files by
391 hacking up an EXE header using DB and DW; also added test/binexe.asm
392 to demonstrate the use of this. Thanks to Yann Guidon for
393 contributing the EXE header code.
394
395 ndisasm forgot to check whether the input file had been successfully
396 opened. Now it does. Doh!
397
398 Added the Cyrix extensions to the MMX instruction set.
399
400 Added a hinting mechanism to allow [EAX+EBX] and [EBX+EAX] to be
401 assembled differently. This is important since [ESI+EBP] and
402 [EBP+ESI] have different default base segment registers.
403
404 Added support for the PharLap OMF extension for 4096-byte segment
405 alignment.