include irvine32.inc
sub2 proto  a:ptr dword,l1:dword
.data
i dword 10 dup(?);
str1 byte "开始初始化的值:",0;
.code
main proc

mov edx,offset str1;
call writestring
invoke sub2 ,offset i,lengthof i;
call crlf;

mov esi,offset i;
mov ecx,lengthof i;
mov ebx,dword;
call dumpmem;

exit
main endp

sub2 proc,
      a:PTR dword,
      l2:dword
    mov esi, a;
    call randomize;
    mov ecx,l2

L1:
    mov eax,1000;
    call randomrange
    mov [esi],eax;
    add esi,4;
    call writehex;
    mov al,',';
    call writechar;
      Loop L1;


     ret
sub2 endp

end main

posted on 2013-02-25 19:11  叶城宇  阅读(254)  评论(0编辑  收藏  举报