Macros are useful for simplifying and reusing your code, as well as for abstracting some details or differences between platforms or architectures. For instance, you can use macros to define instructions not present in assembly language, such as pusha, popa, or printf. Additionally, you can define parameters or variables that can be passed or modified by the macro, as well as conditional or looping structures not supported by assembly language (i.e., if, while, or for). Moreover, macros can be used to define platform-specific or architecture-specific features like registers, flags, or system calls. To use macros in NASM, you need to define the macro with the %macro directive and specify the name, number of parameters, and body of the macro. Then you must use the %endmacro directive to mark the end of the macro definition. Afterward, invoke the macro with its name and arguments (if any). The %exitrep directive can be used to exit a macro expansion prematurely and the %rotate directive can be used to rotate the order of the macro parameters.