The Netwide Assembler: NASM

Previous Chapter | Contents | Index

Appendix C: NASM Version History

C.1 NASM 2 Series

The NASM 2 series support x86-64, and is the production version of NASM since 2007.

C.1.1 Version 2.08

C.1.2 Version 2.07

C.1.3 Version 2.06

C.1.4 Version 2.05.01

C.1.5 Version 2.05

C.1.6 Version 2.04

C.1.7 Version 2.03.01

C.1.8 Version 2.03

C.1.9 Version 2.02

C.1.10 Version 2.01

C.1.11 Version 2.00

C.2 NASM 0.98 Series

The 0.98 series was the production versions of NASM from 1999 to 2007.

C.2.1 Version 0.98.39

C.2.2 Version 0.98.38

C.2.3 Version 0.98.37

C.2.4 Version 0.98.36

C.2.5 Version 0.98.35

C.2.6 Version 0.98.34

C.2.7 Version 0.98.33

C.2.8 Version 0.98.32

C.2.9 Version 0.98.31

C.2.10 Version 0.98.30

C.2.11 Version 0.98.28

C.2.12 Version 0.98.26

C.2.13 Version 0.98.25alt

C.2.14 Version 0.98.25

C.2.15 Version 0.98.24p1

C.2.16 Version 0.98.24

C.2.17 Version 0.98.23

C.2.18 Version 0.98.22

C.2.19 Version 0.98.21

C.2.20 Version 0.98.20

C.2.21 Version 0.98.19

C.2.22 Version 0.98.18

C.2.23 Version 0.98.17

C.2.24 Version 0.98.16

C.2.25 Version 0.98.15

C.2.26 Version 0.98.14

C.2.27 Version 0.98.13

C.2.28 Version 0.98.12

C.2.29 Version 0.98.11

C.2.30 Version 0.98.10

C.2.31 Version 0.98.09

C.2.32 Version 0.98.08

C.2.33 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

-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

C.2.34 Version 0.98.07 released 01/28/01

01/28/01

C.2.35 Version 0.98.06f released 01/18/01

C.2.36 Version 0.98.06e released 01/09/01

01/09/01

08/07/00

C.2.37 Version 0.98p1

C.2.38 Version 0.98bf (bug-fixed)

C.2.39 Version 0.98.03 with John Coffman's changes released 27-Jul-2000

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.

C.2.40 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

     %assign ofs     0 

     %macro  arg     1 
             %xdefine %1 dword [esp+ofs] 
             %assign ofs ofs+4 
     %endmacro

     %macro  abc     1 
             %define %1 hello 
     %endm 

     abc     %$here 
     %$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.

     %ifdef %$abc 
     %endif

to work without warnings even in no context.

     %define hello(x) Hello, x! 

     %define %$name andy 
     %error "hello(%$name)"

Same happened with %include directive.

     %define %$abc hello 
     %define __%$abc goodbye 
     __%$abc

would produce "incorrect" output: last line will expand to

     hello goodbyehello

Not quite what you expected, eh? :-) The answer is that preprocessor treats the %define construct as if it would be

     %define __ %$abc goodbye

(note the white space between __ and %$abc). After my "fix" it will "correctly" expand into

     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: %push,%macro,%imacro,%define,%idefine,%xdefine,%ixdefine, %assign,%iassign,%undef

       [WARNING macro-selfref] 

       %macro          push    1-* 
               %rep    %0 
                       push    %1 
                       %rotate 1 
               %endrep 
       %endmacro 

                       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).

       %define _myfunc _otherfunc 
       %define cextern(x) _ %+ x 
       cextern (myfunc)

After first expansion, third line will become "_myfunc". After this expansion is performed again so it becomes "_otherunc".

       %if 1 
               mov     eax,ebx 
       %else 
               put anything you want between these two brackets, 
               even macro-parameter references %1 or local 
               labels %$zz or macro-local labels %%zz - no 
               warning will be emitted. 
       %endif

       %push   outer 
       %define %$a [esp] 

               %push   inner 
               %$a 
               %pop 
       %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 %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:

       %define %$arg1  [esp+4] 
       test    eax,eax 
       if      nz 
               mov     eax,%$arg1 
       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.

       #define SOMETHING 
       SOMETHING

C.2.41 Version 0.98

All changes since NASM 0.98p3 have been produced by H. Peter Anvin <hpa@zytor.com>.

C.2.42 Version 0.98p9

C.2.43 Version 0.98p8

C.2.44 Version 0.98p7

C.2.45 Version 0.98p6

C.2.46 Version 0.98p3.7

C.2.47 Version 0.98p3.6

C.2.48 Version 0.98p3.5

     ndisasm -p cyrix aliased.bin 
     00000000  670F514310        paddsiw mm0,[ebx+0x10] 
     00000005  670F514320        paddsiw mm0,[ebx+0x20] 
     ndisasm -p intel aliased.bin 
     00000000  670F514310        sqrtps xmm0,[ebx+0x10] 
     00000005  670F514320        sqrtps xmm0,[ebx+0x20]

C.2.49 Version 0.98p3.4

C.2.50 Version 0.98p3.3

C.2.51 Version 0.98p3.2

C.2.52 Version 0.98p3-hpa

C.2.53 Version 0.98 pre-release 3

C.2.54 Version 0.98 pre-release 2

C.2.55 Version 0.98 pre-release 1

C.3 NASM 0.9 Series

Revisions before 0.98.

C.3.1 Version 0.97 released December 1997

C.3.2 Version 0.96 released November 1997

  mov ax,foo | bar 
  foo equ 1 
  bar equ 2

C.3.3 Version 0.95 released July 1997

C.3.4 Version 0.94 released April 1997

  rol ax,forward_reference 
  forward_reference equ 1

C.3.5 Version 0.93 released January 1997

This release went out in a great hurry after semi-crippling bugs were found in 0.92.

C.3.6 Version 0.92 released January 1997

C.3.7 Version 0.91 released November 1996

C.3.8 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.

Previous Chapter | Contents | Index