I want to learn Assembly Language ?

AI Thread Summary
To learn Assembly language effectively, starting with a simulator like the 8085 or using NASM is recommended, depending on personal preference. While some suggest modern platforms like PIC microcontrollers for practical applications, others emphasize the importance of understanding CPU architecture and low-level programming. Learning Assembly can be challenging, especially for complex tasks like graphics or game development, which typically rely on higher-level abstractions and existing libraries. Resources such as "The Art of Assembly Language" are suggested, though some caution against using x86 architecture for beginners due to its complexity. Visual Studio C++ can also be utilized for inline assembly, providing a familiar environment for those already acquainted with C/C++. Ultimately, a solid grasp of Assembly enhances understanding of computer fundamentals, despite the steep learning curve.
l2udolph
Messages
22
Reaction score
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


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:


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.
 


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.
 


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.
 


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.
 


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.
 


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:


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:
Back
Top