home *** CD-ROM | disk | FTP | other *** search
/ PC World 1999 October / PCWorld_1999-10_cd1.bin / Novinky / expert / INTRO4K / DEATH.ZIP / viagra.asm < prev    next >
Assembly Source File  |  1999-08-23  |  8KB  |  271 lines

  1. .386
  2. cra segment use16
  3. assume es:cra,cs:cra,ss:cra,ds:cra
  4. org 100h
  5. all:
  6.  
  7.  mov  al,13h
  8.  int  10h
  9.  push 0A000h
  10.  pop  es
  11.  push 0040h
  12.  pop  fs
  13.  mov  al,0
  14.  mov  bx,0038h
  15.  call @setpal        ;paleta
  16.  mov  al,0Fh
  17.  xor  bx,bx
  18.  call @setpal        ;paleta
  19.  mov  dx,030Fh
  20.  call @gotoxy
  21.  mov  dx,offset intro1
  22.  call @print
  23.  mov  dx,070Bh
  24.  call @gotoxy
  25.  mov  dx,offset intro3
  26.  call @print
  27.  mov  dx,0908h
  28.  call @gotoxy
  29.  mov  dx,offset intro4
  30.  call @print
  31.  mov  dx,0E0Dh
  32.  call @gotoxy
  33.  mov  dx,offset intro5
  34.  call @print
  35.  mov  cx,30h
  36.  call @wait        ;ceka
  37.  mov  dx,050Dh
  38.  call @gotoxy
  39.  mov  dx,offset intro2
  40.  call @print
  41.  mov  cx,50h
  42.  call @wait        ;ceka
  43.  mov  cx,32000
  44.  xor  ax,ax
  45.  mov  di,ax
  46.  rep  stosw
  47.  
  48.  mov  di,4BE4h
  49.  mov  si,offset datas
  50.  call @LoadBitmap    ;bitmapa
  51.  mov  cl,28h
  52.  call @wait        ;ceka
  53.  mov  dx,050Ah
  54.  call @gotoxy
  55.  mov  dx,offset msg1
  56.  call @print        ;"I'm fading"
  57.  mov  dx,060Ah
  58.  call @gotoxy
  59.  mov  dx,offset msg2
  60.  call @print        ;"like a flower"
  61.  mov  cl,38h
  62.  call @wait        ;ceka
  63.  mov  dx,050Ah
  64.  call @gotoxy
  65.  mov  dx,offset msg3
  66.  call @print        ;"I'd like more"
  67.  mov  dx,060Ah
  68.  call @gotoxy
  69.  mov  dx,offset msg4
  70.  call @print        ;"I'm able to"
  71.  mov  cl,38h
  72.  call @wait        ;ceka
  73.  mov  di,3200h
  74.  mov  ch,14h
  75.  xor  al,al
  76.  rep  stosb
  77.  mov  cl,18h
  78.  call @wait        ;ceka
  79.  mov  scrw,04Dh
  80.  mov  nextLn,0F3h
  81.  mov  di,23574
  82.  mov  si,offset ruka
  83.  call @LoadBitmap    ;bitmapa
  84.  mov  cl,12h
  85.  call @wait        ;ceka
  86.  mov  byte ptr es:[24465],0
  87.  mov  cl,14h
  88.  call @wait        ;ceka
  89.  mov  scrw,0A9h
  90.  mov  nextLn,097h
  91.  mov  di,4BE4h
  92.  mov  si,offset datas
  93.  call @LoadBitmap
  94.  mov  cl,40h
  95.  call @wait        ;ceka
  96.  mov  di,153+100*320
  97.  mov  cl,9
  98. @erekce:
  99.  push cx
  100. @erekce2:
  101.  mov  word ptr es:[di],0F0Fh
  102.  sub  di,320
  103.  loop @erekce2
  104.  inc  cx
  105.  inc  cx
  106.  call @wait
  107.  pop  cx
  108.  loop @erekce
  109.  mov  di,151+64*320 
  110.  mov  cl,2
  111. @krev:
  112.  push cx
  113.  mov  dword ptr es:[di],28042804h
  114.  add  di,319
  115.  neg  cx
  116.  add  cx,6
  117.  shl  cl,1
  118.  call @wait
  119.  pop  cx
  120.  loop @krev
  121.  mov  bh,0
  122.  mov  cl,37h
  123. @fadedown:
  124.  mov  bl,cl
  125.  mov  al,bh
  126.  call @setpal
  127.  push cx
  128.  and  cl,1
  129.  inc  cl
  130.  call @wait
  131.  pop  cx
  132.  loop @fadedown 
  133.  mov  dx,070Ch
  134.  call @gotoxy
  135.  mov  dx,offset intro6
  136.  call @print
  137.  mov  cx,30
  138.  call @wait
  139. @end:
  140.  xor  ah,ah
  141.  int  16h
  142.  mov  ah,4Ch
  143.  int  21h
  144. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  145. @LoadBitmap:
  146.  xor  bh,bh
  147.  add  di,nextLn
  148. @LoadBitmap2:
  149.  mov  cl,al
  150.  lodsb
  151.  or   al,al
  152.  jz   @LoadBitmap3
  153.  mov  cl,al
  154.  add  bh,al
  155.  mov  al,ah
  156.  rep  stosb
  157.  cmp  bh,scrw
  158.  jae  @LoadBitmap
  159.  xor  ah,0Fh
  160.  jmp  @LoadBitmap2
  161. @LoadBitmap3:
  162.  ret
  163.  
  164. @setpal:
  165. ;nastavi barve AL paletu BH+BL,BL,BL
  166.  push dx
  167.  push bx
  168.  mov  dx,3C8h
  169.  out  dx,al
  170.  inc  dx
  171.  mov  al,bl
  172.  add  al,bh
  173.  out  dx,al
  174.  mov  al,bl
  175.  out  dx,al
  176.  out  dx,al
  177.  pop  bx
  178.  pop  dx
  179.  ret
  180.  
  181. @gotoxy:
  182. ;prejde na souradnice DL,DH.
  183.  push ax
  184.  push bx
  185.  mov  ah,2
  186.  mov  bh,0
  187.  int  10h
  188.  pop  bx
  189.  pop  ax
  190.  ret
  191.  
  192. @print:
  193. ;vytiskne string na ES:DX, koncici znakem '$'
  194.  push ax
  195.  mov  ah,9
  196.  int  21h
  197.  pop  ax
  198.  ret
  199.  
  200. @wait:
  201. ;ceka CX ticku
  202.  mov  dh,fs:[006Ch]
  203. @wait2:
  204.  mov  dl,fs:[006Ch]
  205.  cmp  dl,dh
  206.  je   @wait2
  207.  loop @wait
  208.  ret
  209.  
  210. scrw    db   0A9h
  211. nextLn  dw   0097h
  212. datas    db   06Ah,00Fh,030h,063h,01Ch,02Ah,05Eh,023h,028h,05Dh,026h,026h,05Bh,029h,025h,05Ah
  213.  db   02Ah,025h,058h,02Bh,026h,059h,029h,027h,058h,028h,029h,057h,027h,02Bh,055h,01Bh
  214.  db   006h,009h,02Ah,059h,012h,00Eh,008h,028h,058h,00Fh,013h,009h,026h,058h,00Bh,019h
  215.  db   00Dh,020h,058h,006h,020h,00Ch,01Fh,07Dh,00Fh,01Dh,07Ah,012h,01Dh,079h,013h,01Dh
  216.  db   078h,015h,01Ch,077h,017h,01Bh,077h,018h,01Ah,077h,013h,001h,005h,019h,078h,011h
  217.  db   003h,005h,018h,078h,011h,004h,005h,017h,078h,010h,007h,004h,016h,078h,010h,008h
  218.  db   004h,015h,078h,00Fh,009h,005h,014h,078h,00Fh,004h,003h,004h,004h,013h,078h,00Eh
  219.  db   005h,003h,005h,005h,011h,078h,00Eh,004h,003h,007h,005h,010h,078h,00Eh,004h,003h
  220.  db   009h,004h,00Fh,077h,00Eh,005h,003h,00Ah,004h,00Eh,076h,00Eh,006h,003h,00Ah,004h
  221.  db   00Eh,075h,00Eh,006h,004h,00Bh,004h,00Dh,073h,00Eh,008h,003h,00Ch,005h,00Ch,071h
  222.  db   010h,008h,003h,00Dh,004h,00Ch,06Eh,012h,008h,003h,00Eh,004h,00Ch,069h,016h,008h
  223.  db   003h,010h,004h,00Bh,066h,017h,00Ah,003h,010h,004h,00Bh,061h,019h,00Ch,003h,011h
  224.  db   004h,00Bh,05Bh,01Dh,00Eh,003h,012h,004h,00Ah,059h,01Eh,00Eh,004h,012h,004h,00Ah
  225.  db   057h,01Eh,010h,003h,013h,005h,009h,055h,01Dh,012h,003h,015h,004h,009h,053h,01Ch
  226.  db   014h,004h,015h,004h,009h,04Eh,020h,003h,00Ch,005h,004h,017h,004h,008h,047h,00Eh
  227.  db   002h,015h,004h,015h,018h,004h,008h,040h,00Eh,00Ah,013h,003h,016h,01Ah,004h,007h
  228.  db   03Ah,00Dh,00Eh,015h,003h,016h,01Bh,006h,005h,035h,00Bh,011h,009h,001h,00Eh,002h
  229.  db   017h,01Bh,008h,004h,02Fh,00Bh,012h,009h,007h,009h,005h,017h,01Ch,001h,002h,006h
  230.  db   003h,02Ch,009h,013h,009h,004h,006h,00Ah,01Bh,01Ch,002h,002h,007h,002h,029h,008h
  231.  db   012h,009h,009h,008h,001h,022h,01Bh,002h,004h,002h,001h,001h,001h,002h,001h,026h
  232.  db   007h,012h,00Ah,00Ch,003h,002h,01Dh,005h,003h,022h,002h,001h,002h,001h,001h,001h
  233.  db   024h,006h,012h,009h,00Fh,003h,005h,00Bh,016h,003h,022h,002h,001h,002h,002h,023h
  234.  db   005h,011h,008h,013h,003h,007h,002h,001h,003h,019h,004h,028h,022h,004h,011h,007h
  235.  db   016h,003h,00Ah,003h,01Ah,003h,028h,021h,005h,00Fh,006h,018h,003h,00Bh,003h,01Bh
  236.  db   003h,027h,020h,005h,00Eh,006h,019h,004h,00Bh,003h,01Ch,003h,026h,01Fh,005h,00Eh
  237.  db   006h,01Ah,004h,00Bh,003h,01Ch,004h,025h,01Eh,005h,00Eh,005h,01Ch,003h,00Bh,004h
  238.  db   01Dh,003h,025h,01Dh,005h,00Eh,005h,01Dh,003h,00Bh,003h,01Eh,003h,025h,01Ch,006h
  239.  db   00Dh,005h,01Eh,003h,00Bh,003h,01Eh,003h,025h,01Ah,008h,00Dh,004h,01Eh,004h,00Bh
  240.  db   003h,01Eh,004h,024h,019h,009h,00Ch,004h,01Fh,003h,00Ch,003h,01Fh,003h,024h,019h
  241.  db   008h,00Dh,004h,01Fh,003h,00Ch,003h,01Fh,004h,023h,011h,00Fh,00Dh,004h,020h,003h
  242.  db   00Ch,003h,020h,003h,023h,005h,01Bh,00Dh,004h,01Fh,003h,00Ch,003h,021h,003h,023h
  243.  db   003h,01Dh,00Ch,005h,01Fh,003h,00Ch,003h,021h,003h,023h,001h,01Eh,00Bh,007h,02Eh
  244.  db   003h,021h,003h,023h,001h,01Ch,00Bh,00Ah,02Dh,003h,022h,003h,022h,002h,018h,00Ch
  245.  db   00Ch,02Dh,003h,022h,002h,023h,003h,014h,00Eh,00Dh,02Dh,003h,047h,005h,006h,013h
  246.  db   014h,02Dh,003h,047h,01Ah,017h,02Fh,003h,046h,017h,019h,030h,003h,046h,010h,01Ch
  247.  db   07Dh,00Fh,01Ah,080h,00Fh,019h,081h,00Eh,015h,086h,00Fh,011h,089h,010h,00Dh,08Ch
  248.  db   012h,009h,0h
  249. intro1    db   'Carlos is$'
  250. intro2    db   'absolutely NOT$'
  251. intro3    db   'proud to present$'
  252. intro4    db   'his 1.3 kB intro called$'
  253. intro5  db   'DEATH BY VIAGRA$'
  254. intro6    db   'THE END$'
  255. msg1    db   'Oh, I',27h,'m fading$'
  256. msg2    db   'like a flower.$'
  257. msg3    db   'Now I',27h,'d like more$'
  258. msg4    db   'I',27h,'m able to.  $'
  259. ruka    db   007h,002h,001h,00Bh,019h,00Dh,012h,004h,003h,003h,006h,020h,00Ch,011h,003h,002h
  260.  db   003h,001h,026h,00Fh,00Fh,002h,002h,028h,012h,00Fh,002h,003h,004h,002h,020h,013h
  261.  db   00Fh,001h,004h,002h,003h,020h,015h,00Eh,001h,008h,01Fh,018h,00Dh,001h,007h,01Eh
  262.  db   01Bh,00Ch,001h,007h,01Ch,018h,001h,005h,00Bh,001h,009h,018h,019h,003h,005h,00Ah
  263.  db   002h,00Ah,014h,008h,002h,011h,004h,005h,009h,003h,00Bh,010h,008h,004h,010h,007h
  264.  db   004h,008h,006h,009h,00Dh,008h,006h,010h,008h,004h,007h,009h,009h,008h,007h,009h
  265.  db   00Fh,009h,005h,006h,00Ch,007h,005h,008h,00Ah,00Fh,004h,003h,004h,004h,005h,00Eh
  266.  db   007h,001h,008h,00Ch,00Eh,005h,003h,005h,005h,003h,010h,00Ch,00Eh,00Eh,004h,003h
  267.  db   007h,005h,002h,012h,008h,010h,00Eh,004h,003h,009h,004h,001h,014h,004h,011h,00Eh
  268.  db   005h,003h,00Ah,003h,0h
  269. cra ends
  270. end all
  271.