Hello Pros

Programming, for all ages and all languages.
Post Reply
Jediah
Posts: 8
Joined: Mon Feb 07, 2011 11:02 pm

Hello Pros

Post by Jediah »

Hiya guys!
First i would like to say, your site is awsome.
i am a bit confused, i use ubuntu 10.10 what kinda software do i need for assembly?
and how do i do it in ubuntu?
i have some VB C# express experience.
can someone tell me how i start?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Hello Pros

Post by Solar »

Try this:

Code: Select all

$ gcc -v
If this gives you a "command not found", do this:

Code: Select all

sudo apt-get install gcc
That installs you the GCC compiler, which by default also installs binutils (i.e., linker, GNU assembler, objdump etc.). You might also want to 'sudo apt-get install make' and follow the Makefile tutorial while you're at it.

I strongly recommend stopping there, and trying your hand at generic user-space C / ASM coding for quite a while before walking the OS Dev road any further. You have to be familiar with language and toolchain before you stand a chance to find anything but frustration in kernel space.
Every good solution is obvious once you've found it.
User avatar
Jezze
Member
Member
Posts: 395
Joined: Thu Jul 26, 2007 1:53 am
Libera.chat IRC: jfu
Contact:

Re: Hello Pros

Post by Jezze »

Perhaps also depending on preferences:

Code: Select all

sudo apt-get install nasm
Fudge - Simplicity, clarity and speed.
http://github.com/Jezze/fudge/
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Hello Pros

Post by Solar »

Ah, damn. I thought I could lead an untarnished soul on the road of enlightenment. Now you've spoiled his immortal soul. 8)
Every good solution is obvious once you've found it.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Hello Pros

Post by Combuster »

I would not ever recommend Binutils/GAS for doing x86 assembly. It deviates from the official manuals enough that they become an inadequate development resource - and then I mean things like renaming opcodes for no apparent reason (and all the other sillyness even intel_syntax noprefix does not fix).

GAS is the backend for GCC, let's not use it for something it wasn't meant to do.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Re: Hello Pros

Post by quok »

And yet you must be familiar with the differences of GAS if you're going to use inline assembly at all. That, and the fact that GAS comes with Binutils, is exactly why I prefer to use GAS and not NASM. I like to keep the number of dependencies needed to build my projects to a minimum as much as possible. That's also why I'm sticking with GNU Make when there are (arguably) much better replacements out there.

Besides, AT&T syntax is the One True Syntax. Anything else amounts to heresy.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Hello Pros

Post by Combuster »

Religious issues aside, yasm works as a replacement for gas, and can do proper intel syntax. Two camps happy.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Jediah
Posts: 8
Joined: Mon Feb 07, 2011 11:02 pm

Re: Hello Pros

Post by Jediah »

Thank you all for your quick answare, you guys are awsome!
Post Reply