home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / OTL-MC6.DMS / in.adf / libsrc.lha / LIBSRC / abs.asm < prev    next >
Encoding:
Assembly Source File  |  1994-04-08  |  333 b   |  31 lines

  1.  
  2. ; Maxon C++:
  3. ; Library-Modul "abs"
  4. ; Jens Gelhar 06.11.91, 08.04.94
  5.  
  6.     xdef    _abs,_labs,_vlabs
  7.     xdef    abs__i,labs__j,vlabs__l
  8.  
  9. _abs:
  10. abs__i:
  11. _labs:
  12. labs__j:
  13.     move.l    4(a7),d0
  14.     bpl.b    .1
  15.     neg.l    d0
  16. .1    rts
  17.  
  18. _vlabs:
  19. vlabs__l:
  20.     move.l    8(a7),d1
  21.     move.l    4(a7),d0
  22.     bpl.b    .1
  23.     not.l    d0
  24.     not.l    d1
  25.     addq.l    #1,d0
  26.     bhs.b    .1
  27.     addq.l    #1,d1
  28. .1    rts
  29.  
  30.     end
  31.