문제

The Irvine procedure gives always the same output.

What would be a better way to get random numbers each time the program executed?

TITLE Program Template    (Template.asm)


INCLUDE Irvine32.inc


.data


.code
main PROC


mov eax, 6
call RandomRange 
call writeint


    exit    
main ENDP



END main
도움이 되었습니까?

해결책

I have learned that I needed to use randomize function before using randomrange function. The code should be like:

.
.
call randomize
mov eax, 6
call RandomRange 
call writeint
.
.

for example.

Thank you all who read the question.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top