.286
MODEL Tiny
CODESEG
Org 100h
FIRE:
Mov Al,13h
Int 10h
Push 0a000h
Pop Ds
@@Loop:
Mov Di, 64000 ; Starting position, the last line is drawn out
Mov Bx, 320 ; of the screen, nice trick ;)
Push Bx
@@RandomLine:
In Al, 40h ; very, very nifty (and small!) pseudorandom number
Xor Al, [Di+Bx]
And Al, 1fh
Mov [Di+Bx], Al
Dec Bx
Jnz @@RandomLine
Pop Bx
@@InnerLoop:
Mov Al, [Di+Bx] ; Get surrounding pixels...calculate average
Shl Al, 1
Add Al, [Di]
Add Al, [Di+Bx-1]
Shr Al, 2
Or Al, 16 ; Call it intuition...
Mov [Di], Al
Dec Di
Jnz @@InnerLoop
In Al, 60h
Dec Ax
Jnz @@Loop
Add Al,3h ; Ah was the whole prog 0
Int 10h
Ret
END FIRE
|