Where are good places to learn Assembly?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Timmy100
Posts: 13
Joined: Sun Apr 09, 2017 12:58 pm

Where are good places to learn Assembly?

Post by Timmy100 »

Sup guys. I want to learn Assembly. I know Java, C, HTML, CSS, JavaScript, some PHP and Bootstrap. Where are good places that explain things well and have examples?

Anything would be good.

Cheers,
Timmy.
User avatar
zaval
Member
Member
Posts: 659
Joined: Fri Feb 17, 2017 4:01 pm
Location: Ukraine, Bachmut
Contact:

Re: Where are good places to learn Assembly?

Post by zaval »

Timmy100 wrote:Sup guys. I want to learn Assembly. I know Java, C, HTML, CSS, JavaScript, some PHP and Bootstrap. Where are good places that explain things well and have examples?

Anything would be good.

Cheers,
Timmy.
if you know that, then you are almost done with assembly. :D kidding, they are not related garbage for assembly programming.
Anything would be good, but the best thing is you know - Technical Reference Manuals. If you are going to learn x86 assembly, then Intel's manuals are your best friends. People adore digging into and messing around them. This slipslop is catchy, once you open it, you'll never be the same as before. You will forget CSS but become an assembly b4d455 c0d3r. 8)
Personally, I was and am learning assembly languages exactly that way. You just read carefully about what an instrcution does and what it doesn't and gradually you are getting needed knowledge.
And don't listen to those, who tell you you don't need assembly at all. If you want to learn it, do it. Wish you success.
ANT - NT-like OS for x64 and arm64.
efify - UEFI for a couple of boards (mips and arm). suspended due to lost of all the target park boards (russians destroyed our town).
User avatar
dozniak
Member
Member
Posts: 723
Joined: Thu Jul 12, 2012 7:29 am
Location: Tallinn, Estonia

Re: Where are good places to learn Assembly?

Post by dozniak »

Timmy100 wrote:Sup guys. I want to learn Assembly.
http://asmtutor.com ?
Learn to read.
Timmy100
Posts: 13
Joined: Sun Apr 09, 2017 12:58 pm

Re: Where are good places to learn Assembly?

Post by Timmy100 »

Thank you. By the way, that website looks like Bootstrap. Anyway, the manuals are just too much. Is there something that will teach me barebones Assembly?
User avatar
dozniak
Member
Member
Posts: 723
Joined: Thu Jul 12, 2012 7:29 am
Location: Tallinn, Estonia

Re: Where are good places to learn Assembly?

Post by dozniak »

Timmy100 wrote:Thank you. By the way, that website looks like Bootstrap. Anyway, the manuals are just too much. Is there something that will teach me barebones Assembly?
What is "barebones Assembly"?

If you just want a list of mnemonics and what they do, use Intel Manuals. If you want a list of mnemonics for arm, use ARM ARM. If you do want a list of mnemonics for other CPU architecture, google the corresponding manual (e.g. MSP420 instruction set description is provided by TI).
Learn to read.
User avatar
obiwac
Member
Member
Posts: 149
Joined: Fri Jan 27, 2017 12:15 pm
Libera.chat IRC: obiwac
Location: Belgium

Re: Where are good places to learn Assembly?

Post by obiwac »

What type? There are many different types of assembly language (eg. NASM, FASM, GAS, YASM, ...). I would consider NASM over the others. dozniak's reply is NASM.
FusT
Member
Member
Posts: 91
Joined: Wed Sep 19, 2012 3:43 am
Location: The Netherlands

Re: Where are good places to learn Assembly?

Post by FusT »

obiwac wrote:What type? There are many different types of assembly language (eg. NASM, FASM, GAS, YASM, ...). I would consider NASM over the others. dozniak's reply is NASM.
Those aren't types of assembly, they're syntaxes.

ASM/assembly is bound to the platform you want to develop for (IA32, ARM, etc.) so to learn "bare bones" assenbly for i.e. the Intel x86 architecture you'd read the Intel manuals, form ARM the ARM manuals, etc.
User avatar
dozniak
Member
Member
Posts: 723
Joined: Thu Jul 12, 2012 7:29 am
Location: Tallinn, Estonia

Re: Where are good places to learn Assembly?

Post by dozniak »

obiwac wrote:What type? There are many different types of assembly language (eg. NASM, FASM, GAS, YASM, ...). I would consider NASM over the others. dozniak's reply is NASM.
These are just different assembler programs. They support different syntaxes (e.g. AT&T syntax or Intel syntax) for x86/x86_64 assembly. Some assemblers also support different architectures (e.g. Intel x86 or ARM).

It doesn't matter much as long as you know the mnemonics and corresponding machine code it produces.
Learn to read.
Izzette
Posts: 22
Joined: Fri Mar 17, 2017 9:37 pm

Re: Where are good places to learn Assembly?

Post by Izzette »

I learned assembly by compiling C programs to assembly and by hanging out at https://en.wikibooks.org/wiki/Category:X86_Assembly.

You can compile C to assembly with GCC like so:

Code: Select all

[you@yourcomputer]$ gcc -O0 -fverbose-asm -S my_simple_prog.c
This will emit GAS (Gnu ASsembly) syntax assembly at my_simple_prog.s with some nice comments for your variables, and a huge comment header for the supplied and implied flags. If you choose to go the GAS route, in addition to the entire category for x86 assembly, I'd take a special look at https://en.wikibooks.org/wiki/X86_Assembly/GAS_Syntax. I've also suggested the -O0 flag, this will help keep your program operating the way you expect it to. Another way to get an idea about what your C programs compile to (without optimizations) is by debugging them with GDB and having disassemble-next-line set to on. This way you'll be able to see your C code and disassembly right next to each other. Don't forget the info registers command in GDB or to compile your C programs with -ggdb and -O0. From there it's just trial, error, and some frustrating debugging. Have fun!

Hope it helps, Izzy.
Post Reply