Created
November 24, 2012 07:15
-
-
Save tuttlem/4138762 to your computer and use it in GitHub Desktop.
Smoke - main program
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
.model small | |
.stack 100h | |
.code | |
start: | |
mov ax, 0013h ; set 320x200x256 mode | |
int 10h | |
mov ax, 0a000h ; we can't directly address ES so | |
mov es, ax ; we do so through AX. ES = A000 | |
call setup_palette ; setup a palette with greyscale | |
; to support the smoke effect | |
no_kbhit: | |
call randomize_lines ; draw some random pixels | |
call bloom ; average out the video buffer | |
mov ah, 01h ; test for a key press | |
int 16h | |
jz no_kbhit ; continue running if no key was hit | |
mov ax, 0003h ; set text mode | |
int 10h | |
mov ax, 4c00h ; return control back to dos | |
int 21h | |
; -- subroutines removed for brevity | |
end start | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment