Question: Write a ARM assembly program that will generate 20 pseudo-random integers in the range 0 to 2 15 -1 and store the numbers in 20

Write a ARM assembly program that will generate 20 pseudo-random integers in the range 0 to 215-1 and store the numbers in 20 consecutive halfword locations beginning at address 0x40000000. Use the following pseudocode. Also please comment the code.

randomInteger RN 0

pointer RN 1

counter RN 2

randomInteger = any 32-bit seed value of your choosing;

pointer = 0x40000000;

counter = 20;

do {

randomInteger =(((randomInteger * 214013) + 2531011) >> 16) & 0x7FFF ;

store randomInteger in next available halfword location referenced by pointer;

adjust pointer;

--counter;

} while (counter != 0);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!