home *** CD-ROM | disk | FTP | other *** search
/ TCE Demo 2 / TCE_DEMO_CD2.iso / demo_cd_.2 / mags / dntpaper / paper_1.arj / paper_1.msa / STUFFS.DAT / EXAMPLE.S < prev    next >
Text File  |  1987-04-22  |  3KB  |  98 lines

  1.         OPT    C+
  2.  
  3. *****************************************************************
  4. * EXAMPLE OF USING LTK'S MUSIX                    *
  5. *        Code by Mr SPIRIT and LTK 1st of December 1990.    *
  6. *****************************************************************
  7. * If you want to contact us or send donations then write to:    *
  8. *              MYSTIC                        *
  9. *              Franck MARCHIS                    *
  10. *              32, Rue des Rosiers                *
  11. *              F31140 Fonbeauzard                *
  12. *              FRANCE                        *
  13. *****************************************************************
  14.  
  15.         SECTION TEXT
  16.  
  17. Begin        DC.W    $A00A
  18.         clr.l    -(sp)            Supervisor mode
  19.         move.w    #$20,-(sp)
  20.         trap    #1
  21.         addq.l    #6,sp
  22.         move.l    d0,-(sp)        Keep user stack
  23.         move.b    #$12,$FFFFFC02.w    Mouse off
  24.         bclr    #5,$FFFFFA15.w        Timer C off
  25.         move.b    $484.w,old_click
  26.         clr.b    $484.w
  27.         pea    text(pc)
  28.         move.w    #9,-(sp)
  29.         trap    #1
  30.         addq.l    #6,sp
  31.         move.l    #vbl,$4D2.w        Install VBL slot
  32.         lea    musix(pc),a6
  33.         move.w    #$FF00,(a6)        Start ($FF00+4*Song number)
  34.  
  35.         move.w    #7,-(sp)        Wait for keypress
  36.         trap    #1
  37.         addq.l    #2,sp
  38.  
  39.         move.w    #$FFFF,(a6)        Stop music and timer
  40. wait_until_off    cmpi.w    #$FFFE,(a6)
  41.         bne.s    wait_until_off
  42.         clr.l    $4D2.w            Clear slot
  43.         bset    #5,$FFFFFA15.w        Enable Timer C
  44.         move.b    old_click(pc),$484.w
  45.         move.b    #8,$FFFFFC02.w
  46.         move.w    #$20,-(sp)        User stack already on stack
  47.         trap    #1
  48.         addq.l    #6,sp
  49.         DC.W    $A009
  50.         clr.w    -(sp)
  51.         trap    #1
  52.  
  53. vbl        move.w    #$2700,sr        Sync with screen top
  54.         lea    $FFFF8209.w,a0
  55.         moveq    #15,d1
  56. sync_start    move.b    (a0),d0
  57.         beq.s    sync_start
  58.         sub.w    d0,d1
  59.         lsr.w    d1,d0
  60.         move.w    #$700,$FFFF8240.w    Time measurement on
  61.         bsr    musix+2            Call musix
  62.         move.w    #$777,$FFFF8240.w    Time measurement off
  63.         move.w    #$2300,sr
  64.         rts
  65.  
  66.         SECTION DATA
  67.  
  68. musix        INCBIN    MYSTIC\LTKMUSIC.\PS*.SMB
  69. text        DC.B    27,"E"
  70.         DC.B    "***************************************",13,10
  71.         DC.B    "*  Hello guy !                        *",13,10
  72.         DC.B    "*  Just some few notes to help you... *",13,10
  73.         DC.B    "*                ~~~                  *",13,10
  74.         DC.B    "* LTK's musics like MADMAX'           *",13,10
  75.         DC.B    "* are position independent.           *",13,10
  76.         DC.B    "* It uses the registers d0-d4/a0-a3.  *",13,10
  77.         DC.B    "* The first word is essential as it   *",13,10
  78.         DC.B    "* enables to control musix or to read *",13,10
  79.         DC.B    "* some information ...  Look at the   *",13,10
  80.         DC.B    "* routine in ASCII for their meaning. *",13,10
  81.         DC.B    "* Our demo will be finished in        *",13,10
  82.         DC.B    "* FEBRUARY/MARCH so wait for more help*",13,10
  83.         DC.B    "* or write to us !!                   *",13,10
  84.         DC.B    "***************************************",13,10
  85.         DC.B    "* Golden greetings to all our friends *",13,10
  86.         DC.B    "* & good contacts: ATARI CLUB-VANTAGE *",13,10
  87.         DC.B    "* BEETLEJUICE-DBUG II-NTM-MAXI-AYOROS *",13,10
  88.         DC.B    "* CENTAURUS-SNAKE-LITTLE SWAP-RBOY-   *",13,10
  89.         DC.B    "* NAR-PIXEL-PHIL-T.ORO-SYL-FLYTOX ... *",13,10
  90.         DC.B    "***************************************",13,10
  91.         DC.B    "* (C) MYSTIC 1st of DECEMBER 1990     *",13,10
  92.         DC.B    "***************************************",13,10
  93.         DC.B    "* MEGAFUCK to ULM especially The FATE *",13,10
  94.         DC.B    "***************************************",0
  95. old_click    DC.B    0
  96.         EVEN
  97.  
  98.         END