Starting from:
$30

$24

Assignment #2 Solution




Write an 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. The following pseudocode will help you get started.




randomInteger RN0

pointer RN1

counter RN2




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);

More products