NASM Forum > Other Discussion

documentation of Nasm.. ?

(1/1)

nobody:
i believe this,
http://nasm.sourceforge.net/doc/nasmdoc0.html
is the NASM Manual.
i can't find nothing about jumps !! when to use it with near, short, etc...

nobody:
Short jumps are +127/-128 bytes, near for anything else, as a "short" answer. :)

Nasm defaults to "near" for unconditional jumps, to "short" for conditional jumps. Nasm will advise you if "short" won't work.

Since, as you've observed, the instruction set reference has been removed from the Nasm Manual... I guess you'll have to consult manufacturers docs for instruction information.

Or you could look at the *old* manual. :)



Far jumps reload the cs register, and are probably not what you want unless you're writing an OS or a large dos program - the latter would be silly, these days.

For a really easy solution, give Nasm the "-O" switch, and let it determine whether "near" is needed, or if "short" will reach.

Best,
Frank

nobody:
thanks,
as for instructions, i'm using the Intel manual. btw, does nasm accept ALL the instruction listed by intel?

nobody:
Can't say "all" - they keep inventin' new ones. As a rule, Nasm tries to support "all" instructions available at the time of a release. The latest *stable* release is 0.98.39 (0.98.40 at Apple). There are a slew of new instructions added since then - sse3, ssse3, the whole 64-bit thing... Available in 0.99.xx - 2.0 when it's stable. But right now it's quite wobbly - don't try any floating-point with 0.99.04 available here! We double floating-point constants - oops.

Keeping up with documenting these new instructions has proven a problem - which is why that section of the manual is gone.

If you discover an instruction you need that Nasm doesn't support, let us know and it'll be added... well, when it happens... volunteer effort, y'know...

Best,
Frank

Navigation

[0] Message Index

Go to full version