Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in ARM assembly using ARMSim# to perform the following tasks: 1. Open a file named integers.dat and keep track of the following

Write a program in ARM assembly using ARMSim# to perform the following tasks:

1. Open a file named "integers.dat" and keep track of the following information:

a. The first integer value is (i)

b. The ith integer value is (j)

c. Count the total number of integers in the file

d. Count the number of integers that are less than j

e. Count how many even numbers are less than j

f.And how many odd numbers are less than j

2. Output the six pieces of information to the console (stdout), For example, if "integers.dat" contains the integers "4 -447 10 198 0 569 -34 986 547 4"

I would expect the following result as an output:

a. Integer (i) = 4

b. Integer (j) = 198

c. Total integers = 10

d. Integers < (j) = 6

e. Even < (j) = 5

f. Odd < (j) = 1

r0,r1,r2 reserved @

r4 used for holding number of ints less than j @

r5 used for holding total count of integers. @

r6 used for storing j= int[i] @

r7 used for storing first int (i) @

r8 used for signaling first int received @

r9 used for file handle @

r10 used to holding total even integers < j

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

What is the history of this situation?

Answered: 1 week ago