flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Porting FASM

Author
Thread Post new topic Reply to topic
Night Rider



Joined: 28 Jul 2005
Posts: 72
Night Rider 30 Jul 2005, 19:12
Hi, All!
Can anybody explain mesuch thing. I am writing new OS and want to port FASM there. Can i do this (i mean rights for compiler) - if i will keep license file etc, but i need to rewrite some parts of code.
Is it legal to do so?

_________________
My best regards
Post 30 Jul 2005, 19:12
View user's profile Send private message ICQ Number Reply with quote
Night Rider



Joined: 28 Jul 2005
Posts: 72
Night Rider 30 Jul 2005, 23:27
Nobody can answer such simple question? Please...
Post 30 Jul 2005, 23:27
View user's profile Send private message ICQ Number Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld 30 Jul 2005, 23:38
If you mean parts like SYSTEM.INC or FASM.ASM then it's okay Smile As for platform-independent part of assembler, ask someone else Wink
Post 30 Jul 2005, 23:38
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
crc



Joined: 21 Jun 2003
Posts: 637
Location: Penndel, PA [USA]
crc 31 Jul 2005, 00:04
You can modify it and distribute modified versions as long as you follow the restrictions detailed in the license.txt that you get when you download fasm.
Post 31 Jul 2005, 00:04
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 31 Jul 2005, 08:25
To port fasm to your os you have to modify system.inc and fasm.asm (as mike.dld wrote). These files provide an interface to an operating system. You have to put OS specific routines (reading from files, displaying text, etc...) in system.inc file. It would be easier if you copy these two files from win32 distribution and modify them.
Post 31 Jul 2005, 08:25
View user's profile Send private message Visit poster's website Reply with quote
Night Rider



Joined: 28 Jul 2005
Posts: 72
Night Rider 31 Jul 2005, 14:07
Thank you!
Post 31 Jul 2005, 14:07
View user's profile Send private message ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8357
Location: Kraków, Poland
Tomasz Grysztar 31 Jul 2005, 14:35
The attachments contains the copy of the never finished guide to the flat assembler internals, slightly updated to cover the latest releases.
The second chapter is however complete, and this is the one that should help you in porting fasm to any new operating system.


Description: The official guide to flat assembler internals
Download
Filename: fasmguide.zip
Filesize: 11.39 KB
Downloaded: 2223 Time(s)

Post 31 Jul 2005, 14:35
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 29 Aug 2007, 20:49
Is this attachment the most newer version of the guide?
Post 29 Aug 2007, 20:49
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 30 Aug 2007, 22:40
Unless there is another version outside this forum, this one is the last release of the guide.
Post 30 Aug 2007, 22:40
View user's profile Send private message Reply with quote
fabbel



Joined: 30 Oct 2012
Posts: 84
fabbel 19 Feb 2019, 10:47
Thomas, can u find some spare time to update this fasm1 guide ? Would be much much much appreciated.. it's almost 14years old now.. and i want to tinker with fasm engine.. unfort lots of information are missing in there : typ. description of parsing, assembly, formatting stages (am particularly interested to see how virtual feature work internally, how it could be extended to include relocations in the case of PE format)
Thx
Rgds
Post 19 Feb 2019, 10:47
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8357
Location: Kraków, Poland
Tomasz Grysztar 19 Feb 2019, 10:54
This old engine is kind of a mess, its internal structures have been expanded so many times (including recent back-porting of VIRTUAL-related features from fasmg) that it became a bit like a patchwork. It is not easy to convince me to get back to analyzing it when I have a much more cleaner world of fasmg to spend my time in. Wink

On the other hand, I still own a notebook where I designed all the data structures used internally by fasm 1. I might consider digitizing it one day... Several structures have already been described in the fas format documentation.
Post 19 Feb 2019, 10:54
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20430
Location: In your JS exploiting you and your system
revolution 19 Feb 2019, 11:26
Tomasz Grysztar wrote:
On the other hand, I still own a notebook where I designed all the data structures used internally by fasm 1. I might consider digitizing it one day... Several structures have already been described in the fas format documentation.
If by digitising it you mean to replace all the raw numbers with symbolic constants that would be a significant improvement. Idea
Post 19 Feb 2019, 11:26
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8357
Location: Kraków, Poland
Tomasz Grysztar 19 Feb 2019, 12:15
revolution wrote:
If by digitising it you mean to replace all the raw numbers with symbolic constants that would be a significant improvement. Idea
I attempted this several times in the past (not recently, though). Each time I had to abort after realizing that I've been using some of the values with multiple meanings. You know, like Mel would do. Wink

Nevertheless, in the fasmg development I have in fact found a good way to handle this kind of problems - with the ASSERT directive. When I'm going to use some offset or a constant in such way that changing the original definition of structure or constant would break things, I simply add an ASSERT that is going to signalize the problem. There are many such clauses throughout fasmg source.

So yeah, with this new approach I could most likely succeed in rewriting fasm's source in such way if I attempted it. The only problem now is, as I wrote above, to somehow make me work on fasm 1 source when I so much prefer to dedicate the same time to fasmg-related things. Wink
Post 19 Feb 2019, 12:15
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20430
Location: In your JS exploiting you and your system
revolution 19 Feb 2019, 16:26
Tomasz Grysztar wrote:
So yeah, with this new approach I could most likely succeed in rewriting fasm's source in such way if I attempted it. The only problem now is, as I wrote above, to somehow make me work on fasm 1 source when I so much prefer to dedicate the same time to fasmg-related things. Wink
Maybe there could be a guide on how Tomasz can migrate from fasmg to fasm. You would experience much faster assembly times, so testing is much easier and faster. Razz
Post 19 Feb 2019, 16:26
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.