Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assembly language program. Generate random numbers. Using the random _range proc

ID: 3820009 • Letter: A

Question

Assembly language program. Generate random numbers. Using the random _range procedure from yhe link library, generate 20 pseudorandom numbers in the range 0-100. Store the number in an array variable and display the number. Plz separate the . Data section and . Code section thanks Assembly language program. Generate random numbers. Using the random _range procedure from yhe link library, generate 20 pseudorandom numbers in the range 0-100. Store the number in an array variable and display the number. Plz separate the . Data section and . Code section thanks

Explanation / Answer

INCLUDE Irvine32.inc j equ 0 k equ 100 n =20 .data arrayd sdword n dup(?) .code main proc call randomize ;activate the seed mov ecx,n mov esi,0 L1: ;the trick is the 3 instruction lines shown below mov eax,k+j call randomrange sub eax,j
mov arrayd[esi*4],eax inc esi loop L1 mov ecx,n mov esi,0 L2: mov eax,arrayd[esi*4] call writeInt mov al,20h call writechar inc esi loop L2 exit main endp end main
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote