 |
Linux Format forums Help, discussion, magazine feedback and more
|
| View previous topic :: View next topic |
| Author |
Message |
bjsv
Joined: Wed Jan 11, 2006 9:26 pm Posts: 7
|
Posted: Sat Jan 14, 2006 12:37 pm Post subject: Any one using assembler, I have problem installing the files |
|
|
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/HLADoc/HLARef/HLARef11.html#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/Doc/NASMDOC1.HTM#section-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) |
|
| Back to top |
|
 |
Nigel LXF regular

Joined: Fri Apr 08, 2005 9:03 pm Posts: 1141 Location: Gloucestershire, UK
|
Posted: Sat Jan 14, 2006 8:42 pm Post subject: RE: Any one using assembler, I have problem installing the f |
|
|
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. |
|
| Back to top |
|
 |
bjsv
Joined: Wed Jan 11, 2006 9:26 pm Posts: 7
|
Posted: Sun Jan 15, 2006 3:18 pm Post subject: RE: Any one using assembler, I have problem installing the f |
|
|
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 |
|
| Back to top |
|
 |
Nigel LXF regular

Joined: Fri Apr 08, 2005 9:03 pm Posts: 1141 Location: Gloucestershire, UK
|
Posted: Sun Jan 15, 2006 7:28 pm Post subject: RE: Any one using assembler, I have problem installing the f |
|
|
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: | | [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: | | 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: | $ cd /home/bjsv/Desktop/fasm/examples/elfexe
$ nasm -f elf hello.asm |
_________________ Hope this helps,
Nigel. |
|
| Back to top |
|
 |
bjsv
Joined: Wed Jan 11, 2006 9:26 pm Posts: 7
|
Posted: Mon Jan 16, 2006 4:18 pm Post subject: RE: Any one using assembler, I have problem installing the f |
|
|
| Thank you, it's working now. |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|