flat assembler
Message board for the users of flat assembler.

flat assembler > Linux > How to make Linux executable?

Author
Thread Post new topic Reply to topic
Kristian_



Joined: 13 Nov 2004
Posts: 38
Hi!
How can I make linux executable? What do I need to write in org .... And when programming asm on Windows there are limitations, thats why many use Dos, does Linux has limitations too? And if Linux works in protected mode, that means I won't be able to call bios interrupts? Thank you!
Post 19 Nov 2004, 13:14
View user's profile Send private message Reply with quote
crc



Joined: 21 Jun 2003
Posts: 637
Location: Penndel, PA [USA]
1) No BIOS interrupts; you use int $80 to call the kernel syscall interface

2) No need to set the org. Start the program with this code:

Code:
format elf executable
entry main

main: ; your code after this    


3) After assembling, do chmod +x filename to make it runnable

4) All OSes have limitations; at least in Linux it's possible (not easy though) to access the raw hardware. DOS is easy to program for because it places no limits on the direct hardware access. Some limits are good though (if your Linux/Windows programs crashes, it's not likely to force you to reboot for example)

See http://linuxassembly.org for a good introduction (using NASM though) to Linux programming.
Post 19 Nov 2004, 13:31
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2018, Tomasz Grysztar.

Powered by rwasa.