flat assembler
Message board for the users of flat assembler.

Index > Linux > 1st program

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
phenix



Joined: 08 Feb 2009
Posts: 9
phenix 17 Feb 2009, 15:49
Thanks for any help.
I downlloaded the FASM assembler and ran it.
Have no idea where it is on my Puter.
Have no idea how to get an executable module.
Where the question marks are I don't understand the instruction.
Am running Ubuntu.
Really I need a book like FASM for Dummies.

; 1st fasm program 2-17-09 (put the letter A to the screen)

; Compile with:
; fasm fasmjps.asm A1stprog.o

format ELF executable
entry start

segment readable executable ; ???????

start:
mov eax,4 ; sys-write
mov ebx,1 ; unsigned int ??????
mov ecx,msg ; item to screen
mov edx,msg_size ; size of item
int 0x80 ; call the interrupt

mov eax,1 ; sys-exit
xor ebx,ebx ; unsigned int ??????
int 0x80

segment readable writeable ; ???????

msg db 'A',0xA
msg_size = $-msg
Post 17 Feb 2009, 15:49
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20591
Location: In your JS exploiting you and your system
revolution 17 Feb 2009, 18:36
  • segment is just something to tell the OS what type of page permissions to set for the page.
  • unsigned int is a way of interpreting the contents of the register. Unsigned means no negative values. 32 bit can store up to ~4 billion.
Post 17 Feb 2009, 18:36
View user's profile Send private message Visit poster's website Reply with quote
phenix



Joined: 08 Feb 2009
Posts: 9
phenix 17 Feb 2009, 23:01
Thought I had FASM uncompressed but I didn't. So that's fixed now.
It's in places/home/jack/fasm. Whether this is correct or not I have no idea.
Any way I can't compile my little program.
I keep on seeing references to a command line. Where the devil is that?????
Is that the only way to compile the program?? Something that should takes minutes to figure
out is now taking many hours. Ridiculous.
Post 17 Feb 2009, 23:01
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20591
Location: In your JS exploiting you and your system
revolution 18 Feb 2009, 01:52
The fasm IDE is only for Windows. In Linux you will have to use the command line version.
Post 18 Feb 2009, 01:52
View user's profile Send private message Visit poster's website Reply with quote
phenix



Joined: 08 Feb 2009
Posts: 9
phenix 18 Feb 2009, 14:07
Thank you Revolution for responding.
As far as I can tell I am using the correct version of FASM
Fasm Assemnbler 1.67.32 for Linux

Still can't compile a simple program.
What is the "Command Line"?
I guess It looks like I'll have to find a more compatible Assembler in Linux.
Things just DON'T need to be this evasive.

2% Ubuntu working on 3%
Post 18 Feb 2009, 14:07
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20591
Location: In your JS exploiting you and your system
revolution 18 Feb 2009, 14:11
It is a *nix thing. Many a program will need the command prompt (the shell) to run things.
Post 18 Feb 2009, 14:11
View user's profile Send private message Visit poster's website Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 215
Location: Budapest, Hungary
Endre 18 Feb 2009, 16:11
Command line is:
Code:
fasm fasmjps.asm    
or (if fasm is not added to the PATH environment variable)
Code:
/home/jack/fasm/fasm fasmjps.asm    
Since you defined your program to be an ELF executable, thus fasm won't generate object file A1stprog.o but only the bare executable that will have the name fasmjps.
Post 18 Feb 2009, 16:11
View user's profile Send private message Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu 18 Feb 2009, 16:18
revolution wrote:
It is a *nix thing.
Really? I thought all OSs had them. Does windows even have a way to ping without using a command line?
Post 18 Feb 2009, 16:18
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20591
Location: In your JS exploiting you and your system
revolution 18 Feb 2009, 16:25
Azu wrote:
revolution wrote:
It is a *nix thing.
Really? I thought all OSs had them. Does windows even have a way to ping without using a command line?
Sure, but only the *nix OSes seem to rely on the user knowing how to use it.
Post 18 Feb 2009, 16:25
View user's profile Send private message Visit poster's website Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu 18 Feb 2009, 16:29
revolution wrote:
Azu wrote:
revolution wrote:
It is a *nix thing.
Really? I thought all OSs had them. Does windows even have a way to ping without using a command line?
Sure, but only the *nix OSes seem to rely on the user knowing how to use it.
Really? I didn't know it was the OS' fault that the creators of a third party program decided not to make a GUI for it.

Several useful programs that are built into windows don't have GUIs.


So aren't command lines more a windows thing then a *nix thing?



Ew wtf got this when I tried to post
Quote:
phpBB : Critical Error

Could not connect to the database
tried again and it worked fine..
Post 18 Feb 2009, 16:29
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20591
Location: In your JS exploiting you and your system
revolution 18 Feb 2009, 16:32
I was not trying to blame the OS, but the fasm executable for *nix requires the user to know the command line. Just a statement of fact.
Post 18 Feb 2009, 16:32
View user's profile Send private message Visit poster's website Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu 18 Feb 2009, 16:37
Oh. Sorry. I thought when you said "It is a *nix thing" you meant the command line. I'll try to read more carefully before replying next time.
Post 18 Feb 2009, 16:37
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20591
Location: In your JS exploiting you and your system
revolution 18 Feb 2009, 16:40
Both DOS and Windows have working IDEs, *nix does not. That is all I meant.
Post 18 Feb 2009, 16:40
View user's profile Send private message Visit poster's website Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu 18 Feb 2009, 16:43
What are these? I don't understand.
Post 18 Feb 2009, 16:43
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20591
Location: In your JS exploiting you and your system
revolution 18 Feb 2009, 16:49
None of them got fasm. It would be great one could be adapted for fasm, then users like phenix would find it easier to get started.
Post 18 Feb 2009, 16:49
View user's profile Send private message Visit poster's website Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu 18 Feb 2009, 17:56
What needs to be changed in *nix to let fasm have a GUI?
Post 18 Feb 2009, 17:56
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20591
Location: In your JS exploiting you and your system
revolution 18 Feb 2009, 18:25
Nothing to change in the OS, just to get an IDE for fasm working.
Post 18 Feb 2009, 18:25
View user's profile Send private message Visit poster's website Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu 18 Feb 2009, 18:32
Oh. So it's nothing to do with *nix? We just need to find who maintains fasm and ask him to make a GUI version?
Post 18 Feb 2009, 18:32
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20591
Location: In your JS exploiting you and your system
revolution 18 Feb 2009, 18:49
Azu wrote:
We just need to find who maintains fasm and ask him to make a GUI version?
Well that information is a the bottom of every page on this website.
Post 18 Feb 2009, 18:49
View user's profile Send private message Visit poster's website Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu 18 Feb 2009, 19:14
That's what I thought, but then it wouldn't be a *nix thing..
Post 18 Feb 2009, 19:14
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.