; mac1.asm ; macro with a default parameter, ; also calling a macro within macro definition ; Celio G. May 2002 org 100h ; inform Nasm this is a .com file ; int 21h is going to want... %macro showmsg 1 mov dx, %1 ; the address of or message in dx mov ah,9 ; ah=9 - "print string" sub-function int 21h ; call dos services %ENDMACRO %macro die 0-1 msg2 showmsg %1 %endmacro die die msg mov ah,4Ch ; "terminate program" sub-function int 21h ; call dos services msg db 'Hello, World!',0Dh,0Ah,'$' ; $-terminated message msg2 db 'No parameters in this macro call...',0dh,0ah,'$'