John
John

Reputation: 1129

#define alternative in Assembly?

Does Assembly (or at least NASM) have an equivalent to the C/C++ #define?

I want to do something like this:

#define i [ebp - 4]

Upvotes: 4

Views: 918

Answers (1)

Welcor
Welcor

Reputation: 3113

NASM:

%define i [ebp - 4]

Source: http://www.nasm.us/doc/nasmdoc4.html

edit: Maybe "equ" is interesting for you, too. Have a look at this thread: What's the difference between %define and equ in NASM?

Upvotes: 2

Related Questions