I'm new to this line of field and my teacher asked us to do a project. He asked us to do a "Simple" Assembly Program that would read two integers as input, print their sum as output, and exit. The result must be stored in register. I'm not sure where to begin and which program/tool to use. If someone can give me a help or better if you can provide a simple source code I would greatly appreciate it.
-
1You can being by starting to learn assembly and coding in it. We will not do your homework for you. It's not fun for us and it doesn't help you at all. Please read [this](http://meta.softwareengineering.stackexchange.com/questions/6166/open-letter-to-students-with-homework-problems?newreg=1216e0ad88d74ebbab12ba8299cc7e3c). – Eli Sadoff Nov 04 '16 at 17:42
-
http://stackoverflow.com/questions/7897297/adding-two-numbers-from-input – Jose Manuel Abarca Rodríguez Nov 04 '16 at 17:42
-
3yeah, not a simple first program. And before you even get to that, what instruction set is this for, since you need to make system calls to input and output, what operating system is this device using, etc. seems silly if you can do all of those things in assembly, you are well beyond the "using a register" stage – old_timer Nov 04 '16 at 17:42
-
1Looks to me like you skipped about 1-3 months worth of lessons from your teacher, as he probably mentioned some target platform, tools, and basics of Assembly language for that platform (or is this some kind of school, where they throw a task on you and then watch how you managed to cope with it on your own? Then at the moment you are not coping very well, already at SO without even deciding of your target platform and tools...). – Ped7g Nov 04 '16 at 17:46
-
Anyway, make sure you have some basic knowledge about computer architecture and how CPU/memory/etc works... for any platform... Just learning some instructions and by examples from source code can get you running fast ... and get stuck even faster. You have to not just memorize instructions, but really get idea what's happening behind it and why this stuff is called "computing" like if some calculation is going on all the time (because it is). – Ped7g Nov 04 '16 at 17:50
-
Don't expect people to do assignment for you. – RITZ XAVI Nov 04 '16 at 18:05
1 Answers
My recommendation is to contact your instructor and ask him/her for the appropriate tools to do the assignment you have been given. It is that person's responsibility to guide you through this class, and to "teach" you how to do your assignments.
It would be unwise for any of us, here, to give you advice because many universities and professors do not like it when students use tools other than the ones they are instructed to use. This is why all the way through my undergrad and even into grad school, I was required to use Notepad and a Unix C++ or Java compiler for all of my programming assignments. When I was doing Assembly or COBOL we had some other JCL compiler we were instructed to use. Now, as a professional, I can find my own tools for whatever projects I was working on, but if I had tried to use Visual Studio or Eclipse or Netbeans back in the day the professor would not have been pleased.

- 1,213
- 14
- 39
-
I don't think the professor would mind you did it by using VS, as long as you would present the result in notepad and being compilable with unix CC. That's basically how we did our assignments, checked the tools school suggested, did a research what else is available, and what differences will I hit, and then used the mix of it until result emerged, presented in a way the prof asked for. Ie. I wouldn't defer any student from exploring other tools, as long they can *also* manage the originally suggested ones. – Ped7g Nov 05 '16 at 11:50