
test$ cat test.asm

%macro foo 1+.nolist
 %1
%endmacro

%macro bar 1+.nolist
%%label:
        db %1
        times 8 - ($ - %%label) nop
%endmacro

%macro baz 1+.nolist
%%label:
        dw %1
        times 8 - ($ - %%label) nop
%endmacro

%macro qux 1+.nolist
%%label:
        dd %1
        times 8 - ($ - %%label) nop
%endmacro

%macro quux 0.nolist
        times 4 db 90h,90h,90h,90h,90h
%endmacro

        times 8 nop
        times 8 db 90h
        times 8 dw 9090h
        foo times 8 nop
        foo times 8 db 90h
        foo times 8 dw 9090h
        bar 90h
        baz 9090h
        qux 90909090h
        quux
        nop
test$ nasm -v
NASM version 3.01rc3 compiled on Mar  6 2026
test$ nasm test.asm -l /dev/stderr
     1
     2                                  %macro foo 1+.nolist
     3                                   %1
     4                                  %endmacro
     5
     6                                  %macro bar 1+.nolist
     7                                  %%label:
     8                                          db %1
     9                                          times 8 - ($ - %%label) nop
    10                                  %endmacro
    11
    12                                  %macro baz 1+.nolist
    13                                  %%label:
    14                                          dw %1
    15                                          times 8 - ($ - %%label) nop
    16                                  %endmacro
    17
    18                                  %macro qux 1+.nolist
    19                                  %%label:
    20                                          dd %1
    21                                          times 8 - ($ - %%label) nop
    22                                  %endmacro
    23
    24                                  %macro quux 0.nolist
    25                                          times 4 db 90h,90h,90h,90h,90h
    26                                  %endmacro
    27
    28 00000000 90<rep 8h>                      times 8 nop
    29 00000008 90<rep 8h>                      times 8 db 90h
    30 00000010 9090<rep 8h>                    times 8 dw 9090h
    31 00000020 90<rep 8h>                      foo times 8 nop
    32 00000028 90<rep 8h>                      foo times 8 db 90h
    33 00000030 9090<rep 8h>                    foo times 8 dw 9090h
    34 00000040 9090<rep 7h>                    bar 90h
    35 00000048 909090<rep 6h>                  baz 9090h
    36 00000050 9090909090<rep 4h>              qux 90909090h
    37 00000058 9090909090<rep 4h>              quux
    38 0000006C 90                              nop
test$ oldnasm -v
NASM version 2.15rc0 compiled on Dec 28 2018
test$ oldnasm test.asm -l /dev/stderr
     1
     2                                  %macro foo 1+.nolist
     3                                   %1
     4                                  %endmacro
     5
     6                                  %macro bar 1+.nolist
     7                                  %%label:
     8                                          db %1
     9                                          times 8 - ($ - %%label) nop
    10                                  %endmacro
    11
    12                                  %macro baz 1+.nolist
    13                                  %%label:
    14                                          dw %1
    15                                          times 8 - ($ - %%label) nop
    16                                  %endmacro
    17
    18                                  %macro qux 1+.nolist
    19                                  %%label:
    20                                          dd %1
    21                                          times 8 - ($ - %%label) nop
    22                                  %endmacro
    23
    24                                  %macro quux 0.nolist
    25                                          times 4 db 90h,90h,90h,90h,90h
    26                                  %endmacro
    27
    28 00000000 90<rept>                        times 8 nop
    29 00000008 90<rept>                        times 8 db 90h
    30 00000010 9090<rept>                      times 8 dw 9090h
    31 00000020 90<rept>                        foo times 8 nop
    32 00000028 90<rept>                        foo times 8 db 90h
    33 00000030 9090<rept>                      foo times 8 dw 9090h
    34 00000040 9090<rept>                      bar 90h
    35 00000048 909090<rept>                    baz 9090h
    36 00000050 9090909090<rept>                qux 90909090h
    37 00000058 9090909090<rept>                quux
    38 0000006C 90                              nop
test$
