home *** CD-ROM | disk | FTP | other *** search
- ; This program shows how to use the proplayer routines in an assembler
- ; program.
-
- ; It loads a file, named 'module' (you can change this if you want),
- ; and plays it until you press the left mouse button.
-
- ; link with modplayer.o and loadmod.o
-
- xref _LoadModule
- xref _UnLoadModule
- xref _PlayModule
- xref _InitPlayer
- xref _RemPlayer
-
- section "text",code
-
- movem.l d0-d7/a0-a6,-(sp)
- lea modname(pc),a0
- jsr _LoadModule(pc)
- move.l d0,d7 ;store in d7
- jsr _InitPlayer(pc)
- move.l d7,a0
- jsr _PlayModule(pc)
- ; WARNING: BUSY WAIT USING THE HARDWARE DIRECTLY. NEVER WRITE CODE
- ; LIKE THIS IN REAL PROGRAMS (this is just an example) !!!!
- waitmb btst #6,$bfe001
- bne.s waitmb
- jsr _RemPlayer(pc)
- move.l d7,a0
- jsr _UnLoadModule
- movem.l (sp)+,d0-d7/a0-a6
- moveq #0,d0
- rts
-
- modname dc.b 'module',0
- end
-