home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff269.lzh / PropGadget / mult020.asm < prev    next >
Assembly Source File  |  1989-11-06  |  997b  |  37 lines

  1. ;  Famines will not be stopped by LAKs carrying placards in parades;
  2. ;  famines will be stopped by engineers producing machines that make 
  3. ;  man more productive.                                             deTrebo
  4. ;
  5. ;           Jerry J. Trantow
  6. ;           1560 A East Irving Place
  7. ;           Milwaukee, Wi 53202-1460
  8. ;  8 Jan 89 Needed a 64 bit mult for Calculating Gadgetry
  9. ;  9 Jan 89 Not pretty, but it works
  10. ;  9 Jan 89 Started a 64 bit divide (div.asm)
  11. ; 14 Jan 89 Changed a,b to be passed by value
  12. ; 19 Oct 89 Realized I had deleted my 020 mult routine, so I hacked this up 
  13. ;
  14. ;   unsigned 32x32 bit multiple into a QUAD (64)
  15. ;
  16.     IFD LATTICE
  17.       CSECT text
  18.       XDEF _QuadMult020
  19.     ELSE    
  20.      machine MC68020 
  21.           public    _QuadMult020
  22.     ENDC
  23.  
  24. _QuadMult020:
  25.         link    a5,#0
  26.     
  27.      move.l    8(a5),d0    ; a
  28.         move.l    16(a5),a0    ; points to c 
  29.  
  30.     mulu.l    12(a5),d1:d0    ; b * a
  31.     move.l  d1,(a0)        ; high long bytes
  32.         move.l  d0,4(a0)    ; low long bytes
  33.  
  34.         unlk    a5
  35.         rts
  36.         end
  37.