Write an assembly program In MASM assembler to calculate the sum of odd numbers only...
80.2K
Verified Solution
Link Copied!
Question
Programming
Write an assembly program In MASM assembler to calculate the sum of odd numbers only stored in a 16-bit integers array.The size of the array is provided in a separate variable. Use the following design:
Sum = 0 FOR i = 0 TO SizeOfArray - 1 Â Â Â IF Arr[i] % 2 = 1 Â Â Â Â Â Â Â Â Â Sum = Sum +Arr[i] Â Â Â END IF END FOR
Answer & Explanation
Solved by verified expert
3.7 Ratings (518 Votes)
Assume that the array starts from the memory Location 500 size of array 5 and the RESULT SUM IS stored at location 0 So We will add the numbers at locations 501
See Answer
Get Answers to Unlimited Questions
Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!
Membership Benefits:
Unlimited Question Access with detailed Answers
Zin AI - 3 Million Words
10 Dall-E 3 Images
20 Plot Generations
Conversation with Dialogue Memory
No Ads, Ever!
Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!