Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a procedure that fills an array of doublewords with N random integers, making sure the values fall within the range j...k, inclusive. When calling

Create a procedure that fills an array of doublewords with N random integers, making sure the values fall within the range j...k, inclusive. When calling the procedure, pass a pointer to the array that will hold the data, pass N, and pass the values of j and K. Preserve all register values between calls to the procedure. Write a test program that calls the procedure twice, using different value for J and K. Verify your result using a debugger.

The following are the instructions. Please help me fill this out

INCLUDE Irvine32.inc

.data

intArray sdword 50 DUP(?) ; Declare an integer array

count DWORD 0 ; initialize a counter

.code

main PROC

; call Randomize from Irvine32.inc

; point to the array

; length of into ecx

; set the lower limit (j)

; set the upper limit (k)

; Call your function fillWithRandom

; move 5 into ebx

; move upper limit (50) into eax

; Call your function again

exit

main ENDP

fillWithRandom proc

; Input parameters:

; ESI points to the array, ECX is the size

; EBX = lower base, EAX = upper limit

; use pushad

; calculate interval size

; increment eax

; save the interval size start of Loop 1

; generates value (0 to EAX-1) Call RandomRange

; add it to the base

; move eax into the esi array

; pop eax

; move 4 into esi

; Loop back to L1

; popad

; ret

fillWithRandom endp

END main

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Successful Keyword Searching Initiating Research On Popular Topics Using Electronic Databases

Authors: Randall MacDonald, Susan MacDonald

1st Edition

0313306761, 978-0313306761

More Books

Students also viewed these Databases questions

Question

e.9., 12.34.3

Answered: 1 week ago

Question

Explain the process of MBO

Answered: 1 week ago

Question

why we face Listening Challenges?

Answered: 1 week ago

Question

what is Listening in Context?

Answered: 1 week ago