Y is a nonnegative constant, usually zero. If Y has the value zero, it can be omitted.
The instruction is used to negate $Z.
NEG:
The value Y - $Z or Y - Z is placed into register $X using signed, two's complement arithmetic. An integer
overflow exception occurs if the result is greater than 263
- 1. (Notice that in this case MMIX works with the
"immediate" constant Y, not register $Y. NEG commands are analogous to the immediate variants of other
commands, because they save us from having to put one-byte constants into a register. When Y = 0, overflow
occurs if and only if $Z = -263
. The instruction NEG $X,1,2 has exactly the same effect as NEG $X,0,1)
NEGU:
The value (Y - $Z) mod 264
or (Y - Z) mod 264
is placed into register $X. NEGU instructions are the same as
NEG instructions, except that no test for overflow is made.
Please help to keep this site up to date!
If you want to point out important material or projects
that are not listed here, if you find errors or want to suggest improvements,
please send email to