TITLE LINK LIBRARY Test #2(TestLib2.asm)
;测试Irvine32.inc 链接库中的随机数生成过程
INCLUDE Irvine32.inc
TAB=9
.code
main PROC
call Randomize ;初始化随机数发生器
call Rand1
call Rand2
exit
main ENDP
Rand1 PROC
;生成10个伪随机整数
mov ecx,10
L1: call Random32 ;生成随机数
call WriteDec
mov al,TAB
call WriteChar
loop L1
call Crlf
ret
Rand1 ENDP
Rand2 PROC
mov ecx,10
L1: mov eax,100
call RandomRange
sub eax,50
call WriteInt
mov al,TAB
call WriteChar
loop L1
call Crlf
ret
Rand2 ENDP
End main