home *** CD-ROM | disk | FTP | other *** search
- .text | cjpurcell 30Jul89
- .even |
- .globl __mulsi3 |
- .globl ___mulsi3 |
- __mulsi3: |
- ___mulsi3: |
- link a6,#-2 | one word of local
- clrw a6@(-2) | zap the local; it's our neg flg
- |
- movel a6@(12),d0 | get b
- bpl muls1 | pos, ok
- negl d0 | negate it
- addqw #1,a6@(-2) | and inc the flag
- muls1: |
- movel d0,sp@- | push adjusted b
- movel a6@(8),d0 | get a
- bpl muls2 | pos, ok
- negl d0 | negate it
- subqw #1,a6@(-2) | and dec the flag
- muls2: |
- movel d0,sp@- | push adjusted a
- jbsr ___umulsi3 | do an unsigned mult
- addql #8,sp | flush args
- tstw a6@(-2) | flag set?
- beq muls3 | nope, go ahead and return
- negl d0 | negate the result
- muls3: |
- |
- unlk a6 | unlink the frame
- rts | done!
-