Perfectly learning the assembly. Orientation please

I recently decided that training assembly would be a good idea, but now I'm really stunned by all the material I read about assembly in forums, here, tutons, etc. (some of them are really old), so I would like to have some orientation in assembly language, how to “compile”, etc., I would also like it to work on my processor, so I can practice, here are my details about the processor from CPU-Z

AMD Athlon 64 3200 +

Supported instructions: MMX (+), 3DNow! (+), SSE (1, 2, 3), x86-64

Note. . If possible, I want this to be Windows oriented (does it really matter?)

Thanks in advance.

+4
source share
8 answers

I think one of the best ways to start learning assembler is to look at the result created by the compiler for a language you are familiar with. For example, if you are familiar with Visual C ++, write very simple C ++ code and use the built-in debugger to show the assembly language created by the compiler (make sure you compile with optimization). Write some simple for loops, assignment, arithmetic, etc. And look what the assembler language looks like.

For training, you do not need to know anything about the extensions to the set of instructions that you indicated in your question. All that bothers you is the x86 32-bit instructions. You can learn about 64-bit instructions, MMX, SSE, etc. Later, as soon as you have a reason in place.

Once you have a basic understanding, you will need assembler. A good, well-supported, open source general purpose assembler is nasm .

+7
source

My advice is to choose a really old 8-bit processor, such as the 8080, and use the simulator to simply get the basic concepts right in your head. Honestly, once you know one assembler, learning another is pretty easy (I know about eight or so), but the first step is the hardest.

+4
source

I would question if it’s worth going straight to x86-64 training.

As a general rule, it would be nice to start with the “simpler” RISC language (you can get emulators for many RISC processors) to give you the basics in building and then exploring more complex architectures after that if you're “still passionate”.

+1
source

You say that Windows is oriented, but the easiest way to get started is to actually do some DOS / Command programming in oldskool in the assembly. Give yourself simple assignments, such as "Write a program that prints the numbers 1 through 10 in the console" or "Write a program to read a line with text and cancel it."

+1
source

You can try reading the Crenshaw compiler tutorial . I know this is a little strange, but it creates a minimal compiler that targets the m68k assembly, so you can see how the programming concepts you are used to are expressed in very clear, relatively easy assembler.

Disadvantage: The m68k build is not very similar to the x86 build, so after completing your work you will need another round of training.

0
source

If you want to learn assembler, you need to know how the computer works. And I'm not saying that "this lib in my os is responsible for this and this." I mean hardware. How the processor is built, what is ALU, how memory works, how the program runs. This is the first step, then you can begin to study assembler, which is assembler - control of all these devices. And if you do not know how this works, you cannot control it.

I suggest you read the book on computer technology / architecture, which will save you more than 100 hours of Google and read materials that you do not understand.

And the easiest arch starting with i MIPS.

0
source

You can try looking at some of the documents created by the Rom Hacking community for simpler systems. Some of the community assembly tutorials may be a little easier to learn, as the intended audience is slightly different. Although this, of course, is not a short-term technology, it may interest you a little more after learning how older equipment works if you learn about something familiar. In addition, some emulators have graphical debugging tools that, depending on your tastes, may be easier to start than command line level debuggers. On the other hand, it is also important to consider that emulation and modification of the game are associated with dubious legality.

0
source

I have been studying assembler for 4 months in the book Randall Hyde, in the art of assembler. This is the best assembler guide I've found. You can download it from here.

0
source

Source: https://habr.com/ru/post/1299273/


All Articles