I want to learn Assembly Language ?

In summary, the individual is interested in learning Assembly language with the goal of being able to program fluently in the language. They currently have a basic understanding of how a CPU works but want to expand their knowledge. They are looking for suggestions and resources to start learning Assembly, and have found an 8085 simulator/assembler as a potential option. They are also interested in understanding the CPU architecture and how it carries out programs, specifically for tasks like drawing and creating simple games. They are determined to learn Assembly despite its difficulty and see it as a challenge.
  • #1
l2udolph
22
0
I want to learn Assembly Langauge ... ?

Hi.

I want to learn Assembly language.

My goal is to eventually be able to program fluently in Assembly language. I know this will take a lot of work, but that's fine with me.

Currently, I know the basics of how a CPU reads strings of instructions and carries them out. But my knowledge stops there.

Do you have any suggestions for me, like, where I should start? Or good resources?

I found an 8085 simulator/assembler with some extra features as well. Here is the link:

http://8085simulator.codeplex.com/

Would that be a good assembler to start assembly programming with? Or should I go with something else, like NASM?

Thanks!
 
Technology news on Phys.org
  • #2


Why don't you learn ASM on something modern (and useful) like a PIC micro-controller. Simple boards are available for very little money and the programming environment is free.

 
Last edited by a moderator:
  • #3


Why do you want to code in assembler?

Learning assembler is actually not very difficult. The problem is to learn all the tricks you need to develop effective codes. This is a lifetime task.

I remember that an older Visual Studio C++ Version (2007 or something, don’t know if this is true for newer ones) had an inline assembler. It was very easy to use. I think this is maybe a good environment to start because you can substitute parts of your programs by your own assembler version. I had a lot of fun to compare runtimes.
 
  • #4


IMHO, (since I have been out of the business for many years), it is far preferable to learn a simple language that parses well into your native language, and find a compiler that makes it run like a scalded dog on the PCs that most of your customers can afford. When I was programming, most PCs were 286s, and the servers were 386s. That dates me (I don't care), but I could walk into a customer's place of business with a complete point-of-sale/inventory package on a floppy in my pocket. @OP, if you have a real need to learn assembly, you need to know that hardware is evolving rapidly, and it might be better to learn a higher-level language so that the developers of that language can spend their resources keeping current and you can write code that makes you a decent living. Again, just my opinion, but watch where the money goes in this business. Good luck, whatever you decide.
 
  • #5


I've a lot of free time at the moment over the summer, and I'm interested in understanding the CPU architecture and how it carries out programs. Or more so, how what it does actually makes the program work. An example would be, how would you code assembly to draw something, or make a simple game?

This is out of pure interest, please do not suggest learning a different language. When I plan on writing full programs for a living or to make tools, I will learn a higher level language. But for now, I just want to learn assembly.
 
  • #6


l2udolph said:
I've a lot of free time at the moment over the summer, and I'm interested in understanding the CPU architecture and how it carries out programs. Or more so, how what it does actually makes the program work. An example would be, how would you code assembly to draw something, or make a simple game?

This is out of pure interest, please do not suggest learning a different language. When I plan on writing full programs for a living or to make tools, I will learn a higher level language. But for now, I just want to learn assembly.

At even a very modest degree of complexity, games and drawing things are VERY difficult to do in assembly language.

Most such programs rely on a huge body of existing subroutines and operating system functions, none of which are available to you when you try to do it all yourself in assembly.

Now, that being said, I DO encourage you to learn assembly because I think people who have never programmed in assembly don't really understand computers at a fundamental level.

I always think of higher level languages as big pillows that stand between you and the CPU. You can do a HUGE amount of really interesting things when you learn how to play with the pillow but sometimes when things go wrong you have not a clue what to do because you don't know what's behind the pillow.

As for what to use these days, I can't help you with that since I no longer do assembly.
 
  • #7


phinds said:
At even a very modest degree of complexity, games and drawing things are VERY difficult to do in assembly language.

Most such programs rely on a huge body of existing subroutines and operating system functions, none of which are available to you when you try to do it all yourself in assembly.

Now, that being said, I DO encourage you to learn assembly because I think people who have never programmed in assembly don't really understand computers at a fundamental level.

I always think of higher level languages as big pillows that stand between you and the CPU. You can do a HUGE amount of really interesting things when you learn how to play with the pillow but sometimes when things go wrong you have not a clue what to do because you don't know what's behind the pillow.

As for what to use these days, I can't help you with that since I no longer do assembly.

I know it will be extremely difficult, but I like challenges. :)
Thank you.
 
  • #8


l2udolph said:
I've a lot of free time at the moment over the summer, and I'm interested in understanding the CPU architecture and how it carries out programs. Or more so, how what it does actually makes the program work. An example would be, how would you code assembly to draw something, or make a simple game?

This is out of pure interest, please do not suggest learning a different language. When I plan on writing full programs for a living or to make tools, I will learn a higher level language. But for now, I just want to learn assembly.

