Arithmetic/Integer: Difference between revisions
→{{header|68000 Assembly}}
Puppydrum64 (talk | contribs) No edit summary |
Puppydrum64 (talk | contribs) |
||
Line 190:
RTS</lang>
Exponentiation doesn't exist but can be implemented in a similar fashion to multiplication on the 6502:
<lang 68000devpac>Exponent:
;raises D0 to the D1 power. No overflow protection.
MOVE.L D0,D2
SUBQ.L #1,D1
loop_exponent:
MULU D0,D2
DBRA D1,loop_exponent
;output is in D2
RTS</lang>
=={{header|AArch64 Assembly}}==
|