1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lost With Assembly Array

Discussion in 'Assembly Language Programming (ALP) Forum' started by robert12503, Nov 26, 2011.

  1. robert12503

    robert12503 New Member

    Joined:
    Nov 26, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Can someone PLEASE help me with this question, I have tried 50 variations and not one works, you can email me at robert12503@gmail.com since I may not be able to log back in to this. Question: WRITE A PROGRAM THAT DOES THE FOLLOWING:
    A. CREATES AND PRINTS OUT 100 RANDOM NUMBERS FROM -10 TO 0
    B. PUTS THEM IN AN ARRAY NAMED SOURCE
    C. PRINTS OUT SOURCE

    I CANT GET IT TO WORK HERE IS MY MOST RECENT code:

    Code:
    TITLE (Doubleloopr.asm)
    ;
    
    
    INCLUDE Irvine32.inc
    
    .data
    
    
    
    source DWORD 100 DUP (?)
    count dword 100
    
    
    .code
    main PROC
    
    mov ecx, count
    
    call randomize
    
    FillArray:
    mov eax, 11
    call randomrange
    sub eax, 10
    call writeint
    mov source, eax
    add esi, 4
    call crlf
    
    
    loop fillarray
    
    PrintArray:
    mov esi, OFFSET Source
    mov eax, [esi]
    call writeint
    add esi, 4
    mov eax, [esi]
    call writeint
    mov eax, 50
    call delay
    Loop PrintArray
    
    call dumpregs
    
    
    
    exit
    
    main ENDP
    END main
     

Share This Page