PDA

View Full Version : Assembly programming resources for Ubuntu?



keantoken
May 11th, 2007, 12:16 AM
Hello.

I need some good resources (MUST be FREE and ONLINE) about programming in assembly language with Ubuntu. Here is a list of all I need:

1: How to use interrupts.

2: System call table which explains the system calls and their functions.

3: How to interface assembly with the OSS or ALSA and other resources.

4: A good assembler for linux similar to the Flat Assembler (preferably with a GUI).

I will be trying to find these myself and will edit this post (if forum rules allow) to delete the ones I've already found. Thanks for all suggestions!

- keantoken

JNowka
May 11th, 2007, 01:53 AM
I know that you can download nasm from the repos, and search google for a good nasm tutorial. I hope this helps at least a little

medya
May 11th, 2007, 04:44 AM
I installed NASM but it doestn compile the program ... it gives me plent of syntax errors !
it work fine in windows using MASM

can somebody help me?
how to compile my program so it doesnt give me syntax errors....

Siph0n
May 11th, 2007, 11:53 AM
You might want to post atleast some of your code :)

jamescox84
May 11th, 2007, 03:35 PM
That's a good point, because there are at lease two kinds of syntax for assemble language on x86 (that I can think of) and if you use the wrong one with the wrong assembler then you'll run into problems.

These are GAS and NASM. In fact most assembler have different subtleties in syntax, but GAS and NASM are the main assemblers used under Linux. Try assembling you code with GAS to see if your using GAS's syntax.



as your_source_file_here.S

Wybiral
May 11th, 2007, 05:02 PM
Basically, if you see a bunch of "$" and "%" everywhere, and some of the opcodes are postfixed with "l" or "b" it's GAS.

If not, and it's for Linux, then it's NASM.

Interrupts? Well, look for a chart of the sys_calls. The command that makes the actual system call is "int 0x80" and the sys_call is defined by the value of "eax". So if the system exit call is "1", then...


mov eax, 1
int 0x80

That will exit.
Just look for a chart on the system calls.

If you want to use ALSO and OSS, then you need a good C interface. Possibly their development files, if not, then you can write your own small wrapper to make assembly interfacing easier. Then you just need to link to those object files.

I never was much of a fan of FASM, but NASM is *close*. It doesn't have an IDE, but how much would an IDE help for assembly?

uvaraj6
December 18th, 2010, 07:56 AM
http://www.securitytube.net/Assembly-Primer-for-Hackers-(Part-1)-System-Organization-video.aspx

The best Free asm tutorial available in the Internet

keantoken
December 18th, 2010, 08:19 AM
Thanks, you must be trying to creep me out though since this thread has been dead for 2 years. :D

- keantoken

semperfried76
September 19th, 2012, 10:23 PM
Thanks, just what I was looking for! Got NASM installed on Quantal.