Created
November 24, 2012 07:30
-
-
Save tuttlem/4138788 to your computer and use it in GitHub Desktop.
Smoke - random
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
randomize_lines: | |
mov cx, 640 ; we're going to set two rows of pixels | |
; at the bottom of the screen to be | |
; random colours, so that's 640 pixels | |
mov di, 63360 ; we're going to start writing these | |
; pixels on the last two lines so that's | |
; 64000 - 640 | |
next_rand_pixel: | |
mov dx, 40h ; we get quasi-random values from port 40h | |
in al, dx | |
stosb ; store the pixel on screen | |
dec cx ; move onto the next pixel | |
jnz next_rand_pixel | |
ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment