flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Main > fasm packaging as a project for the community

Goto page Previous  1, 2, 3, 4, 5  Next
Author
Thread Post new topic Reply to topic
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7111
Location: Slovakia
dead i quess
Post 13 Feb 2009, 14:27
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: 1046
Location: Michigan, USA

Tomasz Grysztar wrote:
More than half of a year has passed. Is there any progress, or shall we consider this project dead?


No, this project isn't dead at all, all the files are posted at my website, just not enough room here to post all that I want. No room in my webspace either. You'll have to go to my website and click on the 'esnips' link. I've just made an update in december 2008. Right now, I'm working on fixing some bugs in the 32bit include files, mainly struct problems. And I'm working on a 64bit version of a fasmw include files and package. The procject is still alive, and as stated, a 64bit version is on the way. Just click the [www] link.

_________________
Gimme a sledge hammer! I'LL FIX IT!
Post 14 Feb 2009, 07:19
View user's profile Send private message Reply with quote
booter



Joined: 08 Dec 2006
Posts: 66
Obviously everybody who want to write some "real stuff" in ASM starts with the same basic things:
- informational, error, and debugging output
- dynamic arrays, lists, and strings
- multi-threading
- basic exception handling
- dynamic memory allocation
Then they can go to more sophisticated areas, such as networking.
I would propose making some "Framework package" for basic stuff and "Libraries" for more avanced functionality.
My rules are:
- No Win32/Linux portability.
- No C runtime
- It should be just one include file per "library"
- Each Library should have corresponding Test-include

I already wrote my "framework", but I'm having problem with merging code and data sections defined in different files. I mean I want
Module A

Code:
 include 'b.asm'
section '.data' data readable writeable
x dd 0
section '.code' code readable executable
  mov eax,x


Module B (b.asm)

Code:
section '.data' data readable writeable
y dd 0
section '.code' code readable executable
  mov ebx,y


be assembled as

Code:
section '.data' data readable writeable
y dd 0
x dd 0
section '.code' code readable executable
  mov ebx,y
  mov eax,x


I've got strange errors trying such construction ("not a valid win32 application", etc.).
Question
Post 30 May 2009, 09:18
View user's profile Send private message Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 753
Location: Massachusetts, USA
Im guessing you need to use unique section names and a linker? Confused
Post 30 May 2009, 12:09
View user's profile Send private message Reply with quote
booter



Joined: 08 Dec 2006
Posts: 66
It looks like it's actually working as I want Smile
I got confused because of a bug in FASM: empty data section causes FASM to build "invalid" executable. I'll try to post a bug-sample later.
Post 31 May 2009, 03:25
View user's profile Send private message Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 753
Location: Massachusetts, USA
It seems fasm allows multiple sections but doesnt merge them like linker.
If this is the case then each section will be padded and your file will be fat.
Post 31 May 2009, 03:31
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6194
Location: Kraków, Poland

booter wrote:
It looks like it's actually working as I want Smile
I got confused because of a bug in FASM: empty data section causes FASM to build "invalid" executable. I'll try to post a bug-sample later.


There already is a thread about it: http://board.flatassembler.net/topic.php?t=2330
Post 31 May 2009, 12:28
View user's profile Send private message Visit poster's website Reply with quote
booter



Joined: 08 Dec 2006
Posts: 66

Tomasz Grysztar wrote:

booter wrote:
It looks like it's actually working as I want Smile
I got confused because of a bug in FASM: empty data section causes FASM to build "invalid" executable. I'll try to post a bug-sample later.


There already is a thread about it: http://board.flatassembler.net/topic.php?t=2330


Thank you Tomasz for pointing me to the right place.
I fully understand your position

Quote:
All output code is always in the order in which it was entered into the source file.

However, include by its nature is rather contradictive to it.
I mean that include combines several source files into a tree-like structure. FASM traverses this structure in a very simple manner, which is not the best way for implementing modularity/libraries.
comrade (and others) had a similar concern. He came up with this:
http://board.flatassembler.net/topic.php?p=12342&highlight=#12342
Though his solution is OK it isn't really good as a base for common libraries.

I propose to extend include syntax as follows:

Code:
include 'filename' ; current syntax
include 'filename' section ; include contents of the specified section
include 'filename' . ; include contents of the module before 1st section


