Click here to Skip to main content
15,306,376 members
Please Sign up or sign in to vote.
1.57/5 (4 votes)
I'm trying to write to a 8086 (assembly language) code for a simple calculator but i can't seem to start.

I was just introduced to programming two days ago

What I have tried:

i haven't tried anything yet. I was introduced to programming just 3 days ago
Updated 8-May-21 0:54am

I was just introduced to programming two days ago

Learning programming with assembler is probably the hardest way to do so.
And programming a calculator is not a task for second day programming.

My guess is that you are learning programming.
You have to know that you can do pretty much anything in any language, simply some languages are harder for beginners because there is more pitfalls to handle.
You need to master a set of techniques that are the basis of the job and are not linked to a language.

- Start with an easy/safe language: VB, Java, C#, not C or C++. I do not recommend to start with Python either because of the usage of indentation.
- Read documentation / Follow tutorials (a lot of them)
- Start with tiny/useless projects, the purpose is to learn programming, not doing something useful.
- Start with console mode programs (no fancy graphics, no mouse)
- Learn debugger (an incredible learning tool)
Debugger - Wikipedia, the free encyclopedia[^]
Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[^]
- A problem ? Google is your friend.
- Learn one or more analyze methods, E.W. Djikstra/N. Wirth Stepwize Refinement/top-Down method is a good start.
Structured Programming.pdf[^][^][^][^][^]
Program Development by Stepwise Refinement[^]
- Learn Algorithms and Data-Structures.
GitHub - The-Art-of-Computer-Programming-Books: "Everyday life is like programming, I guess. If you love something you can put beauty into it." ? Donald E. Knuth[^]
Skiena The Algorithm Design Manual
- Learn Boole algebra
- Learn SQL
- Learn Databases design and Administration
Introduction to database design[^]
1NF, 2NF, 3NF and BCNF in Database Normalization | DBMS Tutorial | Studytonight[^]
- Learn Regular Expressions

Interesting link: Learn to Program[^]
CodersLegacy - Imparting knowledge to the Future[^]

There is no shortcut to knowledge, no one can learn for you, you are the only one that can do it.
Remember the exercises and little projects are not here to make something useful, they are here to teach you programming.

My most important part is probably: Learn one or more analyze methods.
Hi, welcome to the programming world.

You're an optimist, and that is OK. However you will need a lot of knowledge: language, methodology, application domain, ...

I doubt assembly (any CPU) nowadays is a good choice for your first coding steps; it requires you to be utmost meticulous, and that you are not (your description, just three sentences, contains a big inconsistency). On the slightest mistake, assembly code just crashes.

A higher-level language, such as C or Java or C#, would be a much better choice, as there are far less minute details you must get right all the time; yes, these languages my be more complex, but then you don't need to know all of it to get started, and the compilers will try and keep you on track towards code that actually runs. Be warned, no compiler or assembler can ensure your code does what you intended it to do.

I would recommend a short stay in C, and then a switch to either Java or C#, both of which will force object orientation on you. You shouldn't start coding on your own, either get a course, or study a book. I recommend you own and study a book on the language, preferably a wooden tree book, so you can easily browse it, make anotations, etc.

Whatever language you choose, a calculator is not something you will create successfully in the first months of your learning process. Have you any idea how to create a user interface, with a numeric display, a bunch of buttons, etc ?

Maybe it would be a good idea to read some of the articles CodeProject holds, e.g. Maya Calender Calculator[^]

Happy studying!


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900