home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 4: The Falcon Archive / nf_archive_four_v1.0.iso / ARCHIVE / WORK / MSX / MEGPL116.ZIP / MGPL-116 / AMIGA / USE-030.S < prev    next >
Text File  |  1995-08-24  |  5KB  |  182 lines

  1. ***********************************************************************
  2. ***********                                        ***********
  3. ***********                                        ***********
  4. ***********      De l'utilisation du Replay 030 Amiga        ***********
  5. ***********                                        ***********
  6. ***********        Of Use of the Amiga 030-Replay        ***********
  7. ***********                                        ***********
  8. ***********                                        ***********
  9. ***********          By Simplet / FATAL DESIGN            ***********
  10. ***********                                        ***********
  11. ***********************************************************************
  12.  
  13.             OutPut    USE-030.TOS
  14.             OPT        O+,OW-
  15.  
  16. ***********************************************************************
  17. ***********                Inits TOS                    ***********
  18. ***********************************************************************
  19.  
  20.         Section    TEXT
  21.  
  22. Start_Up    movea.l    4(sp),a5                ; BasePage Adress - Prg
  23.         lea.l    Stack,sp                ; Nouvelle Pile
  24.         movea.l    12(a5),a0                ; Text
  25.         adda.l    20(a5),a0                ; + Data
  26.         adda.l    28(a5),a0                ; + BSS
  27.         adda.w    #256,a0                ; + BasePage
  28.         pea.l    (a0)                    ; Length
  29.         pea.l    (a5)                    ; Adress
  30.         pea.l    $4a0000                ; 0 + Mshrink
  31.         trap        #1                    ; Gemdos
  32.         lea.l    12(sp),sp
  33.  
  34. ***********************************************************************
  35. ***********                It begins here                ***********
  36. ***********************************************************************
  37.  
  38.         lea.l    Msg_Rout,a0
  39.         bsr        Print
  40.  
  41.         lea.l    Module,a0
  42.         lea.l    WorkSpace,a1
  43.         bsr        MGTK_Init_Module_Samples
  44.  
  45.         lea.l    Error_Memory,a0
  46.         tst.w    d0
  47.         bmi        Error
  48.  
  49.         lea.l    Msg_Ok,a0
  50.         bsr        Print
  51.  
  52.         bsr        MGTK_Save_Sound
  53.         bsr        MGTK_Init_Sound
  54.         
  55.         st        MGTK_Restart_Loop        ; Loop On
  56.         bsr        MGTK_Play_Music
  57.  
  58. ***********************************************************************
  59. ***********            Main Waiting Loop                ***********
  60. ***********************************************************************
  61.  
  62. Main_Loop    move.w    #11,-(sp)                ; Cconis
  63.         trap        #1                    ; Gemdos
  64.         addq.l    #2,sp
  65.         tst.b    d0
  66.         beq.s    Main_Loop
  67.  
  68.         move.w    #7,-(sp)                ; Crawin
  69.         trap        #1                    ; Gemdos
  70.         addq.l    #2,sp
  71.  
  72.         cmp.b    #' ',d0
  73.         beq.s    Quit
  74.  
  75.         cmp.b    #'-',d0
  76.         bne.s    No_PP
  77.  
  78.         bsr        MGTK_Previous_Position
  79.         bra.s    Main_Loop
  80.  
  81. No_PP    cmp.b    #'+',d0
  82.         bne.s    No_NP
  83.  
  84.         bsr        MGTK_Next_Position
  85.         bra.s    Main_Loop
  86.  
  87. No_NP
  88.  
  89.         bclr        #5,d0        ; Upper-Case
  90.  
  91.         cmp.b    #'L',d0
  92.         bne.s    No_Play
  93.  
  94.         moveq.l    #1,d0
  95.         bsr.s    MGTK_Play_Music
  96.         bra.s    Main_Loop
  97.  
  98. No_Play    cmp.b    #'S',d0
  99.         bne.s    No_Stop
  100.  
  101.         bsr        MGTK_Stop_Music
  102.         bra.s    Main_Loop
  103.  
  104. No_Stop    cmp.b    #'P',d0
  105.         bne.s    Main_Loop
  106.  
  107.         bsr        MGTK_Pause_Music
  108.         bra.s    Main_Loop
  109.  
  110. ***********************************************************************
  111. ***********        It's Finished, Restore All            ***********
  112. ***********************************************************************
  113.  
  114. Quit        bsr        MGTK_Stop_Music
  115.         bsr        MGTK_Restore_Sound
  116.  
  117. Exit        clr.w     -(sp)                    ; PTerm
  118.         trap     #1                        ; Gemdos
  119.  
  120. Error    bsr.s    Print
  121.  
  122.         move.w    #7,-(sp)
  123.         trap        #1
  124.         addq.l    #2,sp
  125.  
  126.         clr.w     -(sp)                    ; PTerm
  127.         trap     #1                        ; Gemdos
  128.  
  129. ***********************************************************************
  130. ***********                Sub-Routines                ***********
  131. ***********************************************************************
  132.  
  133. Print    pea.l    (a0)
  134.         move.w    #9,-(sp)            ; Cconws
  135.         trap        #1                ; GemDos
  136.         addq.l    #6,sp
  137.         rts
  138.  
  139.         Section    BSS
  140.  
  141.         ds.l        20832/4                ; WorkSpace, Maxi 20832 octets
  142. WorkSpace    ds.l        1                    ; first of the BSS section
  143.  
  144.         Include    'AMIGA030.S'
  145.  
  146. ***********************************************************************
  147. ***********                The Module                ***********
  148. ***********************************************************************
  149.  
  150.         Section    DATA
  151.  
  152. Msg_Rout    dc.b        27,'E'
  153.         dc.b        "Amiga 4 voices 030-Replay Routine by Simplet / FATAL DESIGN",13,10
  154.         dc.b        "-----------------------------------------------------------",13,10,10
  155.         dc.b        "The CPU-Time taken is appearing in Pink.",13,10
  156.         dc.b        "The Grey corresponds to the patterns management.",13,10
  157.         dc.b        "You can use the following keys :",13,10
  158.         dc.b        "  - or + for previous or next music position",13,10
  159.         dc.b        "  L for play, P for pause, S for stop",13,10
  160.         dc.b        "  Space to quit",13,10,10
  161.         dc.b        "Initialisating Samples.......",0
  162.  
  163. Msg_Ok    dc.b        "Ok..",13,10,0
  164.  
  165. Error_Memory
  166.         dc.b        7,13,10
  167.         dc.b        "Error, the workspace isn't big enough.",13,10
  168.         dc.b        "Press any key...",0
  169.  
  170.         Even
  171.         IncDir    'E:\SNDTRACK\DEPACK\'
  172. Module    IncBin    '4ACES.MOD'        ; last of the DATA section
  173.  
  174. ***********************************************************************
  175. ***********                BSS Section                ***********
  176. ***********************************************************************
  177.  
  178.         Section    BSS
  179.  
  180. End_Stack    ds.l        64
  181. Stack    ds.l        1
  182.