NASM 0.97
[nasm/autotest.git] / Changes
blob24f4bfefa83314d6f34b022fe82c89fc0ca02f04
1 Change log for NASM
2 ===================
4 0.90 released October 1996
5 --------------------------
7 First release version. First support for object file output. Other
8 changes from previous version (0.3x) too numerous to document.
10 0.91 released November 1996
11 ---------------------------
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.
31 0.92 released January 1997
32 --------------------------
34 The FDIVP/FDIVRP and FSUBP/FSUBRP pairs had been inverted: this was
35 fixed. This also affected the LCC driver.
37 Fixed a bug regarding 32-bit effective addresses of the form
38 [other_register+ESP].
40 Documentary changes, notably documentation of the fact that Borland
41 Win32 compilers use `obj' rather than `win32' object format.
43 Fixed the COMENT record in OBJ files, which was formatted
44 incorrectly.
46 Fixed a bug causing segfaults in large RDF files.
48 OBJ format now strips initial periods from segment and group
49 definitions, in order to avoid complications with the local label
50 syntax.
52 Fixed a bug in disassembling far calls and jumps in NDISASM.
54 Added support for user-defined sections in COFF and ELF files.
56 Compiled the DOS binaries with a sensible amount of stack, to
57 prevent stack overflows on any arithmetic expression containing
58 parentheses.
60 Fixed a bug in handling of files that do not terminate in a newline.
62 0.93 released January 1997
63 --------------------------
65 This release went out in a great hurry after semi-crippling bugs
66 were found in 0.92.
68 Really _did_ fix the stack overflows this time. *blush*
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.
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.
82 Included a new Borland C makefile, Makefile.bc2, donated by Fox
83 Cutter <lmb@comtch.iea.com>.
85 0.94 released April 1997
86 ------------------------
88 Major item: added the macro processor.
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.
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.
97 Fixed a seg-fault in the label manager.
99 Stopped FBLD and FBSTP from _requiring_ the TWORD keyword, which is
100 the only option for BCD loads/stores in any case.
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.
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...
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
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).
119 Added Watcom C makefiles, and misc/pmw.bat, donated by Dominik Behr.
121 Added the INCBIN pseudo-opcode.
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.
127 Fixed a bug in OBJ format, which caused incorrect object records to
128 be output when absolute labels were made global.
130 Updates to RDOFF subdirectory, and changes to outrdf.c.
132 0.95 released July 1997
133 -----------------------
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.
139 Added makefiles (for NASM and the RDF tools) to build Win32 console
140 apps under Symantec C++. Donated by Mark Junker.
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.
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.
151 Added `@' to the list of valid characters to begin an identifier
152 with.
154 Documentary changes, notably the addition of the `Common Problems'
155 section in nasm.doc.
157 Fixed a bug relating to 32-bit PC-relative fixups in OBJ.
159 Fixed a bug in perm_copy() in labels.c which was causing exceptions
160 in cleanup_labels() on some systems.
162 Positivity sanity check in TIMES argument changed from a warning to
163 an error following a further complaint.
165 Changed the acceptable limits on byte and word operands to allow
166 things like `~10111001b' to work.
168 Fixed a major problem in the preprocessor which caused seg-faults if
169 macro definitions contained blank lines or comment-only lines.
171 Fixed inadequate error checking on the commas separating the
172 arguments to `db', `dw' etc.
174 Fixed a crippling bug in the handling of macros with operand counts
175 defined with a `+' modifier.
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.
182 Removed [INC] and [INCLUDE] support for good, since they were
183 obsolete anyway.
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.
189 Added, tentatively, OS/2 object file support (as a minor variant on
190 OBJ).
192 Updates to Fox Cutter's Borland C makefile, Makefile.bc2.
194 Removed a spurious second fclose() on the output file.
196 Added the `-s' command line option to redirect all messages which
197 would go to stderr (errors, help text) to stdout instead.
199 Added the `-w' command line option to selectively suppress some
200 classes of assembly warning messages.
202 Added the `-p' pre-include and `-d' pre-define command-line options.
204 Added an include file search path: the `-i' command line option.
206 Fixed a silly little preprocessor bug whereby starting a line with a
207 `%!' environment-variable reference caused an `unknown directive'
208 error.
210 Added the long-awaited listing file support: the `-l' command line
211 option.
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.
218 Added the NASM environment variable.
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.
224 Added `return 0;' to test/objlink.c to prevent compiler warnings.
226 Added the __NASM_MAJOR__ and __NASM_MINOR__ standard defines.
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.
232 Errors in pass two now cause the program to return a non-zero error
233 code, which they didn't before.
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.
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.
245 0.96 released November 1997
246 ---------------------------
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.
253 Fixed name pollution under Digital UNIX: one of its header files
254 defined R_SP, which broke the enum in nasm.h.
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.
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.
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.
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'.
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.
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.
288 Fixed some buffer overrun problems with large OBJ output files.
289 Thanks to DJ Delorie for the bug report and fix.
291 Made preprocess-only mode actually listen to the %line markers as it
292 prints them, so that it can report errors more sanely.
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
301 Added the ALIGN and ALIGNB standard macros.
303 Added PIC support in ELF: use of WRT to obtain the four extra
304 relocation types needed.
306 Added the ability for output file formats to define their own
307 extensions to the GLOBAL, COMMON and EXTERN directives.
309 Implemented common-variable alignment, and global-symbol type and
310 size declarations, in ELF.
312 Implemented NEAR and FAR keywords for common variables, plus
313 far-common element size specification, in OBJ.
315 Added a feature whereby EXTERNs and COMMONs in OBJ can be given a
316 default WRT specification (either a segment or a group).
318 Transformed the Unix NASM archive into an auto-configuring package.
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.
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.
330 Added the ability to specify sections' alignment requirements in
331 Win32 object files and pure binary files.
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
340 Added a preprocessor repeat construct: %rep / %exitrep / %endrep.
342 Added the __FILE__ and __LINE__ standard macros.
344 Added a sanity check for number constants being greater than
345 0xFFFFFFFF. The warning can be disabled.
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.
350 Added %rotate, allowing multi-line macro parameters to be cycled.
352 Added the `*' option for the maximum parameter count on multi-line
353 macros, allowing them to take arbitrarily many parameters.
355 Added the ability for the user-level forms of EXTERN, GLOBAL and
356 COMMON to take more than one argument.
358 Added the IMPORT and EXPORT directives in OBJ format, to deal with
359 Windows DLLs.
361 Added some more preprocessor %if constructs: %ifidn / %ifidni (exact
362 textual identity), and %ifid / %ifnum / %ifstr (token type testing).
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).
368 Added NetBSD/FreeBSD/OpenBSD's variant of a.out format, complete
369 with PIC shared library features.
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.
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.
381 Added the ability for a variable to be declared as EXTERN multiple
382 times, and the subsequent definitions are just ignored.
384 We now allow instruction prefixes (CS, DS, LOCK, REPZ etc) to be
385 alone on a line (without a following instruction).
387 Improved sanity checks on whether the arguments to EXTERN, GLOBAL
388 and COMMON are valid identifiers.
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.
395 ndisasm forgot to check whether the input file had been successfully
396 opened. Now it does. Doh!
398 Added the Cyrix extensions to the MMX instruction set.
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.
404 Added support for the PharLap OMF extension for 4096-byte segment
405 alignment.
407 0.97 released December 1997
408 ---------------------------
410 This was entirely a bug-fix release to 0.96, which seems to have got
411 cursed. Silly me.
413 Fixed stupid mistake in OBJ which caused `MOV EAX,<constant>' to
414 fail. Caused by an error in the `MOV EAX,<segment>' support.
416 ndisasm hung at EOF when compiled with lcc on Linux because lcc on
417 Linux somehow breaks feof(). ndisasm now does not rely on feof().
419 A heading in the documentation was missing due to a markup error in
420 the indexing. Fixed.
422 Fixed failure to update all pointers on realloc() within extended-
423 operand code in parser.c. Was causing wrong behaviour and seg faults
424 on lines such as `dd 0.0,0.0,0.0,0.0,...'
426 Fixed a subtle preprocessor bug whereby invoking one multi-line
427 macro on the first line of the expansion of another, when the second
428 had been invoked with a label defined before it, didn't expand the
429 inner macro. 
431 Added internal.doc back in to the distribution archives - it was
432 missing in 0.96 *blush*
434 Fixed bug causing 0.96 to be unable to assemble its own test files,
435 specifically objtest.asm. *blush again*
437 Fixed seg-faults and bogus error messages caused by mismatching
438 %rep and %endrep within multi-line macro definitions.
440 Fixed a problem with buffer overrun in OBJ, which was causing
441 corruption at ends of long PUBDEF records.
443 Separated DOS archives into main-program and documentation to reduce
444 download size.