Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

good day, my question is that i will like you to help execute the code below in assembly language

+1 vote
asked Mar 19, 2019 by anonymous

INCLUDE Irvine32.inc
strLen=10
.data
arr BYTE strLen DUP(?)

.code
    main PROC
        call Clrscr
        mov esi, offset arr
        mov ecx, 20
        L1:
            call GenerateRandomString
        Loop L1
        call WaitMsg
        exit
    main ENDP

    GenerateRandomString PROC USES ecx   
        mov ecx, lengthOf arr
        L2:
            mov eax, 26
            call RandomRange
            add eax, 65
            mov [esi], eax
            call WriteChar        ; write character
        loop L2       
        call Crlf
        ret
    GenerateRandomString ENDP

END main

1 Answer

0 votes
answered May 17, 2019 by Ryan (1,230 points)

This is the website I used to execute your code

https://www.tutorialspoint.com/compile_assembly_online.php

-----------------------------------------------

Here are the assembler messages it left. I don't know Assembly, so I don't really know what any of this means, but....

main.asm:1: error: parser: instruction expected
main.asm:2: error: parser: instruction expected
main.asm:3: warning: label alone on a line without a colon might be in error [-w+orphan-labels]
main.asm:4: error: parser: instruction expected
main.asm:6: warning: label alone on a line without a colon might be in error [-w+orphan-labels]
main.asm:7: error: parser: instruction expected
main.asm:9: error: comma, colon, decorator or end of line expected after operand
main.asm:15: warning: label alone on a line without a colon might be in error [-w+orphan-labels]
main.asm:16: error: symbol `main' redefined
main.asm:16: error: parser: instruction expected
main.asm:18: error: parser: instruction expected
main.asm:19: error: comma, colon, decorator or end of line expected after operand
main.asm:21: error: label or instruction expected at start of line
main.asm:29: error: symbol `GenerateRandomString' redefined
main.asm:29: error: parser: instruction expected
main.asm:31: error: parser: instruction expected
ld: cannot find *.o: No such file or directory

Hope this helps!

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...