Like most things in life you must learn to crawl before walking and running unless you want to crash into the ground. Things like graphics and games involve much higher concepts than CPU architecture (where learning ASM is useful for low-level drivers and direct manipulation of hardware in software functions that high level languages could call. Sure, you could code it all in assembly but in anything other than a small ASM project you find that you have created a defacto high level language specification for all the modules and data interfaces anyway as data flow abstraction becomes more important than procedural abstraction when dealing with objects in games or graphics instead of just crunching numbers.

Like other have said, learning ASM is important if you really want to understand the limits of programming and how things work.

PS: The 8080/5 was fairly easy processor to learn as it had a limited instruction set. I built several machines (graphic display processors) and wrote a lot of Z80 8080/5 code long ago and still have few prototypes in the junk box.
http://myplace.frontier.com/~zoneminder/sitebuildercontent/sitebuilderpictures/ht_pictures_012.jpg
 
Last edited:
  • #9


nsaspook said:
Like most things in life you must learn to crawl before walking and running unless you want to crash into the ground. Things like graphics and games involve much higher concepts than CPU architecture (where learning ASM is useful for low-level drivers and direct manipulation of hardware in software functions that high level languages could call. Sure, you could code it all in assembly but in anything other than a small ASM project you find that you have created a defacto high level language specification for all the modules and data interfaces anyway as data flow abstraction becomes more important than procedural abstraction when dealing with objects instead of just crunching numbers.

So where should I start? What resources and assembler should I use?
 
  • #10


l2udolph said:
I've a lot of free time at the moment over the summer, and I'm interested in understanding the CPU architecture and how it carries out programs. Or more so, how what it does actually makes the program work. An example would be, how would you code assembly to draw something, or make a simple game?

This is out of pure interest, please do not suggest learning a different language. When I plan on writing full programs for a living or to make tools, I will learn a higher level language. But for now, I just want to learn assembly.

Wow that sounds very ambitious. Are you able to make simple games in higher level languages? No offense, but if not forget your plans. You will have absolutely no chance. Sorry but I am not really sure if you exactly know what you are actually talking about.

Maybe stupid questions from my side: Are nowadays games still coded in pure assembler?

However, good luck with your plans.
 
  • #11


Is this a good site to start learning?

http://cs.smith.edu/~thiebaut/ArtOfAssembly/artofasm.html
 
Last edited by a moderator:
  • #12


l2udolph said:
Is this a good site to start learning?

http://cs.smith.edu/~thiebaut/ArtOfAssembly/artofasm.html

The "Art of Assembly Language" is a good text for basic concepts but the "inelegant" x86 machine architecture would never be my first choice for a beginner to learn assembly.
 
Last edited by a moderator:
  • #13


nsaspook said:
The "Art of Assembly Language" is a good text for basic concepts but the "inelegant" x86 machine architecture would never be my first choice for a beginner to learn assembly.

What would you suggest, then?
 
  • #14


The nicest and best CPU of all time: Motorola 68000
 
  • #15


X86 should be good enough for learning assembly. You can think of it as an extension of the 8080 instruction set with some registers renamed (register pair renaming: HL => BX, BC => CX, DE => DX). LAHF and SAHF instructions on the X86 are mainly used to help translate 8080 assembly code to X86 assembly code.

If you have windows, Visual C/C++ express (free) includes an assembler, but doesn't provide a default build step for running the assembler. After adding an assembler source file to a project, right click on the name of the source file in the project and add a custom build step to do the assembly. For debug build it looks like this:

ml /Zi /c /Fo$(outdir)\example.obj example.asm

For release build it looks like this:

ml /c /Fo$(outdir)\example.obj example.asm

In both cases, "outputs" of the custom build step looks like this:

$(outdir)\example.obj

To create a project, start with a directory that only includes the .asm source file. Make that the project name, and create an empty win32 console project. The option for creating an "empty" project shows up on the second screen when creating the project. Once the project is created, go to project, add existing item, and click on the .asm file name to add it. Then create the custom build step as show above.
 
Last edited:

Related to I want to learn Assembly Language ?

What is Assembly Language?

Assembly Language is a low-level programming language that is used to directly communicate with a computer's hardware. It is made up of simple instructions that are written in mnemonic codes and then translated into machine code by an assembler.

Why should I learn Assembly Language?

Learning Assembly Language can give you a better understanding of how a computer works at the hardware level. It can also help you write more efficient and optimized code, as well as gain a deeper understanding of other programming languages.

Is Assembly Language difficult to learn?

Assembly Language can be challenging to learn, as it requires a strong understanding of computer architecture and binary code. However, with practice and dedication, it can be a rewarding skill to acquire.

What are the basic components of Assembly Language?

The basic components of Assembly Language include instructions, registers, memory addresses, and data. Instructions are the commands that tell the computer what to do, registers are temporary storage locations, memory addresses specify where data is stored, and data is the information being processed.

What are some resources for learning Assembly Language?

There are many resources available for learning Assembly Language, including online tutorials, books, and community forums. Some popular books include "Assembly Language Step-by-Step" by Jeff Duntemann and "Assembly Language for x86 Processors" by Kip Irvine. Online resources such as NASM and MASM also offer tutorials and documentation for learning Assembly Language.

Similar threads

  • Programming and Computer Science
Replies
16
Views
2K
  • Programming and Computer Science
4
Replies
122
Views
13K
  • Programming and Computer Science
12
Replies
397
Views
14K
  • Computing and Technology
Replies
9
Views
1K
  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
Replies
8
Views
901
  • Programming and Computer Science
Replies
5
Views
3K
  • Programming and Computer Science
Replies
4
Views
15K
  • Programming and Computer Science
Replies
5
Views
4K
  • Programming and Computer Science
2
Replies
60
Views
16K
Back
Top