RosettaCodeData/Task/Arithmetic-Integer/68000-Assembly/arithmetic-integer-2.68000

10 lines
157 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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