home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Sound / Tracker / OKTALYZER1.57.DMS / in.adf / sources / example2.s < prev    next >
Encoding:
Text File  |  1993-08-01  |  2.0 KB  |  104 lines

  1. ; link 
  2. ; This is only for my Rexx® Macro
  3. *************************************************************************
  4. *                                    *
  5. *              Oktalyzer PlayRoutine 2 Example            *
  6. *                                    *
  7. *************************************************************************
  8.  
  9.         oldsyntax
  10.  
  11. ; All Coding by A.Sander
  12.  
  13. ; Warning: No Audio Channels will be allocated. Any other Audio access 
  14. ; could be dangerous!
  15.  
  16. ; In case of any implementation Problems call Germany 08106/5729 (after 6 p.m.).
  17.  
  18. ; xLINK example2.o okplay2.o to example2
  19.  
  20.         xref    OK_Init
  21.         xref    OK_Play
  22.         xref    OK_Stop
  23.  
  24.         section    c,code
  25.  
  26. Play2:        move.l    (4).w,a0        ;d0:NTSCFlag
  27.         cmp.b    #60,530(a0)
  28.         seq    d0
  29.  
  30.         lea    Music,a0        ;   Init
  31.         jsr    OK_Init
  32.  
  33.         move.l    (4).w,a6        ;   Get ExecBase
  34.  
  35.         sub.l    a1,a1
  36.         jsr    -294(a6)        ;   (FindTask)
  37.         move.l    d0,MyTask
  38.  
  39.         moveq    #-1,d0
  40.         jsr    -330(a6)        ;   (AllocSignal)
  41.         move.w    d0,SigBit
  42.         moveq    #0,d1
  43.         bset    d0,d1
  44.         move.l    d1,SigMask
  45.  
  46.         moveq    #5,d0        ;   Add a vertical blank int
  47.         lea    VBIInt(pc),a1
  48.         move.l    #VBICode,18(a1)
  49.         jsr    -168(a6)    ;   (AddIntServer)
  50.  
  51.         move.l    SigMask(pc),d0    ;   Wait for Signal
  52.         jsr    -318(a6)    ;   (Wait)
  53.  
  54.         lea    VBIInt(pc),a1
  55.         moveq    #5,d0
  56.         jsr    -174(a6)    ;   (RemIntServer)
  57.  
  58.         move.w    SigBit(pc),d0
  59.         jsr    -336(a6)    ;   (FreeSignal)
  60.  
  61.         jsr    OK_Stop
  62.  
  63.         moveq    #0,d0        ;==>Return Code OK
  64.         rts
  65.  
  66. ; Data ------------------------------------------------------------------
  67.  
  68. SigBit:        ds.w    1
  69. SigMask:    ds.l    1
  70. MyTask:        ds.l    1
  71.  
  72. ; My vertical Blank Interrupt Structure ---------------------------------
  73.  
  74. VBIInt:        ds.l    2
  75.         dc.b    2,127            ;   Should be at begin of List
  76.         ds.l    3
  77.  
  78. ; My vertical Blank Interrupt -------------------------------------------
  79.  
  80. VBICode:    movem.l    d0-d7/a0-a6,-(sp)    ;   Save All
  81.  
  82.         jsr    OK_Play
  83.  
  84.         btst    #6,$bfe001
  85.         bne.s    .cont
  86.         btst    #2,$dff016
  87.         bne.s    .cont
  88.  
  89.         move.l    MyTask(pc),a1
  90.         move.l    SigMask(pc),d0
  91.         move.l    (4).w,a6        ;   Get ExecBase
  92.         jsr    -324(a6)        ;   (Signal)
  93.  
  94. .cont:        movem.l    (sp)+,d0-d7/a0-a6
  95.         lea    $dff000,a0        ;--> Shitty GFXBASE BUG!
  96.         moveq    #0,d0
  97.         rts
  98.  
  99.         section    dc,data,chip    ;   data_c in Devpac
  100.  
  101. Music:        incbin    OKTALYZER:OK-SONGS/tar-demo-song1
  102.  
  103.         end
  104.