OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 16, 2024 4:13 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Where are good places to learn Assembly?
PostPosted: Sun Apr 09, 2017 1:01 pm 
Offline

Joined: Sun Apr 09, 2017 12:58 pm
Posts: 13
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.


Top
 Profile  
 
 Post subject: Re: Where are good places to learn Assembly?
PostPosted: Sun Apr 09, 2017 1:33 pm 
Offline
Member
Member
User avatar

Joined: Fri Feb 17, 2017 4:01 pm
Posts: 642
Location: Ukraine, Bachmut
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).


Top
 Profile  
 
 Post subject: Re: Where are good places to learn Assembly?
PostPosted: Mon Apr 10, 2017 5:19 am 
Offline
Member
Member
User avatar

Joined: Thu Jul 12, 2012 7:29 am
Posts: 723
Location: Tallinn, Estonia
Timmy100 wrote:
Sup guys. I want to learn Assembly.


http://asmtutor.com ?

_________________
Learn to read.


Top
 Profile  
 
 Post subject: Re: Where are good places to learn Assembly?
PostPosted: Mon Apr 10, 2017 6:36 am 
Offline

Joined: Sun Apr 09, 2017 12:58 pm
Posts: 13
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?


Top
 Profile  
 
 Post subject: Re: Where are good places to learn Assembly?
PostPosted: Mon Apr 10, 2017 11:03 am 
Offline
Member
Member
User avatar

Joined: Thu Jul 12, 2012 7:29 am
Posts: 723
Location: Tallinn, Estonia
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.


Top
 Profile  
 
 Post subject: Re: Where are good places to learn Assembly?
PostPosted: Tue Apr 11, 2017 2:13 pm 
Offline
Member
Member
User avatar

Joined: Fri Jan 27, 2017 12:15 pm
Posts: 149
Location: Belgium
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.

_________________
AQUA OS: https://obiwac.wordpress.com/aqua-os/


Top
 Profile  
 
 Post subject: Re: Where are good places to learn Assembly?
PostPosted: Tue Apr 11, 2017 11:59 pm 
Offline
Member
Member

Joined: Wed Sep 19, 2012 3:43 am
Posts: 91
Location: The Netherlands
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.


Top
 Profile  
 
 Post subject: Re: Where are good places to learn Assembly?
PostPosted: Wed Apr 12, 2017 3:32 am 
Offline
Member
Member
User avatar

Joined: Thu Jul 12, 2012 7:29 am
Posts: 723
Location: Tallinn, Estonia
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.


Top
 Profile  
 
 Post subject: Re: Where are good places to learn Assembly?
PostPosted: Fri Apr 14, 2017 9:15 am 
Offline

Joined: Fri Mar 17, 2017 9:37 pm
Posts: 22
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:
[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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 920 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group