# Assembly Language help

Discussion in 'Homework Help' started by Usman Arshad, Sep 23, 2014.

Sep 23, 2014
2
0
Well i am new to this class and new to this site. I was actually looking through Google for help with my homework assignment. I barley know how to use ARM SIM, but I know java and C++ pretty well. My assignment is

• Open a file named "integers.dat" and keep track of the following information.
• the first integer value
• the number of integers greater than this value
• the integer with the greatest value
• Output the three pieces of information to the console (stdout)
• For example, if "integers.dat" contains the integers "13 27 39 11 2 23 39 13 90 3" I would expect "13 5 90" to be the result

P.S I obviously dont expect anyone to do this for me, however i would love to learn the concept behind this. Like how would i input these value, and how would i find the most common number, how i find how many numbers are bigger than it, and what the largest number it, and how to output these values. If someone could give me a small example I can probably figure it out from there. Please note this is my first ever assignment in this language, so we havent learned much. We have learned for loops (in assembly language), addition, subtraction, multiplication, and division.and moving values... The thing is the teacher didnt teach us how to use armsim he just taught us how to use the code, so i dont know how to run, and all either. I have been trying to figure things out using the internet.

2. ### LDC3 Active Member

Apr 27, 2013
920
160
What a tall assignment.
Does he expects you to write routines to open a disk file and read it in, or did he provide a library of standard IO functions?

Sep 23, 2014
2
0
He doesnt expect us to open a disk file and read it, but he said he will be testing the values given, also he does expect us to do test cases so he might use all 0's and the numbers should work, or there might be a negative. Is it really a long assignment ? He said we should be able to finish it in an hour! :/

4. ### LDC3 Active Member

Apr 27, 2013
920
160
If you don't have to mess with the IO, then it shouldn't be too hard.
To start with, I would assign memory locations to the variables needed.
Number of Integers
First Integer
Number Greater than First
Maximum Integer
- there are probably a few more