flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Compiler sources

Author
Thread Post new topic Reply to topic
flat cat



Joined: 04 May 2023
Posts: 8
flat cat 04 May 2023, 10:50
Trying to figure out the compiler code (FASM 1)...

1. How to distinguish a regular label from the beginning of a function?

The description of the compiler indicates that it is open source.
2. But, where then comments and descriptions of types: structures?

3. It would be nice to have a pdb file.
Post 04 May 2023, 10:50
View user's profile Send private message Reply with quote
ProMiNick



Joined: 24 Mar 2012
Posts: 785
Location: Russian Federation, Sochi
ProMiNick 04 May 2023, 11:53
1. Are you crazy? function is only abstraction in programmer mind. they both are just labels. Even more... labels are abstraction too. but we could interpret label as function if somewhere in code there is call of this label.
2. everything as is. Thou could comment thour own local downloaded version of sources as thou preffer. Add to thour local version constants, structures and replace some immediates by them.
3. fasm could produce *.fas-file format with debug information (this format is documented here in forum/site). Thou could convert *.fas to *.pdb or publicate documentation about pdb-format and wait when someone other more skilled will interest of thour problem.
Post 04 May 2023, 11:53
View user's profile Send private message Send e-mail Reply with quote
flat cat



Joined: 04 May 2023
Posts: 8
flat cat 04 May 2023, 12:18
in the Compiler internals section - I would like to see comments from the creator of FASM (as more competent), and not from a noname with comments:
ProMiNick wrote:
Are you crazy?
Post 04 May 2023, 12:18
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2425
Furs 04 May 2023, 14:01
The creator of FASM isn't here to babysit your lack of fundamentals when it comes to assembly language and compiled output. If you want only him to reply then send him a message but it will likely get ignored and you know this already. Who are you to demand this again?
Post 04 May 2023, 14:01
View user's profile Send private message Reply with quote
flat cat



Joined: 04 May 2023
Posts: 8
flat cat 04 May 2023, 14:22
It's not for you to judge my fundamentals. The question was asked about the fact that in the so-called sources - there is not even a description of the working structures, just as there are no comments.
Furs wrote:

Who are you to demand this again?

who are you to flood here in my thread?
If you don't know the answer to a question, don't write.
Post 04 May 2023, 14:22
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3918
Location: vpcmipstrm
bitRAKE 04 May 2023, 14:29
flat cat wrote:
The description of the compiler indicates that it is open source.
2. But, where then comments and descriptions of types: structures?
I understand your concern about the lack of comments and descriptions of types and structures in the assembler's code. The author of this assembler is indeed an advanced programmer who has chosen to keep the code focused on core functionality and provide detailed explanations in separate articles.

These articles address specific techniques and design choices used in the assembler, offering in-depth insights that might not be feasible within code comments. To better understand the types, structures, and other aspects of the assembler, I recommend searching for and reading these articles alongside the source code.

By studying both the code and the accompanying articles, you should gain a more comprehensive understanding of the assembler's inner workings and design rationale.

[The source code to fasmg is a bit more approachable - using some more advanced features and abstractions to document the code, imho.]

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 04 May 2023, 14:29
View user's profile Send private message Visit poster's website Reply with quote
flat cat



Joined: 04 May 2023
Posts: 8
flat cat 04 May 2023, 14:42
ok. thanks.
Post 04 May 2023, 14:42
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3918
Location: vpcmipstrm
bitRAKE 04 May 2023, 15:14
flat cat wrote:
1. How to distinguish a regular label from the beginning of a function?
This is done stylistically, functions [always] start at the beginning of a line. This and other things become apparent by reading the source code. A good editor will allow you to navigate the code easily - regardless of the label type. Beyond that it's not too difficult to generate dot files for graphvis, or use more advanced tools to get different perspectives on the code.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 04 May 2023, 15:14
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3918
Location: vpcmipstrm
bitRAKE 04 May 2023, 15:33
flat cat wrote:
3. It would be nice to have a pdb file.
I will assume you are talking about debugging changes to fasm? My suggestion would be to program runtime functions to debug fasm at different layers - rather than rely on PDB info. The most simplistic would be functions that work within your debugger. More advanced would be to break fasm into its different layers. This is more useful given the architecture of fasm.

(Speaking as someone who has actually made some basic changes to fasm.)

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 04 May 2023, 15:33
View user's profile Send private message Visit poster's website Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2425
Furs 05 May 2023, 13:25
flat cat wrote:
who are you to flood here in my thread?
It's a public thread so I don't have to be anyone special to do it.

flat cat wrote:
If you don't know the answer to a question, don't write.
wtf you talking about? YOU refused the answer that was posted because it wasn't given by Tomasz.
Post 05 May 2023, 13:25
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3918
Location: vpcmipstrm
bitRAKE 05 May 2023, 15:05
Furs, they have embarrassed themselves enough and will not likely return. This has happened many times in the past. Some have went through and deleted their posts in anger. If they are sufficiently motivated they'll create another account.

I'd like to believe they have the social maturity to live beyond their mistakes. Perhaps they were drinking, or impaired in some other way. The ego is a powerful force - I, myself, am not completely free of its trappings. They don't own us anything, but I will quote William Shakespeare's play Hamlet: "This above all: to thine own self be true".
Post 05 May 2023, 15:05
View user's profile Send private message Visit poster's website Reply with quote
flat cat



Joined: 04 May 2023
Posts: 8
flat cat 05 May 2023, 15:45
Quote:

they have embarrassed themselves enough and will not likely return....

unfortunately, I had a better opinion of you for which I should apologize. It won't happen again. The creator of the forum should have rid this forum long ago of such parasites that can only flood and engage in sarcasm.
Post 05 May 2023, 15:45
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3918
Location: vpcmipstrm
bitRAKE 05 May 2023, 15:58
Forgive me. I engage no more.
Post 05 May 2023, 15:58
View user's profile Send private message Visit poster's website Reply with quote
ProMiNick



Joined: 24 Mar 2012
Posts: 785
Location: Russian Federation, Sochi
ProMiNick 05 May 2023, 16:28
apologize accepted. Thou should explore information from answers. If thou dislike truth it dosn`t changed because of that dislike.
Post 05 May 2023, 16:28
View user's profile Send private message Send e-mail Reply with quote
flat cat



Joined: 04 May 2023
Posts: 8
flat cat 05 May 2023, 16:54
what truth are we talking about? You, a person who does not even understand the difference in COFF and PE - relocations (which the creator of the forum convincingly hinted to you in another thread).
Post 05 May 2023, 16:54
View user's profile Send private message Reply with quote
ProMiNick



Joined: 24 Mar 2012
Posts: 785
Location: Russian Federation, Sochi
ProMiNick 05 May 2023, 18:20
Again thou concentrating on thour own ego instead of information. It is thour choise.
By the way in Tomasz answer in another thread there already answer - but thou blind and asking again. Answer not always is text, code could be selfdeclarative by itself.
Post 05 May 2023, 18:20
View user's profile Send private message Send e-mail Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2425
Furs 06 May 2023, 17:11
flat cat wrote:
unfortunately, I had a better opinion of you for which I should apologize. It won't happen again. The creator of the forum should have rid this forum long ago of such parasites that can only flood and engage in sarcasm.
If you are referring to yourself, sure.

What did you contribute to this forum, again? He even linked you a post written by Tomasz (in the other thread) which explains it that you refused to read.

You're not special. Nobody owes you anything. Fuck off with your ego.
Post 06 May 2023, 17:11
View user's profile Send private message 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.