Question
An array called ARRAY1 has 200 longword-sized positive numbers, and is stored in memory at addresses starting from 0x00010000. The numbers are supposed to be
An array called ARRAY1 has 200 longword-sized positive numbers, and is stored in memory at addresses starting from 0x00010000. The numbers are supposed to be not larger than 10010 (100 in decimal) and not smaller than 2010 (20 in decimal). Write a program to examine each of the 200 numbers in ARRAY1 as follows. First, if a number is out of range (i.e. larger than 100 or smaller than 20 in decimal), the number is skipped, and the program is to continue to examine the next number. If a number is within the range and is an even number, it is to be included to an array that starts in memory at address 0x00020000. In other words, the first within-the-range and even number should be copied to memory locations starting from address 0x00020000, and the second withinthe-range and even number should be copied to memory locations starting from address 0x00020004, If a number is within the range and is an odd number, it is to be included to an array that starts in memory at address 0x00030000.
in memory at addresses starting from 0x00010000. The numbers are supposed to be not larger than 1001o (100 in decimal) and not smaller than 2010 (20 in decimal). Write a program to examine each of the 200 numbers in ARRAYI as follows. First, if a number is out of range (i.e. larger than 100 or smaller than 20 in decimal, the number is skipped, and the program is to continue to examine the next number. If a number is within the range and is an even number, it is to be included to an array that starts in memory at address 0x00020000. In other words, the first within-the-range and even number should be copied to memory locations starting from address 0x00020000, and the second within- the-range and even number should be copied to memory locations starting from address 0x00020004,, If a number is within the range and is an odd number, it is to be included to an array that starts in memory at address 0x00030000. in memory at addresses starting from 0x00010000. The numbers are supposed to be not larger than 1001o (100 in decimal) and not smaller than 2010 (20 in decimal). Write a program to examine each of the 200 numbers in ARRAYI as follows. First, if a number is out of range (i.e. larger than 100 or smaller than 20 in decimal, the number is skipped, and the program is to continue to examine the next number. If a number is within the range and is an even number, it is to be included to an array that starts in memory at address 0x00020000. In other words, the first within-the-range and even number should be copied to memory locations starting from address 0x00020000, and the second within- the-range and even number should be copied to memory locations starting from address 0x00020004,, If a number is within the range and is an odd number, it is to be included to an array that starts in memory at address 0x00030000
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