Some basic assembly help

Started by
9 comments, last by uber_n00b 19 years, 10 months ago
First of all, like everyone else has said already, there is no point in making an assembly function to do something so simple. But more importantly (may be useful to you in the future), the return values of functions in C/C++ are stored in the eax register (or ax in 16 bit programs). So instead of moving eax into x then returning x, you would just cut the function off after the add. The result would be returned in eax.

This topic is closed to new replies.

Advertisement