flat assembler
Message board for the users of flat assembler.

flat assembler > Linux > Fasm for Gentoo

Author
Thread Post new topic Reply to topic
Fulgurance



Joined: 27 Nov 2017
Posts: 42
Hello, in first thanks for your work and sorry if sometimes i don't speak english very well, i'm french, sorry Sad

I'm Gentoo Linux user, and i have just one question. Can you add an official ebuild for FASM for Gentoo please ?
Post 27 Nov 2017, 11:17
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6964
Location: Kraków, Poland
You could try to follow this very old topic. I have no idea if its advice is still viable, though.
Post 27 Nov 2017, 11:55
View user's profile Send private message Visit poster's website Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 42
Okay, i test that, thanks. But you don't want to add officialy your assembly for Gentoo ? Is this too much work?

It's a shame, because honestly for me, fasm is really an excellent assembler.

Otherwise, I have a question for a personal project. Your assembler is created in C or with another assembler?

I have read this article: https://www.swansontec.com/sintel.html

I don't understand one part of this article, what is it mod R/M ?

Are there libraries for write assembly instructions on file, in binary mode, or for facilitate assembly building ?

For example, a library that can write one instruction on binary mode or little block of asm instructions with arguments on fonction ?

I do not know if I am very clear?
Post 27 Nov 2017, 12:21
View user's profile Send private message Reply with quote
ProMiNick



Joined: 24 Mar 2012
Posts: 188
Location: Russian Federation, Sochi
how fasm created? - https://en.wikipedia.org/wiki/FASM

In case of 1 byte instruction opcode itself determine length of instruction and its operands.
In case of multybyte instruction mod R/M is 2nd byte that purpose for determining length of instruction and its operands.

My english bad too... I don`t understand "Are there libraries for write assembly instructions on file, in binary mode, or for facilitate assembly building ?" - What thou mean?

If thou were windows user i could answer this question "For example, a library that can write one instruction on binary mode or little block of asm instructions with arguments on fonction ?" (In IDE it is possible to add assembly of instruction or blocks of instructions just from clipboard or throw selection and custom menuitems). But building that in console and in linux environment - for me it is impossible. Partialy because there(here) is not enough examples for teaching programming in fasm for linux.
Post 27 Nov 2017, 15:24
View user's profile Send private message Send e-mail Reply with quote
Melissa



Joined: 12 Apr 2012
Posts: 60
Although my distro carries it in standard repo, I simply untar in my home dir and symlink to executable.
Post 28 Nov 2017, 01:30
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1258
Fulgurance wrote:
Okay, i test that, thanks. But you don't want to add officialy your assembly for Gentoo ? Is this too much work?
What's the point? Just download it and execute it? FASM uses no libraries so it only uses the Linux kernel directly.

There's no point in tying it to a distribution.
Post 28 Nov 2017, 13:17
View user's profile Send private message Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 42
If you don't make repository for Gentoo, can you allow me to make fasm package for Gentoo ? Don't worry, I would say that you are the author of the script.

How is it possible to recompile fasm ?
Post 31 Jan 2018, 13:57
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1258
FASM can recompile itself. So technically, you can't, without having the binary first.

You could use another assembler to compile it, but you'd have to edit the source with sed scripts or whatever to make it compatible. Not worth the effort IMO.
Post 31 Jan 2018, 18:15
View user's profile Send private message Reply with quote
yeohhs



Joined: 19 Jan 2004
Posts: 170
Location: N 5.43564° E 100.3091°
Fulgurance wrote:
If you don't make repository for Gentoo, can you allow me to make fasm package for Gentoo ? Don't worry, I would say that you are the author of the script.


From fasm LICENSE.TXT file:
Quote:

The licence and distribution terms for any publically available
version or derivative of this code cannot be changed. i.e. this code
cannot simply be copied and put under another distribution licence
(including the GNU Public Licence).


Yes, you can distribute fasm (source and binary) but fasm is copyrighted software by Tomasz Grysztar, its legal owner and it's not Open Source. If Gentoo only accepts GPL or other Open Source software, fasm may not be accepted as a part of their packages distribution. You might want to consult Gentoo about this issue.

After reading fasm's LICENSE.TXT, this is what I could conclude, if I'm not mistaken. I'm not a lawyer. Smile

_________________
“It’s not that we have a short time to live, but that we waste a lot of it.”
-Lucius Annaeus Seneca
Post 01 Feb 2018, 03:20
View user's profile Send private message Visit poster's website Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1258
Who said about modifying anything? What you quoted applies to almost any open source license. I mean, it's not like you can take a GPL license and change it legally to something else like BSD, why would FASM's license be any different?

It doesn't even say you can't modify the code, only the license itself, which is sane and prevents abuse (the only license that allows to be changed are the "public domain" licenses like WTFPL or w/e it's called).

Anyway, I suggested to use a sed or awk script to modify the source so that another assembler can compile it, if needed -- i.e. only "as needed" temporarily / automatically. Because FASM is self-compiled so you'll need the binary before compiling it, and that's not very Gentoo-like cause it wants to compile all software in its packages.

You can always just use the binary directly though, without any package.
Post 01 Feb 2018, 13:09
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6964
Location: Kraków, Poland
Furs wrote:
What you quoted applies to almost any open source license. I mean, it's not like you can take a GPL license and change it legally to something else like BSD, why would FASM's license be any different?
Yes, this is more of a "reminder clause", since it is not really needed there to have an effect. And ignoring these added reminders, this is just a 2-clause BSD License, one of the OSI-approved licenses for open source.

BTW, fasmg uses the 3-clause "revised" BSD License.
Post 02 Feb 2018, 08:22
View user's profile Send private message Visit poster's website Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 42
Don't worry, Gentoo accept multiple type of license, no problem. And don't would like to edit fasm, just add repository for Gentoo.

Is it good for you Tomasz Grysztar ?

If i understand, is it BSD-2 license, is it that ?

Link: https://wiki.gentoo.org/wiki/License_Groups/OSI-APPROVED
Post 03 Feb 2018, 10:05
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2309
Location: Usono (aka, USA)
Furs wrote:
FASM can recompile itself. So technically, you can't, without having the binary first.

You could use another assembler to compile it, but you'd have to edit the source with sed scripts or whatever to make it compatible. Not worth the effort IMO.


For the most part, as is obvious to most of us, I can't even pretend to see the point in assembling FASM with something else. I know that's not really what was asked here (misunderstanding), but it's still curious.

Anyways, to me, the simplest way is DOS (not Linux), rebuild an ancient .COM version of FASM, and use that to build later versions and finally newest version. I tested this with 1.40 (.COM), 1.64, and 1.72. While I didn't yet rebuild the .COM with anything else, at least I have found that it's a good place to start. So it's reasonably possible. (Probably not directly useful for Gentoo, but hey, you can rebuild various DOS-compatible environments there, in a pinch.)

See here for a simple .BAT script.
Post 20 Feb 2018, 05:16
View user's profile Send private message Visit poster's website 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-2018, Tomasz Grysztar.

Powered by rwasa.