Okay so I know C++, C#, Java and some other languages and I decided to learn assembly next but I feel like I've hit a solid brick wall right from the start. I just need someone to point me in the right direction.
Here are the questions:
I've been told that it's better to learn assembly from the internet than from books because assembly depends on your hardware and books are mostly outdated. Is that true?
I've got a 64 bit CPU and I'm using (or at least trying to use) FASM. Where do I find the necessary documentation?
I'm totaly confused because most of the tutorials I've seen don't even work for me. Is that because of the hardware differences? How do I find the right tutorials?
Can I run x86 and x32 assembly on my 64 bit computer?
Could you please be so kind and write me a simple program in assembly (that works on my PC) with a breakdown in the comments? I'm running 64 bit Windows 10 on my intel core i5 CPU. Please.
For years, PC programmers used x86 assembly to write performance-critical code. However, 32- bit PCs are being replaced with 64-bit ones, and the underlying assembly code has changed. This Gem is an introduction to x64 assembly.
Yes - the primary reason to learn assembly for C and C++ developers is it helps understanding what's going on under the hood of C and C++ code.
Assembly is hard to read and understand. Of course, it's very easy to write impossible-to-read assembly language programs. It's also quite easy to write impossible-to-read C, Prolog, and APL programs. With experience, you will find assembly as easy to read as other languages.
I think this is a valid question. It can be a bit hard to find up to date information on assembler.
Yes. A lot of resources printed and online describe i386 (x86) assembler and not the new amd64 (x86_64). Many things have changed, e.g. function arguments used to be passed on the stack but now they are passed in registers. This applies both to Unix and Windows.
Basically, ensure you are reading about 64-bit assembly.
Why not try the online manual. Note that assemblers are not that different when it comes to simple stuff.
I don't have Windows but if you are having trouble with any specific program, you could ask about it here. You will need to post the actual failing program.
Yes but you have to link it against 32-bit libraries and use the 32-bit version of the Win32 API. But if you're starting out, why program in the 1980's when you can work with the modern instruction set?
Try this.
Also, if you are going to be programming in assembly, I strongly recommend you get a debugger. I use GDB which works well and is free, on Windows you get to use the Visual Studio debugger which is superb.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With