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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started