flat assembler
Message board for the users of flat assembler.

Index > Linux > New to the (64-bit) Linux World

Author
Thread Post new topic Reply to topic
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 06 Nov 2007, 22:54
Hi everyone,
After a year of using my computer, a few days ago I discovered that I have a 64-bit processor Shocked, no information on the computer labels indicated this, so I happily used my computer in 32-bit mode for very close to a year. After my shocking discovery, and not having any 64-bit windows os to use, I installed Ubuntu 7.10-Linux 64-bit OS, hoping to try out some 64-bit assembly programming using fasm. I've already downloaded the fasm package and have it in my "documents" folder. but when I run the terminal program and change to fasm directory, the fasm executable wouldn't execute, It keeps giving me an "command not found" error message. Can any one help me out here? (by the way, I'm making my first post on this forum using Ubuntu Linux! Very Happy )
Post 06 Nov 2007, 22:54
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 06 Nov 2007, 23:07
erm, just to be sure... did you type "./fasm" instead of just "fasm"? second one searches in "/bin" directory
Post 06 Nov 2007, 23:07
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 06 Nov 2007, 23:31
Thanks vid! That worked. but I copied hello64.asm/hello64.exe to the main fasm directory and tried to compile it and gave me a "source file not found", how could that be? Confused
Post 06 Nov 2007, 23:31
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 07 Nov 2007, 00:19
if you have both FASM executable and source (hello64.asm) in current directory, then it should be simply:

Code:
./fasm hello64.asm    


just like in WinXP cmd.exe, you can use TAB key in console to finish path to file - this way you can check if path to file is okay
Post 07 Nov 2007, 00:19
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 07 Nov 2007, 00:22
And remember to add execution permission to the file (chmod +x exe-file).
Post 07 Nov 2007, 00:22
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 07 Nov 2007, 00:59
Thanks Vid and Locodelassembly, I've got everything to compile now. Does anybody have any 64-bit assembly examples of making a window? Wink I'm using the gnome interface.
Post 07 Nov 2007, 00:59
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 07 Nov 2007, 01:19
Yes, Feryno provided some http://flatassembler.net/examples/fasm_amd64_linux64_samples.tar.gz

Bazik provided some examples for GTK http://flatassembler.net/examples/gtk-examples.tar.gz , but these ones are for 32-bit.
Post 07 Nov 2007, 01:19
View user's profile Send private message Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf 07 Nov 2007, 06:17
Post 07 Nov 2007, 06:17
View user's profile Send private message MSN Messenger Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 07 Nov 2007, 14:08
Thanks.
Post 07 Nov 2007, 14:08
View user's profile Send private message Reply with quote
nocona



Joined: 04 Aug 2007
Posts: 35
nocona 08 Nov 2007, 05:39
also if you want to execute fasm instead of ./fasm, you can add "." (single dot) to your PATH environment variable (e.g PATH="${PATH}:.") which means adds the current directory to the PATH environment variable.
Post 08 Nov 2007, 05:39
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder 08 Nov 2007, 12:18
nocona wrote:
also if you want to execute fasm instead of ./fasm, you can add "." (single dot) to your PATH environment variable (e.g PATH="${PATH}:.") which means adds the current directory to the PATH environment variable.


I wouldn't suggest doing that, it's pretty bad practice.

_________________
Image - carpe noctem
Post 08 Nov 2007, 12:18
View user's profile Send private message Visit poster's website Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf 08 Nov 2007, 14:17
Well mainly for the reason that if you want to execute fasm instead of ./fasm you can't unless you reset the PATH variable.
Post 08 Nov 2007, 14:17
View user's profile Send private message MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 08 Nov 2007, 14:21
wouldn't it be better to copy "fasm" to "bin\", instead of hacks like this?
Post 08 Nov 2007, 14:21
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 09 Nov 2007, 00:33
vid wrote:
wouldn't it be better to copy "fasm" to "bin\", instead of hacks like this?


So anything that is command line only, copy it to the bin directory and you won't have to type the './'? Confused Cool
Post 09 Nov 2007, 00:33
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 09 Nov 2007, 01:26
yeah, on unix like systems, "everything has it's place", and "/bin" is place for executable binaries. Not just command line, all binaries.

in fact, there are more such directories, for different types of executable binaries: /bin, /sbin, /usr/bin, ...
Post 09 Nov 2007, 01:26
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 09 Nov 2007, 02:51
Check the Filesystem Hierarchy Standard for deep info about this.
Post 09 Nov 2007, 02:51
View user's profile Send private message Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf 09 Nov 2007, 09:32
That's what makes unix based operating systems so nice -> its much more structured than windows.
Post 09 Nov 2007, 09:32
View user's profile Send private message MSN Messenger Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder 09 Nov 2007, 12:29
Raedwulf wrote:
That's what makes unix based operating systems so nice -> its much more structured than windows.


Until you look at different distros...

_________________
Image - carpe noctem
Post 09 Nov 2007, 12:29
View user's profile Send private message Visit poster's website Reply with quote
nocona



Joined: 04 Aug 2007
Posts: 35
nocona 11 Nov 2007, 04:05
Quote:

wouldn't it be better to copy "fasm" to "bin\", instead of hacks like this?

it just for convinience.. when i was new to linux, i tend to forget to type "./" in front of any program in my project dir. but anyway, the key here is the "PATH" environment variable.. if you have any non-standard place where you want to put your binaries, add them to the PATH variable. Windows has it also.
Post 11 Nov 2007, 04:05
View user's profile Send private message 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-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.