Factorial: Difference between revisions
m
→{{header|68000 Assembly}}: factorial function no longer clobbers D1
Puppydrum64 (talk | contribs) |
Puppydrum64 (talk | contribs) m (→{{header|68000 Assembly}}: factorial function no longer clobbers D1) |
||
Line 156:
.loop:
SUBQ.L #1,D4
MOVE.L D4,D1
JSR MULU_48 ;multiplies D0.L by D1.W
EXG D0,D1 ;output is in D1 so we need to put it in D0
MOVE.L (SP)+,D1
DBRA D5,.loop
MOVEM.L (SP)+,D4-D5
|