13 lines
486 B
Plaintext
13 lines
486 B
Plaintext
ADD.L D0,D1 ; add two numbers
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
SUB.L D1,D0 ; subtract D1 from D0
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
MULU D0,D1 ; multiply two unsigned numbers. Use MULS for signed numbers
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
DIVU D1,D0 ; Divide D0 by D1. Use DIVS for signed numbers. Upper two bytes of D0 are the remainder, lower two are the integer quotient.
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
MODULUS:
|
|
DIVU D1,D0
|
|
SWAP D0 ;swap the order of the 16-bit halves of D0.
|
|
RTS
|