What is the difference between %assign and %define in NASM assembly x86? Because for me it looks like they are the same thing, well, not really. Is %assign just a %define for which you can change later in the code?
They are not part of x86 assembly, they’re specific to nasm. They’re similar but not quite: %assign defines a numeric constant and it can be redefined. It cannot take arguments.%define defines a numeric or string valued macro, it can take arguments, and can also be redefined.
More information in the documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With