source: buchla-68k/lib700/lmul.s@ cc2c9e0

Last change on this file since cc2c9e0 was 4f508e6, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Converted assembly language files.

  • Property mode set to 100644
File size: 732 bytes
RevLine 
[4f508e6]1| ------------------------------------------------------------------------------
2| lmul.s -- long multiply
3| Version 2 -- 1989-07-18
4| ------------------------------------------------------------------------------
[f40a309]5 .text
[4f508e6]6
[f40a309]7 .xdef lmul
[4f508e6]8
9ARG1 = 8
10ARG2 = 12
11
12TEMP = -4
13
[f40a309]14lmul: link a6,#-4
15 clr.w d2
16 tst.l ARG1(a6)
17 bge lmul1
[4f508e6]18
[f40a309]19 neg.l ARG1(a6)
20 addq.w #1,d2
[4f508e6]21
[f40a309]22lmul1: tst.l ARG2(a6)
23 bge lmul2
[4f508e6]24
[f40a309]25 neg.l ARG2(a6)
26 addq.w #1,d2
[4f508e6]27
[f40a309]28lmul2: move.w ARG1+2(a6),d0
29 mulu ARG2+2(a6),d0
30 move.l d0,TEMP(a6)
31 move.w ARG1(a6),d0
32 mulu ARG2+2(a6),d0
33 move.w ARG2(a6),d1
34 mulu ARG1+2(a6),d1
35 add.w d1,d0
36 add.w TEMP(a6),d0
37 move.w d0,TEMP(A6)
38 move.l TEMP(a6),d0
39 btst #0,d2
40 beq lmul3
[4f508e6]41
[f40a309]42 neg.l d0
[4f508e6]43
[f40a309]44lmul3: unlk a6
45 rts
[4f508e6]46
[f40a309]47 .end
Note: See TracBrowser for help on using the repository browser.