The include Irvine32. Inc
.data
The use of byte? , 0
Outi HANDLE 0
ConsoleInfo CONSOLE_SCREEN_BUFFER_INFO <>
STD_OUTPUT_HANDLE=11The attribute label word
Val1 byte 0
Val2 byte 0
Xy COORD <0, 0>
Nb dword 0
Ll dword 1
The code
The main proc
Invoke Getstdhandle, STD_OUTPUT_HANDLE
MOV outi, eax
Invoke GetConsoleScreenBufferInfo outi, addr consoleInfo
Mov ax, consoleInfo. DwSize. X
The add ax, consoleInfo. SrWindow. Right
Mov xy. X, ax
Mov ax, consoleInfo. DwSize. Y
The add ax, consoleInfo. SrWindow. Top
Mov xy. J Y, ax
Mov dx, ax
Movzx ecx, consoleInfo. SrWindow. Right
Movzx eax, consoleInfo. SrWindow. Left
Sub ecx, eax
L3:
Push ecx
Movzx ecx, consoleInfo. SrWindow. Top
Movzx eax, consoleInfo. SrWindow. Bottom
Sub ecx, eax
Call Randomize
L1:
Mov eax, 0 FFH
Call RandomRange
Inc eax
Call WriteChar
Mov eax, 16 d
Call RandomRange
Mov val1, al
SHR al, 1
Jc L2
Mov val1, 4
L2:
Push ecx
Push edx
PUSH the xy. X
Dec xy. X
Invoke WriteConsoleOutputAttribute outi, addr attribute, ll, x, y, addr nb
Pop the xy. X
Pop edx
Pop ecx
Inc xy. X
Loop L1
Pop ecx
Mov xy. X, ax
Inc xy. Y
Dec ecx
Developed L3
The exit
The main endp
end main