Special variables: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) |
Puppydrum64 (talk | contribs) m (→{{header|MIPS Assembly}}: removed $zero as it's not really a variable since its value cannot be changed.) |
||
Line 1,288: | Line 1,288: | ||
=={{header|MIPS Assembly}}== |
=={{header|MIPS Assembly}}== |
||
The register <code>$0</code> or <code>$zero</code> always has a value of zero and cannot be changed. Any attempts to load a nonzero value into this register will have no effect. This makes it useful as a "garbage bin" of sorts. |
|||
When multiplying two registers, the product is always stored in the <code>$HI</code> and <code>$LO</code> registers. Their contents can be read into your standard registers with the commands <code>mfhi $reg</code> and <code>mflo $reg</code>. |
When multiplying two registers, the product is always stored in the <code>$HI</code> and <code>$LO</code> registers. Their contents can be read into your standard registers with the commands <code>mfhi $reg</code> and <code>mflo $reg</code>. |
||