In: Computer Science
Write a program that displays a single character at 100 random screen locations, using a timing delay of 100 milliseconds.
Hint: Use the GetMaxXY procedure to determine the current size of the console window.
How to code this program with a defined character 'A' (I do not want to write a character to get a single character in the output console)
INCLUDE Irvine32.inc
.data
rows WORD ?
cols WORD ?
.code
main PROC
call Clrscr
mov ecx, 100
L1:
call
GetMaxXY
mov rows,
ax
mov cols,
dx
movzx eax,
rows
call
RandomRange
mov dh, al
movzx eax,
cols
call
RandomRange
mov dl, al
call
Gotoxy ; locate cursor
mov al,'H'
call
WriteChar
mov
eax,100
call Delay
Loop L1
call WaitMsg
exit
main ENDP
END main