this would result in being able to write like that

Module A

Code:
; here goes module A macros and constants
include 'B.asm' .
section .code
; here goes module A code
include 'B.asm' .code
section .data
; here goes module A data
include 'B.asm' .data



I don't insist on that syntax, though. My point is that we really need some FASM feature to support this kind of functionality.

BTW, is it possible to write a macro that would extract particular section (or what's before the 1st section) from a source file and include it where specified. I mean, can we implement the functionality shown above with macros?

Some may argue that splitting each library into a set of files would solve this problem, but I would say that this is just unacceptable because it requires keeping several files in synch and that creates maintenence/versioning nighmare.

I'm posting it to this thread because we need FASM feature(s) to support common libraries (and simple code sharing in general).
Post 31 May 2009, 20:04
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6194
Location: Kraków, Poland
If you require such functionalities, just use an object format + linker approach, it was designed to target this kind of problems.
Post 01 Jun 2009, 10:47
View user's profile Send private message Visit poster's website Reply with quote
booter



Joined: 08 Dec 2006
Posts: 66
I discovered pretty simple solution:
In the "main" module

Code:
macro Data { } ; to collect data from includes
include 'libxy.asm'
section '.data' data readable writeable
  Data ; data from all includes


In the "library" libxy.asm

Code:
macro Data { Data
abc   dd  0
}


Very Happy
Post 05 Jun 2009, 06:42
View user's profile Send private message Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 859
Location: Colombia
It works!
Pretty simple and clever.
Post 08 Jun 2009, 13:53
View user's profile Send private message Yahoo Messenger Reply with quote
Dasn



Joined: 22 Nov 2004
Posts: 10
Hi, guys, is this project still in progress?

How about translating some masm32's headers into fasm firstly? That should be easy, I suppose Smile
Post 03 Aug 2009, 21:56
View user's profile Send private message Reply with quote
Kevin_Zheng



Joined: 04 Jul 2003
Posts: 122
Location: China
I think that the FASM macro should support WIN32, WIN64, DOS and Linux with one common code base. For example: STRUC, PROC and ENDP are common and good macro scripts, why not use it for every platforms? It should change one compoent of the complier.

Thanks.

_________________
Pure Assembly Language Funs
Post 13 Oct 2009, 08:59
View user's profile Send private message MSN Messenger Reply with quote
Abyx



Joined: 17 Apr 2008
Posts: 9
It looks that this thread is dying, but I can't understand what's a problem with it?

Assume that I wrote a little but useful extension to some existing macro, which is compatible with other macro, which is backward-compatibe, etc.
So it's possible to include it to next FASM release, one more thing that should be done is to update fasm.pdf .
There should be discussion or maybe voting before adding it to FASM package.

Also, there could be alternative macro, like 'import2' or other numbered versions.

---
sorry for my bad english
Post 11 Jan 2010, 14:25
View user's profile Send private message Reply with quote
Teehee



Joined: 05 Aug 2009
Posts: 568
Location: Brazil

Quote:
  • maintaining the Win32/Win64 headers, adding the missing structures and equates, adding headers for more libraries and interfaces


Maybe there is something I can to do.

Indeed I have spend many times in my projects bc of missing structures and equates, and I had to include them manually. Smile

here a example: MENUITEMINFO missing field Sad
Post 11 Jan 2010, 15:56
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1215
Location: NC, USA
So did the Fasm packaging thing die, or is someone doing that? I created an installer, but I can't unpack a .cab file that contains all the includes(no way to do it with batch, I search all of system32). What are the names and values of the environment values Tomasz talks about in the first post? I'll add a them into the next installer.
[edit]Kinda weird that nobody's even looked at it yet. If you don't trust me you can extract the files with 7zip and examine the files yourself. It's only a self extracting cab(as right click->Properties will tell you), not an actual executable.
[edit2]removed to keep from meeting my 5mb limit[/edit2]
Post 22 Mar 2010, 04:05
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1215
Location: NC, USA
Apparently no one wants Windows packages, and I've always wished Fasm had a
Debian installer, so here it is. I had to do 2, even though it will run on both i386 and
x86-64, it would be incorrect to specify that it is architecture independent.

If they don't get downloaded, or at least commented on, in a few weeks I'll delete
them.

Had to change to .txt, .deb not allowed.

If I missed some depends(I didn't list any) or there were conflicts I missed(none of
those listed either).

Feedback wanted. Tomasz, what do you think?

DELETED TO SAVE SPACE


Last edited by Tyler on 09 Jun 2010, 00:57; edited 1 time in total
Post 07 Jun 2010, 05:04
View user's profile Send private message Reply with quote
Coty



Joined: 17 May 2010
Posts: 519
Location: ␀
I ran it on linux mint 9 (i386) It says it installed, but.

Quote:
coty@nb205 ~ $ fasm
No command 'fasm' found, did you mean:
...


I do not know how .deb works, but Shouldn't it be installed to /usr/bin/ ?
Post 09 Jun 2010, 00:21
View user's profile Send private message Send e-mail Visit poster's website AIM Address Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1215
Location: NC, USA
Wow, that's an epic fail if I've ever seen one. I screwed up building the package data directory("data.tar.gz") it contains the same directory structure as the standard root, and all the files in it are merged into the existing data structure. "usr" was supposed to be the root dir of data.tar.gz, but the "data" folder became that by accident. I did test it, it's just that I forgot I'd already put fasm in my /usr/bin the manual way. Sorry for the screw up, and thanks for trying my package.

It's fixed now. I deleted the manually installed fasm from my /usr/bin, installed my package, tested with "$ fasm" and it worked. 100% positive.

Should I append a package version number to 1.69.14? Making this 1.69.14.2.

I'm going to delete the old ones to save space.

For the little documentation I installed, look in "/usr/share/doc/fasm". Question: In your opinion, should I include documentation, or does it just take up space?

Anyone know about making man pages?


Description: i386
Download
Filename: fasm_1.69-14_i386.deb.txt
Filesize: 109.23 KB
Downloaded: 387 Time(s)

Description: amd64
Download
Filename: fasm_1.69-14_amd64.deb.txt
Filesize: 109.23 KB
Downloaded: 399 Time(s)

Post 09 Jun 2010, 00:56
View user's profile Send private message Reply with quote
ms



Joined: 27 Jul 2009
Posts: 1
If it's of any help, I put together this auto-updating bash script last year. It downloads the latest version and creates a .deb from it. Of course, this will only work as long as Tomasz doesn't change the download page Smile


Code:

#!/bin/bash

Check for latest version
filename=`wget -qO - http://flatassembler.net/download.php | grep -oP "fasm-[0-9.]+.tgz" | sort | tail -n 1`
version=`echo "$filename" | grep -oP '[0-9.]+[0-9]'`

download if not present
[ -f "${filename}" ] || wget "http://flatassembler.net/${filename}"

unpack needed files
tempdir=`mktemp -d`
tar zfx "${filename}" -C ${tempdirfasm/fasm fasm/license.txt fasm/whatsnew.txt

move files to the right place
mkdir -p                          "${tempdir}/usr/bin"
mkdir -p                          "${tempdir}/usr/share/doc/fasm"
mv "${tempdir}/fasm/fasm"         "${tempdir}/usr/bin"
mv "${tempdir}/fasm/license.txt"  "${tempdir}/usr/share/doc/fasm/copyright"
cp "${tempdir}/fasm/whatsnew.txt" "${tempdir}/usr/share/doc/fasm/changelog"
mv "${tempdir}/fasm/whatsnew.txt" "${tempdir}/usr/share/doc/fasm/changelog.Debian"
rmdir "${tempdir}/fasm"

create control file
mkdir ${tempdir}/DEBIAN
echo "Package: fasm"                                               > ${tempdir}/DEBIAN/control
echo "Version: ${version}"                                        >> ${tempdir}/DEBIAN/control
echo "Architecture: i386"                                         >> ${tempdir}/DEBIAN/control
echo "Maintainer: Tomasz Grysztar <tgrysztar@flatassembler.net>"  >> ${tempdir}/DEBIAN/control
echo "Description: flat assembler"                                >> ${tempdir}/DEBIAN/control
echo "             See http://flatassembler.net/"                 >> ${tempdir}/DEBIAN/control

build package
fakeroot dpkg -b ${tempdirfasm-${version}.deb


Post 09 Jun 2010, 01:59
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4, 5  Next

< 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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.