Advertisement
BlueBear

"Bathroom Acid on Tiles" source code - my first 256byte prod

May 14th, 2016
433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;   Bathroom Acid on Tiles
  2. ;   by Citrus
  3. ;   Aberration Creations
  4. ;   QBParty 256byte intro category
  5. ;   2016
  6.  
  7. ;   Greetings to:
  8. ;   Conspiracy, Mercury, Rebels
  9. ;   Fresh!Mindworkz, Umlaut Design
  10. ;   Digital Dynamite, Logicoma
  11. ;   Outracks, Satori, Decree
  12.  
  13. ;   How to run it:
  14. ;   You need to download NASM and DOSBox
  15. ;   You can get it run with the commands below:
  16. ;   nasm asmfilename.asm -o outfile.com
  17. ;   dosbox outfile.com
  18.  
  19.     org 100h
  20.     mov ax, 13h
  21.     int 10h
  22.  
  23.     %define rectx raw + 0
  24.     %define recty raw + 2
  25.     %define rectw raw + 4
  26.     %define recth raw + 6
  27.     %define color raw + 8
  28.     %define frame raw + 10
  29.  
  30.     xor ax, ax
  31.     mov [frame], ax
  32.     mov [color], ax
  33.  
  34. runforevermotherfucker:
  35.  
  36.     push 08000h
  37.     pop es
  38.  
  39.     mov di, [frame]
  40.     mov cx, 200
  41.     effecty:
  42.         push cx            
  43.         mov dx, cx     
  44.         add dx, [frame]
  45.         mov cx, 320        
  46.         effectx:
  47.             mov ax, dx
  48.             xor ax, cx
  49.             stosb
  50.         loop effectx
  51.         pop cx
  52.     loop effecty
  53.  
  54.     xor di, di
  55.  
  56.     mov si, data
  57.     mov cx, 8
  58.    
  59.     shadowforloop:
  60.         mov word [color], 16h
  61.         xor ax, ax
  62.         lodsb
  63.         add ax, 45
  64.         mov word [rectx],   ax
  65.         xor ax, ax
  66.         lodsb
  67.         add ax, 5
  68.         mov word [recty],   ax
  69.         xor ax, ax
  70.         lodsb
  71.         mov word [rectw],   ax
  72.         lodsb
  73.         mov word [recth],   ax
  74.         push cx
  75.         call drawRectangle
  76.         pop cx
  77.     loop shadowforloop
  78.  
  79.     mov si, data
  80.     mov cx, 8
  81.     logoforloop:
  82.         mov word [color], 0eh
  83.         xor ax, ax
  84.         lodsb
  85.         add ax, 35
  86.         mov word [rectx],   ax
  87.         xor ax, ax
  88.         lodsb
  89.         mov word [recty],   ax
  90.         lodsb
  91.         mov word [rectw],   ax
  92.         lodsb
  93.         mov word [recth],   ax
  94.         push cx
  95.         call drawRectangle
  96.         pop cx
  97.     loop logoforloop
  98.  
  99.     push ds
  100.     push es
  101.     pop ds
  102.     push 0a000h
  103.     pop es
  104.     xor si, si
  105.     xor di, di
  106.     ;xor cx, cx
  107.     mov cx, 320*200
  108.     rep movsb
  109.    
  110.     pop ds
  111.     inc word [frame]
  112.  
  113.     ; escape on exit
  114.     in al, 60h
  115.     cmp al, 1
  116.     jnz runforevermotherfucker
  117.     ret
  118.    
  119. data:
  120.     db 73,17,73,10,73,17,25,76,73,73,50,20,130,17,18,100,173,17,25,100,173,100,75,17,208,43,40,20,230,63,18,40
  121.     db "CitrusBrCr"
  122.  
  123. drawRectangle:
  124.     mov bx, [recty]
  125.     imul bx, 320
  126.  
  127.     mov cx, [recth]
  128.     yloop:
  129.         push cx
  130.         mov di, bx
  131.         add di, [rectx]
  132.        
  133.         mov ax, [recth]
  134.         sub ax, cx
  135.         add ax, [recty]
  136.         shr ax, 1
  137.         sub di, ax
  138.  
  139.         mov al, [color]
  140.  
  141.         mov cx, [rectw]
  142.         rep stosb
  143.  
  144.         pop cx
  145.         add bx, 320
  146.     loop yloop
  147.     ret
  148.  
  149. raw:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement