Page 1 of 1

Where are good places to learn Assembly?

Posted: Sun Apr 09, 2017 1:01 pm
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.

Re: Where are good places to learn Assembly?

Posted: Sun Apr 09, 2017 1:33 pm
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.

Re: Where are good places to learn Assembly?

Posted: Mon Apr 10, 2017 5:19 am
by dozniak
Timmy100 wrote:Sup guys. I want to learn Assembly.
http://asmtutor.com ?

Re: Where are good places to learn Assembly?

Posted: Mon Apr 10, 2017 6:36 am
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?

Re: Where are good places to learn Assembly?

Posted: Mon Apr 10, 2017 11:03 am
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).

Re: Where are good places to learn Assembly?

Posted: Tue Apr 11, 2017 2:13 pm
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.

Re: Where are good places to learn Assembly?

Posted: Tue Apr 11, 2017 11:59 pm
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.

Re: Where are good places to learn Assembly?

Posted: Wed Apr 12, 2017 3:32 am
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.

Re: Where are good places to learn Assembly?

Posted: Fri Apr 14, 2017 9:15 am
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.