home *** CD-ROM | disk | FTP | other *** search
/ The Equalizer BBS / equalizer-bbs-collection_2004.zip / equalizer-bbs-collection / DEMOSCENE-STUFF / XMAS_ZRO.ZIP / XMAS.ASM < prev   
Assembly Source File  |  1996-12-01  |  12KB  |  294 lines

  1.  
  2. ;               ▄▄                             ▄██▄
  3. ;             ▀▀██▌     ██     ▄█    ▄▄███▄▄   ▀██▀
  4. ;    ▄▄███▄▄    ███    ▐█▌     ▐█▌  ██▀   ▀▀█  ▄▄▄  ▄█▀   ▄▄█▌ █▄ ▄▄▄ ▄███▄▄
  5. ;  ▄█▀▀   ▀▀█▄  ▐██▌   ▐██      ██  ██▄    ▀▀   ██ ▐█▌   ▀████ ███▀▀███▀ ▀██▌
  6. ; ██   ▄▄▄███▀  ▐███    ▀███▄▄▄▄██   ▀▀██▄▄    ▐██ ██      ███▐██   ▐█▌   ▐██
  7. ;▐█████▀▀▀    ▄  ███▌  ▄   ▀▀▀▀▀██ ▄     ▀▀█▄  ██▌ ██      ▐██▐█▌   ██    ███
  8. ; ██       ▄▄██▌ ████ ▐██▄▄    ▐█▌▐██▄▄    ▐█▌▐██▌ ▐█▌     ██▌▐█▌  ▐█▌   ███▌
  9. ;  ▀██▄▄▄█████▀▀ ▐███▌▀▀█████▄██▀ ▀▀█████▄██▀ ███   ▀██▄▄▄██▀  ▀█▄  ▀   ████
  10. ;     ▀▀▀▀       █████▄    ▀▀▀         ▀▀▀   ▐███      ▀▀▀ [genom]     ████▌
  11. ;               ▀▀▀▀                        ▀▀▀██▄                    ▀▀███
  12. ;          - XMAS96 intro - ............coded by 3x0dus of 3lysium        ▀
  13. ;        ─────────────────────────────────────────────────────────────
  14. ;    here's the source of our little (?) xmas intro. whole intro provides
  15. ;    write routines,  voxel-landscape based strange background effect and
  16. ;    a simple snow routine. also you can use this source  as  an  example
  17. ;    how to use crystal player...
  18. ;    hope you gonna use  this source only  to learn how  to code, because
  19. ;    ripping  the code is  very, very lame. btw,  i know i should have to
  20. ;    code it better, but i had only one night to do it...
  21. ;    the source is undocumented, sorry.
  22. ;
  23. ;    if you want to chat about coding or anything, swap some stuff, etc :
  24. ;    Bartek Kielczewski
  25. ;    Maleckiego 7/13
  26. ;    1o-293 Olsztyn, Poland
  27. ;
  28. ;                                                              exodus.els
  29.  
  30.                    ;─────────────────────────────> Font <───────────────────────
  31. Text_x             equ 15
  32. Text_y             equ 35
  33. Font_width         equ 16
  34. Font_height        equ 19
  35.                    ;─────────────────────────────> Landscape <──────────────────
  36. Clip_t             equ 0
  37. Clip_b             equ 180
  38. Horizon            equ 90
  39.                    ;─────────────────────────────> General <────────────────────
  40. Stars_nbr          equ 6*35
  41. Xres               equ 320
  42. Yres               equ 200
  43.                    ;─────────────────────────────> Crystal Player 2.6o <────────
  44.                    extrn detectsnd : far
  45.                    extrn mloadmod : far
  46.                    extrn unloadmod : far
  47.                    extrn setmod : far
  48.                    extrn makemod : far
  49.                    extrn startmod : far
  50.                    extrn stopmod : far
  51.                    extrn timer : dword
  52.                    extrn sequence : far
  53.                    extrn position : far
  54.                    ;────────────────────────────────────────────────────────────
  55.  
  56.                    .386p
  57.                    assume cs:code16, ss:MyStack
  58. ;───────────────────────────────────────────────────────────────────────────────
  59. Code16             segment para use16
  60.  
  61. Text_off           dw 0
  62. Last_pattern       db 0
  63. device             db 5
  64. port               dw 0
  65. irq                db 0
  66. dma                db 0
  67.                    ;─────────────────────────────> Procedures <─────────────────
  68.                    include inc\setpal.inc
  69.                    include inc\scr_buff.inc
  70.                    include inc\write.inc
  71.                    include inc\landscap.inc
  72.                    include inc\snow.inc
  73.                    ;────────────────────────────────────────────────────────────
  74.  
  75.                    ;─────────────────────────────> Crystal player init <────────
  76. start16:           mov   bx, ss
  77.                    mov   ax, es
  78.                    sub   bx, ax
  79.                    mov   ax, sp
  80.                    add   ax, 15
  81.                    shr   ax, 4
  82.                    add   bx, ax
  83.                    mov   ah, 4ah
  84.                    int   21h
  85.                    ;────────────────────────────────────────────────────────────
  86.                    mov   ax, seg module
  87.                    shl   eax, 16
  88.                    mov   ax, offset module
  89.                    push  eax
  90.                    call  MLoadMOD
  91.                    jc    ShutDown
  92.  
  93.                    push  cs
  94.                    push  offset device
  95.                    push  cs
  96.                    push  offset port
  97.                    push  cs
  98.                    push  offset irq
  99.                    push  cs
  100.                    push  offset dma
  101.                    call  DetectSND
  102.  
  103.                    push  00b4h
  104.                    mov   al, device
  105.                    xor   ah, ah
  106.                    push  ax
  107.                    push  word ptr port
  108.                    mov   al, irq
  109.                    push  ax
  110.                    call  SetMOD
  111.  
  112.                    mov   ax, 13h
  113.                    int   10h
  114.                    call  Set_pal
  115.                    call  STR_make
  116.                    call  StartMOD
  117. mainloop:
  118.                    call  MakeMOD
  119.                    call  VS_clear
  120.                    call  Land_draw
  121.                    call  Write
  122.  
  123.                    mov   ax, seg Sequence
  124.                    mov   ds, ax
  125.                    mov   al, [byte ptr ds:Position]
  126.                    mov   ah, Last_pattern
  127. Sync1:             cmp   ah, al
  128.                    je    Sync2
  129.  
  130.                    mov   Last_pattern, al
  131.                    inc   bp
  132.                    mov   Text_off, bp
  133.  
  134. Sync2:             call  MakeMOD
  135.                    call  Land_move
  136.                    call  STR_move
  137.                    call  MakeMOD
  138.                    call  STR_show
  139.                    call  VS_show
  140.  
  141.                    in    al, 60h
  142.                    cmp   al, 63h
  143.                    ja    mainloop
  144.  
  145.                    call  StopMOD
  146.                    call  UnloadMOD
  147. ShutDown:
  148.                    mov   ax, 3
  149.                    int   10h
  150.                    mov   ax, 4c01h
  151.                    int   21h
  152.                    ret
  153.  
  154. Code16             ends
  155. ;───────────────────────────────────────────────────────────────────────────────
  156.  
  157.  
  158. ;───────────────────────────────────────────────────────────────────────────────
  159. Font_data          segment para use16
  160. font:              include inc\font.dat
  161. font_pal:          include inc\font.pal
  162.  
  163. message            db ' THE WINTER IS ON,', 0feh
  164.                    db 'SNOW IS ALL AROUND', 0feh
  165.                    db '  CHRISTMAS TREE  ', 0feh
  166.                    db ' IN HOME, WE HAVE ', 0feh
  167.                    db '   A GOOD TIME!   ', 0feh
  168.                    db 0ffh
  169.                    db 'IN DIZ LOVELY TIME', 0feh
  170.                    db ' ELYSIUM''D GLADLY ', 0feh
  171.                    db '  WISH ALL OF YOU ', 0feh
  172.                    db '* A MERRY         ', 0feh
  173.                    db '     CHRISTMAS ! *', 0feh
  174.                    db 0ffh
  175.                    db 'ESPECIALLY TO OUR ', 0feh
  176.                    db '  FRIENDS FROM :  ', 0feh
  177.                    db '* ABSENCE *       ', 0feh
  178.                    db '   * A.C.M.E *    ', 0feh
  179.                    db '      * BOTTOM *  ', 0feh
  180.                    db 0ffh
  181.                    db '      * BYTELAND *', 0feh
  182.                    db '   * CAMORRA *    ', 0feh
  183.                    db '* CNCD *          ', 0feh
  184.                    db '   * C.O.M.A *    ', 0feh
  185.                    db '      * COMPLEX * ', 0feh
  186.                    db 0ffh
  187.                    db '* DARK LEGIONS *  ', 0feh
  188.                    db '    * EXCEPTION * ', 0feh
  189.                    db ' * EXMORTIS *     ', 0feh
  190.                    db '      * FAITH *   ', 0feh
  191.                    db '* FASCINATION *   ', 0feh
  192.                    db 0ffh
  193.                    db '    * FUEL *      ', 0feh
  194.                    db '     * FUSE *     ', 0feh
  195.                    db '       * GRID *   ', 0feh
  196.                    db '     * GUARDIANS *', 0feh
  197.                    db '* HALCYON *       ', 0feh
  198.                    db 0ffh
  199.                    db '  * HOUSE-SOFT *  ', 0feh
  200.                    db '    * HYPNOTIZE * ', 0feh
  201.                    db '* IMPACT STUDIOS *', 0feh
  202.                    db '     * IMPHOBIA * ', 0feh
  203.                    db '        * JAMM *  ', 0feh
  204.                    db 0ffh
  205.                    db '       * K.L.F. * ', 0feh
  206.                    db '  * LOGIC DESIGN *', 0feh
  207.                    db '* LOGRUS *        ', 0feh
  208.                    db '  * LUZIK DIZAJN *', 0feh
  209.                    db ' * MAJIC 12 *     ', 0feh
  210.                    db 0ffh
  211.                    db ' * MELON DESIGN * ', 0feh
  212.                    db '  * METHADONE *   ', 0feh
  213.                    db '     * MIST *     ', 0feh
  214.                    db '   * MOONLIGHT *  ', 0feh
  215.                    db ' * MOTION *       ', 0feh
  216.                    db 0ffh
  217.                    db ' * OBSFUCATION *  ', 0feh
  218.                    db '  * ORANGE *      ', 0feh
  219.                    db '     * OXYGENE *  ', 0feh
  220.                    db '   * P.B. *       ', 0feh
  221.                    db '      * POISON *  ', 0feh
  222.                    db 0ffh
  223.                    db '    * PULP *      ', 0feh
  224.                    db ' * PULSE *        ', 0feh
  225.                    db '  * REALTECH *    ', 0feh
  226.                    db '     * REBELION * ', 0feh
  227.                    db '  * RESISTANCE *  ', 0feh
  228.                    db 0ffh
  229.                    db '      * REVOLT *  ', 0feh
  230.                    db ' * SHOCKER *      ', 0feh
  231.                    db '   * SUBSTANCE *  ', 0feh
  232.                    db '     * TATE *     ', 0feh
  233.                    db '  * TRITON *      ', 0feh
  234.                    db 0ffh
  235.                    db ' * URINATE *      ', 0feh
  236.                    db '   * VLA *        ', 0feh
  237.                    db '                  ', 0feh
  238.                    db 'SPECIAL BLESSINGS ', 0feh
  239.                    db '   TO MEGGIE J.   ', 0feh
  240.                    db 0ffh
  241.                    db ' ELYSIUM XMAS ''96 ', 0feh
  242.                    db '                  ', 0feh
  243.                    db '   CODE : EXODUS  ', 0feh
  244.                    db '  MUSIC : BIZARE  ', 0feh
  245.                    db '                  ', 0feh
  246.                    db 0ffh
  247.                    db '       NOW        ', 0feh
  248.                    db '    GO AND GET    ', 0feh
  249.                    db '  YOUR PRESENTS!  ', 0feh
  250.                    db '                  ', 0feh
  251.                    db ' (C) 1996 ELYSIUM ', 0feh
  252.                    db 0ffh, 0
  253. font_pos           dw ?
  254. Font_data          ends
  255. ;───────────────────────────────────────────────────────────────────────────────
  256.  
  257.  
  258. ;───────────────────────────────────────────────────────────────────────────────
  259. Module_data        segment para use16
  260. module:            include inc\music.dat
  261. Module_data        ends
  262. ;───────────────────────────────────────────────────────────────────────────────
  263.  
  264.  
  265. ;───────────────────────────────────────────────────────────────────────────────
  266. Landscape_data     segment para use16
  267.  
  268. landscape:         include inc\landscap.dat
  269. line_buffer:       dd 20 dup (?)
  270.  
  271. Landscape_data     ends
  272. ;───────────────────────────────────────────────────────────────────────────────
  273.  
  274.  
  275. ;───────────────────────────────────────────────────────────────────────────────
  276. Stars_data         segment para use16
  277. stars:             dw Stars_nbr dup (?)
  278. Stars_data         ends
  279. ;───────────────────────────────────────────────────────────────────────────────
  280.  
  281.  
  282. ;───────────────────────────────────────────────────────────────────────────────
  283. Screen_data        segment para use16
  284. virt_scrn:         dd 14400 dup (?)
  285. Screen_data        ends
  286. ;───────────────────────────────────────────────────────────────────────────────
  287.  
  288.  
  289. ;───────────────────────────────────────────────────────────────────────────────
  290. MyStack            segment para stack
  291.                    db 200h dup (?)
  292. MyStack            ends
  293. ;───────────────────────────────────────────────────────────────────────────────
  294.                    end start16