Hi Guys!
can any one explain to me what the following code will do?

	
        movl %esp, %ebp
subl $20, %esp
call rand
movl %eax, %ecx
movl $1717986919, -24(%ebp)
movl -24(%ebp), %eax
imull %ecx
sarl $5, %edx
movl %ecx, %eax
sarl $31, %eax
movl %edx, %ebx
subl %eax, %ebx
movl %ebx, %eax
movl %eax, -12(%ebp)
movl -12(%ebp), %edx
movl %edx, %eax
sall $2, %eax
addl %edx, %eax
sall $4, %eax
movl %ecx, %edx
subl %eax, %edx
movl %edx, %eax
movl %eax, -12(%ebp)
movl    %eax,x1
call rand
movl %eax, %ecx
movl $715827883, -24(%ebp)
movl -24(%ebp), %eax
imull %ecx
sarl $2, %edx
movl %ecx, %eax
sarl $31, %eax
movl %edx, %ebx
subl %eax, %ebx
movl %ebx, %eax
movl %eax, -8(%ebp)
movl -8(%ebp), %edx
movl %edx, %eax
addl %eax, %eax
addl %edx, %eax
sall $3, %eax
movl %ecx, %edx
subl %eax, %edx
movl %edx, %eax
movl %eax, -8(%ebp)
movl    %eax,y1


BR,

Ewa
Posted on 2011-11-29 10:16:57 by me_newbie
Since you didn't write it ( you'd know what it does if you did ) the questions back at you are:
1) where did you obtain it from?
2) why do you care what it does?
Posted on 2011-11-29 10:44:21 by p1ranha
Hi !
i got it from internet and it generates two random numbers which i need, so is it enough to tell you?

BR,

Ewa
Posted on 2011-11-29 10:48:42 by me_newbie
Hi !

or if someone know the easy way to generating two random numbers in the reason between 80 * 25

i need two values one x-axis and other for y-axis but in the range
Posted on 2011-11-29 11:10:23 by me_newbie
Why not just use rand() to get your two values???
See this simple article: http://www.cprogramming.com/tutorial/random.html
Posted on 2011-11-29 11:21:38 by p1ranha