Any one using assembler, I have problem installing the files

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

Any one using assembler, I have problem installing the files

Postby bjsv » Sat Jan 14, 2006 12:37 pm

Hi. I wan't to use an assembler to make programs, but having difficulties make them work or installing. (I'm new to Linux)

I've tried many from http://webster.cs.ucr.edu/AsmTools/ that supports Linux. (HLA,NASM,FASM)

With the HLA I can't figure out the instalation process at
http://webster.cs.ucr.edu/AsmTools/HLA/ ... ml#1035885
there's something about the .bashrc file that are not the same at my comuter as in this document.

With the FASM
I read the fasm.txt(It's for dos) and do what it says:

[bjsv@062249163244 fasm]$ fasm fasm.txt
bash: fasm: command not found

[bjsv@062249163244 fasm]$ fasm '/home/bjsv/Desktop/fasm/examples/elfexe/hello.asm'
bash: fasm: command not found

The Nasm
i installed the rpm the right way I think, and found the program and type as in the http://webster.cs.ucr.edu/AsmTools/NASM ... tion-1.3.2 says

[root@062249163244 bin]# nasm -f elf myfile.asm
nasm: fatal: unable to open input file `myfile.asm'

What's wrong, is there something I do wrong.
(I've encounter many problems installing other software as well. I just follow what's in the install file)
bjsv
 
Posts: 7
Joined: Wed Jan 11, 2006 9:26 pm

RE: Any one using assembler, I have problem installing the f

Postby Nigel » Sat Jan 14, 2006 8:42 pm

The fasm command isn't in your executable path. You need to find out where it got installed, then add that to your PATH variable in your .bashrc file.
Hope this helps,

Nigel.
User avatar
Nigel
LXF regular
 
Posts: 1141
Joined: Fri Apr 08, 2005 8:03 pm
Location: Gloucestershire, UK

RE: Any one using assembler, I have problem installing the f

Postby bjsv » Sun Jan 15, 2006 3:18 pm

There is instalation for the fasm, I just downloaded it to the desktop.
I didn't find anything excep tfile:///usr/share/vim/syntax/fasm.vim


The .bashrc rc file goes like this
# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

How do I add the path variable
bjsv
 
Posts: 7
Joined: Wed Jan 11, 2006 9:26 pm

RE: Any one using assembler, I have problem installing the f

Postby Nigel » Sun Jan 15, 2006 7:28 pm

OK, having re-read your original post & checked out the pages you refer to, I think you have 3 different problems with the 3 assemblers you have installed.

HLA - this is not an assembler as such, just a pre-processor. It needs an assembler installed. It seems to translate C into assembler... why not just use gcc ?

FASM looking again, it appears that you are trying to run it from the directory in which you installed it. The only problem with that is that Linux doesn't by default search the current directory for commands (it's a security thing). To run fasm from the directory you installed it in you would add "./" to the front of the command, so in your case :
Code: Select all
 [bjsv@062249163244 fasm]$ ./fasm /home/bjsv/Desktop/fasm/examples/elfexe/hello.asm

Now, if you want to be able to run it just by using the fasm command from anywhere, you need to firstly find out exactly where fasm is. I'm guessing you've installed it in /home/bjsv/Desktop/fasm (but I could be wrong :)). If you succeed in running the assembler using the command above, then type pwd in that same directory to find out where you are.
Assuming it is /home/bjsv/Desktop/fasm you then need to edit the .bashrc file in your home directory and add the line
Code: Select all
export PATH=$PATH:/home/bjsv/Desktop/fasm
at the bottom of the file.

NASM - looks like this one installed OK, but you aren't supplying it with a valid assembler file. Try doing this :
Code: Select all
$ cd /home/bjsv/Desktop/fasm/examples/elfexe
$ nasm -f elf hello.asm
Hope this helps,

Nigel.
User avatar
Nigel
LXF regular
 
Posts: 1141
Joined: Fri Apr 08, 2005 8:03 pm
Location: Gloucestershire, UK

RE: Any one using assembler, I have problem installing the f

Postby bjsv » Mon Jan 16, 2006 4:18 pm

Thank you, it's working now.
bjsv
 
Posts: 7
Joined: Wed Jan 11, 2006 9:26 pm


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron