flat assembler
Message board for the users of flat assembler.
Index
> Linux > Help with Linux flat assembly Goto page 1, 2 Next |
Author |
|
JohnFound 10 May 2014, 22:20
Simply put fasm in any path specified directory and you are OK. /usr/local/bin for example.
Although you have to define some environment variables, for example "include" pointing to the place where the FASM include files resides. |
|||
10 May 2014, 22:20 |
|
JohnFound 10 May 2014, 22:22
Ah, fasm for Linux is console application. It will not resides in the GUI start menu. (And even if you put there it will be useless from the GUI menu, because you have specify the source file to be compiled from the command line.
|
|||
10 May 2014, 22:22 |
|
Fixit 10 May 2014, 23:28
I found the examples, but none run.
They are set to executable. Thanks. |
|||
10 May 2014, 23:28 |
|
ManOfSteel 11 May 2014, 08:06
What do you mean they don't run?
Have you opened a terminal and tried to cd <some_path>/examples/elfexe ; ./hello or something? Post the error verbatim so we may help you. Note that neither fasm (like JohnFound said), nor the examples, are graphical applications on *nix systems. For that you'll have to learn GTK+ or Qt or any other widget toolkit, in addition to assembly. Last edited by ManOfSteel on 11 May 2014, 08:11; edited 1 time in total |
|||
11 May 2014, 08:06 |
|
sid123 11 May 2014, 08:10
You should run like this:
./fasm dudeitsfasm.asm If it complains about "executable permissions", use chmod and force it to become an executable. chmod +x fasm And better put in the /bin directory as others have said, if you want to use it anywhere. Btw when will FASM be downloadable from package managers? Quote: I had to give up on Nasm because of a lack of help. Yeah, NASM forums are useless IMO, I couldn't get myself registered (Some random moderator didn't approve me for absolutely no reason), FASM rocks. |
|||
11 May 2014, 08:10 |
|
ManOfSteel 11 May 2014, 08:17
sid123 wrote: Btw when will FASM be downloadable from package managers? Feel free to create your own package, contribute it to your favorite distro's repository and keep it up to date by becoming its maintainer! Or doesn't it work this way for Linux? Last edited by ManOfSteel on 11 May 2014, 08:20; edited 1 time in total |
|||
11 May 2014, 08:17 |
|
JohnFound 11 May 2014, 08:19
And of course, if you want GUI editor/compiler, you can always install WINE and run FASMW and/or Fresh IDE in Linux. (This is what I do with great success).
|
|||
11 May 2014, 08:19 |
|
Fixit 11 May 2014, 20:24
ManOfSteel wrote: What do you mean they don't run? I will try it your way. Interesting, I though .asm files were only the source code. Andy |
|||
11 May 2014, 20:24 |
|
Fixit 11 May 2014, 20:33
I am making progress. I was typing fasm hello.asm instead of using ./fasm etc.
Is fasm a script then ? Andy |
|||
11 May 2014, 20:33 |
|
gens 11 May 2014, 23:27
fasm is a console program
to "install" it just copy the binary to /usr/bin/ i was thinking of making a slackware package, but doubt many people would use it (slacko puppy is compatible with slackware) if you got questions about using a shell, ask away |
|||
11 May 2014, 23:27 |
|
Fixit 11 May 2014, 23:55
Thanks.
Do you have any scripts to speed things up ? How do I get fasm to know where the include files are ? I have not been able to figure out how to add dirs to my path. The MASM32 package uses batch files for assembling and compiling Win32 progs. I posted a message at a GTK+ forum for help in developing GUI programs. In the meantime, I will work with the examples to get up to speed. Andy |
|||
11 May 2014, 23:55 |
|
gens 12 May 2014, 01:19
include in fasm is relative to the current file it's processing
include "../some_file.inc" would include a file from the parent directory PATH environment variable can be added to by typing export PATH=$PATH:/some/dir try: echo $PATH you can put the shell command in a file then either make it executable and run or use the dot... whatever its called (operator i think) . my_shell_env_things.sh to make it permanent add it to .bashrc (dot here means it's hidden) in your home dir idk about masm, fasm is source driven making a shell script for quick compile-test helps thou !#/bin/bash fasm my_program.asm ./my_program is what i do if you are talking about including headers from C libraries you need to convert them to fasm syntax manually (i seen some C header to fasm include... i think it was a perl script, but i do them manually) PS "~" is an abbreviation for the home directory (try "echo ~" or "echo $HOME") so you can do stuff relative to home directory like "nano ~/.bashrc" |
|||
12 May 2014, 01:19 |
|
Fixit 12 May 2014, 14:06
I modified one of the examples and it assembled and ran fine.
Is there some equivalent of the Windows API for Linux ? For example moving files, deletions, etc. Thanks. |
|||
12 May 2014, 14:06 |
|
JohnFound 12 May 2014, 14:13
Fixit wrote: Is there some equivalent of the Windows API for Linux ? 1. Linux system calls 2. Millions of external libraries in /lib; /usr/lib; /usr/local/lib For the Linux system calls you can read the great assembly-centric reference of the LSCR project. I am hosting it for online access at http://fresh.flatassembler.net/lscr/ and it is included in the Fresh IDE default help set, accessible by F1 key on the keyword. _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 |
|||
12 May 2014, 14:13 |
|
Fixit 12 May 2014, 17:38
Thanks.
I can not figure out how to install FreshIDE using Wine. I extracted all files to /tmp but did not know which one to pick for installation. Andy |
|||
12 May 2014, 17:38 |
|
JohnFound 12 May 2014, 18:16
Fixit wrote: I can not figure out how to install FreshIDE using Wine. There are several ways to "install" Fresh. 0. Install wine Variant1: 1. Extract the downloaded .zip file in a place where it will reside. /tmp is not a good idea. Better use your home directory or /home/yourname. 2. After extraction simply run Fresh: "wine Fresh.exe" or create launcher depending on your desktop environment. There is desktop file: Fresh/IDE/mime_type/fresh.desktop - It is a text file. You can edit it in order to set the proper paths and then copy it to the Desktop folder. After the first run, Fresh will automatically set needed paths. Variant2: 1. Download FreshSetup.exe, run it and follow the installation wizard. It will by default install Fresh in the directory "/home/your_name/.wine/drive_c/Program files/Fresh" 2. Run Fresh in order to auto setup the paths. You still can use the .desktop file in order to make shortcut on the desktop. More details on "fresh.desktop"; 1. It resides in the directory: /Fresh/IDE/mime_types/fresh.desktop 2. But because it is some kind of special file, you can see it in the file manager as "Fresh IDE" - open it with some text editor: Code: [Desktop Entry] Type=Application Icon=%fresh%/IDE/mime_types/Fresh.svg Name=Fresh IDE Categories=Development; Exec=wine "%fresh%/Fresh.exe" StartupNotify=true Terminal=false Name[en_US]=Fresh IDE Comment=<empty> Comment[en_US]=Visual assembly language IDE GenericName=Assembly language visual RAD IDE. Path= 3. Replace "%fresh%" with the full path where you installed Fresh. There are 2 rows you have to edit: "Icon=" and "Exec=". 4. Save the file. 5. Copy it where you want: 5.1 In you desktop directory: /home/your_name/Desktop 5.2 In "/usr/share/applications" in order to get it in the start menu. (You will need root privileges in order to copy it there). After this, Fresh IDE icon will appear in your start menu under the category "Development" or "Programming" depending on your desktop manager. As long as Fresh is not actually "installed" - it will not change anything in your system, you can always delete the whole directory, without affecting the OS. If you copied the .desktop file you should delete it as well. _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 |
|||
12 May 2014, 18:16 |
|
ManOfSteel 12 May 2014, 18:57
Fixit wrote: Do you have any scripts to speed things up ? As an alternative to using shell scripts for automation, you can also use Makefiles. |
|||
12 May 2014, 18:57 |
|
Fixit 13 May 2014, 22:33
Everything went well with the install.
Can I open a window within Fresh to see my programs run and their output ? Thanks. |
|||
13 May 2014, 22:33 |
|
JohnFound 14 May 2014, 04:57
Fixit wrote: Can I open a window within Fresh to see my programs run and their output ? If you are talking about console window, yes you can. Set the field "Linux terminal" in "Options|IDE options|Debuggers and emulators" dialog. I am using following line: "z:/usr/bin/xterm -hold +mesg", but you can set whatever terminal you want. It is also recommended to set "Linux debugger" and "Win32 external debugger" fields. My settings about these fields are: Linux debugger = "z:/usr/bin/edb --run" (You will need EDB debugger installed) Win32 debugger = "C:\Program Files\OllyDbg\OLLYDBG.EXE" (You will need Olly debugger installed - it works in WINE just fine.) _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 |
|||
14 May 2014, 04:57 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.