home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 470.lha / MED_v2.13 / PROGRAMMERS / Examples / example4.a < prev    next >
Encoding:
Text File  |  1991-02-05  |  423 b   |  21 lines

  1. ;    example4.a -- calling modplayer from assembler program
  2.  
  3.     xref    _song    ;the name of the object file should be "song"
  4.     xref    _InitPlayer
  5.     xref    _PlayModule
  6.     xref    _RemPlayer
  7.  
  8.     code
  9.     movem.l a0-a6/d0-d7,-(sp)
  10.     jsr    _InitPlayer(pc)    ;no error checking needed here!!
  11.     lea    _song,a0
  12.     jsr    _PlayModule(pc)
  13.     movea.l 4,a6
  14.     moveq    #$40,d0
  15.     lsl.l    #6,d0
  16.     jsr    -$13e(a6)    ;wait for Ctrl-C
  17.     jsr    _RemPlayer(pc)
  18.     movem.l (sp)+,a0-a6/d0-d7
  19.     rts
  20.     end
  21.