;ÜÜ                   Ü
;ßßß STEALTH GROUP WW Û Mail:   BOX 15, 125080 MOSCOW   ÛÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛÛ ÛßßÛ
;ßÛÛ ßßßßßßßßßßßßßßßß Û ßßßßßßßßßßßßßßßßßß ß ßßßßÞßßß   ÚÄ¿Â ÂÚÄ´Â Â Ò Â¿Ú ÛÜÜÛ
; ÞÛ ÛßÜ Ûßß Üßß Üßß ÜÛÜ Üßß ÛßÛ   Ý Û ÜßÛ Û Üßß ÛÜÜ    ÃÂÙ³ ³ÀÄ¿ÃÄ´   ³À´ Ü  Û
;  Û Û Û Ûß  Ûß  Û    Û  Ûß  Û Û   Û Û Û Û Û Û   Û      ÁÀÄÀÄÙÀÄÙÁ Á   Á Á ßßßß
;  Û Þ Þ Þ   ÞÜÜ ÞÜÜ  Þ  ÞÜÜ ÞÜß    ßÛ ßÜÛ Þ ÞÜÜ ÞÜÜÜ   ÛÛÛÛ  WINTER ' 96  ÛÛÛÛ
;  Þ ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ   ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ

; „¥¬® íää¥ªâ ¢¨àãá  (rucifiction. ‚ë¤à ­ ¨§ ¨áå®¤­¨ª .

.model tiny
.code
.radix 16
org 100
start:

 mov ah,09
 mov dx,offset MyMsg
 int 21

 mov ah,08
 int 21
 jmp CrucifixionActivation

 MyMsg db 'Demo effect of (rucifiction Virus (C)Jesus/The Trinity',0dh,0a
       db 'Mail to: SGWW, Box 15, Moscow 125080  for viruses and more...',0dh,0a
       db 0dh,0a
       db 'Press any key to enjoy...','$'

;-------------------------------

 CrucifixionActivation:
 SetScreen:
    mov     ax,13
    int     10

    push    cs cs
    pop     es ds

 SetColors:
    mov     ax,1012
    xor     bx,bx
    mov     cx,08
    mov     dx,offset ColorData
    int     10

 DoTitle:
    mov     dx,09
    call    setcurs
    mov     si,offset Vname
    call    WriteIt
    mov     dx,0103
    call    setcurs
    mov     si,offset credits
    call    writeit

 SetupPic:
    push    cs
    pop     ds
    mov     si,offset StartCross
    mov     di,0a000    
    mov     es,di
    
    mov     di,3640
    call    DrawIt

 GetKey:
    call    DoMusic

 DoneGraphics:
    mov     ax,3
    int     10

    call    Speaker_On
    mov     cx,100
 FallingSound:
    mov     ax,cx
    call    Out_Sound
    call    delay
    add     cx,200
    cmp     cx,1a00
    jb      FallingSound
    call    Turn_Off_Speaker

 RestoreStack:
    ret

 DrawIT:
    mov     bp,di
 DrawLoop:
    lodsb
    cmp     al,0ff
    je      Line
    cmp     al,0
    je      Eol
    stosb
    jmp     DrawLoop
 Line:
    lodsb           ;get color
    xchg    cx,ax   ;save in cl
    xor     ah,ah   ;zero ah
    lodsb           ;get line length
    xchg    cx,ax   ;put color in al and length into cx
    repnz   stosb
    jmp     DrawLoop
 Eol:
    cmp     byte ptr [si],0
    je      DoneDraw
    mov     di,bp
    add     di,320d
    jmp     Drawit
    
 DoneDraw:
    ret

 WriteIt:
    lodsb
    or      al,al
    jz      DoneWrite
    mov     bx,4
    mov     ah,0e
    int     10
    jmp     WriteIt
 DoneWrite:
    ret

 setcurs:
    mov     ah,02
    mov     bh,0        ;Set cursor
    int     10
    ret


 IfYourThe:
    push    si
    mov     si,offset Lyrics1
  DoLyric:    
    mov     dx,1001
    call    setcurs
    call    WriteIt
    pop     si
    jmp     PlayMusic

 ClapYour:
    push    si
    mov     si,offset Lyrics2
    jmp     DoLyric

 YourFace:
    push    si
    mov     si,offset Lyrics3
    jmp     DoLyric


 DoMusic:    
    push    cs
    pop     ds
    mov     si,offset MusicData
 PlayMusic:
    lodsw
    cmp     ax,0
    je      DoneMusic
    cmp     ax,1
    je      TurnItOn
    cmp     ax,2
    je      TurnItOff
    cmp     ax,-1
    je      WaitSome
    cmp     ax,-2
    je      Scree
    cmp     ax,3
    je      IfYourThe
    cmp     ax,4
    je      CLapYour
    cmp     ax,5
    je      YourFace
    cmp     ax,6
    je      TheClap
    call    Out_Sound    
    jmp     PlayMusic

 DoneMusic:
    ret

 TurnItOn:
    call    Speaker_On
    jmp     PlayMusic
 TurnItOff:
    call    Turn_Off_Speaker
    jmp     PlayMusic
 WaitSome:
    mov     cx,3
  WaitMore:
    call    delay
    loop    WaitMore
    jmp     PlayMusic


 TheClap:
    push    es ds si di
    mov     si,offset Arms3
    je      DoArms3


  Scree:
    push    es ds si di

 DoArms2:
    mov     si,offset Arms2
  DoArms3:   
    mov     di,0a000    
    mov     es,di
    mov     di,3640+320d*10d
    call    DrawIt


    call    Speaker_On

    mov     cx,400
    cmp     si,offset Arms3
    ja      MakeScreech
    mov     cx,8000
 MakeScreech:    
    mov     ax,cx
    call    Out_Sound
    call    delay
    sub     cx,3f
    cmp     si,offset Arms3
    ja      LowCheck
    cmp     cx,7f00
    ja      MakeScreech
    call    Turn_Off_Speaker
    jmp     short DoArms1
 LowCheck:
    cmp     cx,300
    ja      MakeScreech
    call    Turn_Off_Speaker

 DoArms1:
    mov     si,offset Arms1
    mov     di,0a000    
    mov     es,di
    mov     di,3640+320d*10d
    call    DrawIt
    
    pop     di si ds es
    jmp     PlayMusic

 delay:
    push    ax ds
    xor     ax,ax
    mov     ds,ax
    mov     ax,word ptr ds:[46c]
 waiter:
    cmp     ax,word ptr ds:[46c]
    je      waiter
    pop     ds ax
    ret

 Turn_Off_Speaker:
                in      al,61h
                and     al,0FCh
                out     61h,al
                ret
                
 Speaker_On:
                in      al,61h
                or      al,3
                out     61h,al                  ;Turn on speaker
                mov     al,0B6h
                out     43h,al                  
                ret
 Out_Sound:
                out     42h,al
                mov     al,ah
                out     42h,al
                ret


 ColorData:
 db 0,0,0,32,1f,13,1bh,12,9,12,0e,6,19,0,0,2a,1a,10,0,13,0,0,0,18


;Picture Data
; 0ff marks line, 0 marks eol                    
;
;   Line Format:
;       0ffh, color, length
;
;double 0 marks eof

 St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,5,5,5,3,0
 db 3,5,4,3,4,0ff,5,7,0ff,1,7,2,2,2,1,1,1,2,2,2,0ff,1,7,0ff,5,6,4,3,4,5,0
 db 3,3,5,4,5,0ff,1,15d,2,2,1,1,1,2,2,0ff,1,14d,5,4,5,3,0
 db 3,3,3,0ff,5,17d,0ff,1,7,0ff,5,16d,3,3,0,0
 EndArms1:
 
 Arms2:
 db 3,3,3,3,0ff,3,13d,5,5,2,2,2,1,1,1,2,2,2,5,5,0ff,3,12d,3,3,3,0
 db 3,3,3,5,5,0ff,3,7,0ff,5,6,1,2,2,2,1,1,1,2,2,2,1,0ff,5,6,0ff,3,6,5,3,3,3,0
 db 3,3,3,5,4,0ff,5,7,0ff,1,7,2,2,2,1,1,1,2,2,2,0ff,1,7,0ff,5,6,4,5,3,3,0
 db 3,3,3,5,5,0ff,1,15d,2,2,1,1,1,2,2,0ff,1,14d,5,5,3,3,0
 db 3,3,3,0ff,5,17d,0ff,1,7,0ff,5,16d,3,3,0,0
 EndArms2:

 Arms3:
 db 3,3,3,3,0ff,3,13d,5,5,2,2,2,1,1,1,2,2,2,5,5,0ff,3,12d,3,3,3,0
 db 3,3,3,3,3,0ff,3,7,0ff,5,6,1,2,2,2,1,1,1,2,2,2,1,0ff,5,6,0ff,3,6,3,3,3,3,0
 db 3,3,3,3,3,0ff,5,7,0ff,5,7,2,2,2,5,5,5,2,2,2,0ff,5,7,0ff,5,6,3,3,3,3,0
 db 3,3,3,3,3,3,3,3,0ff,5,12d,2,2,4,4,4,2,2,0ff,5,12d,3,3,3,3,3,3,0
 db 3,3,3,0ff,3,10d,0ff,5,10d,4,4,0ff,5,10d,0ff,3,0a,0,0
 EndArms3:



;Music Data
; 1 = Turn On Speaker   2 = Turn Off Speaker
;-1 = Pause            -2 = Screech 
; 0 = End of data
;
; 3 = lyrics #1
; 4 = lyrics #2
; 5 = lyrics #3
; 6 = final clap
;Most other numbers taken as data for outputting to Timer
;
 MusicData:

;If you're the messiah and you know it
 dw  3
 dw  1,1473d,-1,2,1,1473d,-1,2,1,1084d,-1,2,1,1084d,-1,2,1,1084d,-1,2
 dw  1,1084d,-1,2,1,1084d,-1,2,1,1084d,-1,2
 
;clap your hands
 dw  4
 dw  1,1193d,-1,2,1,1084d,-1,2,1,994d,-1,2

;Scree! Scree!
 dw  -1,-2,-1,-2,-1

;If you're the messiah and you know it
 dw  3
 dw  1,1473d,-1,2,1,1473d,-1,2,1,994d,-1,2,1,994d,-1,2,1,994d,-1,2
 dw  1,994d,-1,2,1,994d,-1,2,1,994d,-1,2

;clap your hands
 dw  4
 dw  1,1084d,-1,2,1,994d,-1,2,1,883d,-1,2

;Scree! Scree!
 dw -1,-2,-1,-2,-1

;If you're the messiah and you know it
 dw  3
 dw  1,1084d,-1,2,1,883d,-1,2,1,822d,-1,2,1,822d,-1,2,1,822d,-1,2
 dw  1,883d,-1,2,1,1325d,-1,2,1,1325d,-1,2

;Then your face will surely show it
 dw  5
 dw  1,822d,-1,2,1,994d,-1,2,1,883d,-1,2,1,883d,-1,2,1,883d,-1,2
 dw  1,994d,-1,2,1,1084d,-1,2,1,1084d,-1,2

;If you're the messiah and you know it
 dw  3
 dw  1,1084d,-1,2,1,883d,-1,2
 dw  1,994d,-1,2,1,994d,-1,2,1,994d,-1,2,1,1084d,-1,2,1,1193d,-1,2
 dw  1,1193d,-1,2

;clap your hands
 dw  4
 dw  1,1325d,-1,2,1,1193d,-1,2,1,1084d,-1,2
 
;Scree! Scree!
 dw -1,6,-1,6,-1,0

 Lyrics1 db 'If you''re the Messiah and you know it,',0
 Lyrics2 db '           Clap your hands!           ',0
 Lyrics3 db '  Then your face will surely show it, ',0

 Vname      db  '(rucifixion Virus 1.0',0
 Credits    db  '(c) 1994, by Jesus of The Trinity',0

 Attribs     dw  0
 TimeDate    dw  0,0

 MyStack     dw  40 dup(0)      ;dunno if this is needed, but it don't
                                ;crash no more....
 endCruc: 
end start