Question
HCS 12 Microprocessor, CodeWarrior An array of 25 bytes is stored as a constant array given as array shown previously. Once constant is required called
HCS 12 Microprocessor, CodeWarrior
An array of 25 bytes is stored as a constant array given as array shown previously. Once constant is
required called evenodd. If evenodd = 0, then only the even numbers must be added together for the
entire array. . If evenodd = 1, then only the odd numbers must be added together for the entire array.
The sum is reported in the variable called result.
Hint: use the sign extension (sex B,D) instruction to sign extend accumulator B into accumulator D to
make this assignment much easier.
Be sure to jump around the data, so that the microprocessor does not try to execute the data!
[ Value | 12 | 8| 18 | 3 6 | 99 | 5| 23 | 180 -89 | 44 | 31 | 54 | 10 | 83 | 33 | 51 | | 100 | 19 | 98 | 98 | 32 | 98 |-1| | index lol1|2|3|4|5|6|7| 8| 9| 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 23 | 24 ] [ Value | 12 | 8| 18 | 3 6 | 99 | 5| 23 | 180 -89 | 44 | 31 | 54 | 10 | 83 | 33 | 51 | | 100 | 19 | 98 | 98 | 32 | 98 |-1| | index lol1|2|3|4|5|6|7| 8| 9| 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 23 | 24 ]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