home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / disks / disk393.lzh / LibTool / AsmSimple / Simple.asm next >
Assembly Source File  |  1990-10-28  |  1KB  |  41 lines

  1. ;NOTE: The libstartup code generated by LibTool opens the exec, DOS, Intuition,
  2. ;      and Graphics libraries for our library functions and stores the bases
  3. ;      at the following variables respectively. Therefore, our library code
  4. ;      doesn't have to open these libs in order use their routines, nor close
  5. ;      these libs. The next XREF statement should always be included in any
  6. ;      lib code.
  7.  
  8.     XREF    _SysBase,_DOSBase,_IntuitionBase,_GfxBase
  9.  
  10. ;If you need to examine your lib base structure (for some reason) make it
  11. ;visible here
  12.  
  13.     XREF    _LibBase
  14.  
  15. ;=============================================================
  16. ; This is the first function in the library. It adds 2 LONGS
  17. ; passed in d0 and d1 with the result returned in d0
  18.  
  19.     XDEF    Add2Numbers    ;make it visible to our libstartup code
  20. Add2Numbers:
  21.     add.l    d1,d0
  22.     rts
  23.  
  24. ;=============================================================
  25. ; This is the second function in the library. It subs 2 LONGS
  26. ; passed in d0 and d1 with the result returned in d0
  27.  
  28.     XDEF    Sub2Numbers
  29. Sub2Numbers:
  30.     sub.l    d1,d0
  31.     rts
  32.  
  33. ;=============================================================
  34. ; This is the third function in the library. It multiplies 2 WORDS
  35. ; passed in d0 and d1 with the result returned in d0
  36.  
  37.     XDEF    Mult2Numbers
  38. Mult2Numbers:
  39.     mulu.w    d1,d0
  40.     rts
  41.