flat assembler
Message board for the users of flat assembler.
Index
> Main > fasm packaging as a project for the community Goto page Previous 1, 2, 3, 4, 5 Next |
Author |
|
vid 13 Feb 2009, 14:27
dead i quess
|
|||
13 Feb 2009, 14:27 |
|
booter 30 May 2009, 09:18
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.). |
|||
30 May 2009, 09:18 |
|
bitshifter 30 May 2009, 12:09
Im guessing you need to use unique section names and a linker?
|
|||
30 May 2009, 12:09 |
|
booter 31 May 2009, 03:25
It looks like it's actually working as I want
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. |
|||
31 May 2009, 03:25 |
|
bitshifter 31 May 2009, 03:31
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. |
|||
31 May 2009, 03:31 |
|
Tomasz Grysztar 31 May 2009, 12:28
booter wrote: It looks like it's actually working as I want There already is a thread about it: http://board.flatassembler.net/topic.php?t=2330 |
|||
31 May 2009, 12:28 |
|
booter 31 May 2009, 20:04
Tomasz Grysztar wrote:
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. 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). |
|||
31 May 2009, 20:04 |
|
Tomasz Grysztar 01 Jun 2009, 10:47
If you require such functionalities, just use an object format + linker approach, it was designed to target this kind of problems.
|
|||
01 Jun 2009, 10:47 |
|
booter 05 Jun 2009, 06:42
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 } |
|||
05 Jun 2009, 06:42 |
|
pelaillo 08 Jun 2009, 13:53
It works!
Pretty simple and clever. |
|||
08 Jun 2009, 13:53 |
|
Dasn 03 Aug 2009, 21:56
Hi, guys, is this project still in progress?
How about translating some masm32's headers into fasm firstly? That should be easy, I suppose |
|||
03 Aug 2009, 21:56 |
|
Kevin_Zheng 13 Oct 2009, 08:59
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 |
|||
13 Oct 2009, 08:59 |
|
Abyx 11 Jan 2010, 14:25
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 |
|||
11 Jan 2010, 14:25 |
|
Teehee 11 Jan 2010, 15:56
Quote:
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. here a example: MENUITEMINFO missing field |
|||
11 Jan 2010, 15:56 |
|
Tyler 22 Mar 2010, 04:05
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] |
|||
22 Mar 2010, 04:05 |
|
Tyler 07 Jun 2010, 05:04
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 |
|||
07 Jun 2010, 05:04 |
|
Coty 09 Jun 2010, 00:21
I ran it on linux mint 9 (i386) It says it installed, but.
Quote: coty@nb205 ~ $ fasm I do not know how .deb works, but Shouldn't it be installed to /usr/bin/ ? |
|||
09 Jun 2010, 00:21 |
|
Tyler 09 Jun 2010, 00:56
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?
|
|||||||||||||||||||||
09 Jun 2010, 00:56 |
|
ms 09 Jun 2010, 01:59
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
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 ${tempdir} fasm/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 ${tempdir} fasm-${version}.deb |
|||
09 Jun 2010, 01:59 |
|
Goto page Previous 1, 2, 3, 4, 5 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.