flat assembler
Message board for the users of flat assembler.

Index > Main > Should FASM Support High-Level Constructs?

Goto page Previous  1, 2, 3

Fasm Support for High-Level Constructs?
Yes
40%
 40%  [ 8 ]
No
60%
 60%  [ 12 ]
Total Votes : 20

Author
Thread Post new topic Reply to topic
MattBro



Joined: 08 Nov 2003
Posts: 37
MattBro 24 Dec 2003, 05:29
Well I'm glad to hear that fasm was designed to be a backend for a compiler, because that's exactly what I'm using it for! If the if, then and else are implemented as macros (I haven't bothered to use them yet and I have hundreds of lines of code in my compiler), that's probably good enough for me. More documentation on the macros would be nice, but I know it all takes precious time.

What I'd like to see are a set of 'free' standard libraries written in fasm. Maybe it's already out there. There is of course the win32 api, but I'd like to see efficient fasm implementations of things like memory management routines (e.g. a garbage collector), data structures, string utilities, conversion utilities, numerical libraries etc.

I chose to write version 0 of my compiler in fasm itself. (C would have been faster, but I figured this would be a nice crash course in fasm.) My next version of the compiler will be written in a subset of my new language of course.

_________________
-- -------------------------------------------------------
"I am the Way and the Truth and the Light, no one comes to the Father except through me" - Jesus
---------------------------------------------------------
Post 24 Dec 2003, 05:29
View user's profile Send private message Visit poster's website Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 24 Dec 2003, 11:04
Quote:
i dunno i read somewhere that macros are dangerous


Why they are dangerous?

_________________
Code it... That's all...
Post 24 Dec 2003, 11:04
View user's profile Send private message Visit poster's website Reply with quote
wolf



Joined: 28 Sep 2003
Posts: 11
wolf 25 Dec 2003, 09:34
I would like to have fasm just the way it is.
my reasons for that are:

I want to understand what's really going on at processor level.
If fasm migrates into a sort of high level language, what for should it have been created?
Some HLA style macros can be very helpful but the longer I use macros or HLA constructions, the more I forget about the code underlying them.
If I want to test an idea quickly, I use GfaBasic32 which also has an inline assembler. But fasm should be kept the way it is.

wolf
Post 25 Dec 2003, 09:34
View user's profile Send private message Reply with quote
silkodyssey



Joined: 02 Oct 2003
Posts: 198
Location: St.Vincent & the Grenadines
silkodyssey 25 Dec 2003, 14:08
wolf wrote:

Some HLA style macros can be very helpful but the longer I use macros
or HLA constructions, the more I forget about the code underlying them.


What I think a lot of people forget is that having hll features in a language
does not force you to use these features. But I think Privalov wants
to keep the language as simple as possible so that the users won't have
to learn too many directives.So I agree with you that fasm should ke keep the
way it is because it was designed for specific reasons. Anyone who wants
hll features in an assembler can find an assembler that
supports these features.

_________________
silkodyssey
Post 25 Dec 2003, 14:08
View user's profile Send private message MSN Messenger Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu 01 May 2009, 04:04
art_sands wrote:
Should FASM support high level constructs like if..else..endif, for...next, while...endwhile, etc.. I would say yes, but let's take a poll.

There are several reasons to do so. Some of them here:
1. Easier migration for beginners.
2. Less errors in code and makes coding a lot easier.
3. Easier to read and understand (self-commenting).

I've been to some other boards and this is the thing I heard most:

"Give me a single line of assembly and I will tell you what it means. Give me a hundred or so, and I'll quit."

Vote and specify your reasons below.

You can also submit specifications of each high-level construct (how you'd like them to be) below:

I'd generally prefer:

1. If statements
a. with endif
Code:
If condition1 [Then]
... ; statements
[Elseif condition2]
... ; statements
[Else]
... ; statements
Endif
    


b. single-line
Code:
If condition Then statement
    


2. Switch
Code:
switch value
    case case_value1:
    ...
    break
    [case case_value2:]
    ...
    break
    [default:]
    ...
    break
endswitch
    


etc..

Regards,
Art
Well as long as it's optional it can't HURT anything (besides waste of time implementing)..
Post 01 May 2009, 04:04
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 01 May 2009, 04:21
I like fasm just the way it is.
You can use use macro if you want to, but it is not neccessary.
When learning fasm i used basic macros to ease coding.
But soon after i wanted to know what they actually did inside.
Nowadays i only use macros when it is convienant to do so.
What is nice about fasm is the freedom to make your own choices.
One way is not better than the other way, for some people macros
make the code easier to read, for others it makes it harder to read.
While writing a large project recently i had used certain macros to
simply cut down the number of lines in my code.
It did make it easier to read in the long run.
This is only my humble opinion.

PS: Thanks to Tomasz for keeping fasm so open minded.

_________________
Coding a 3D game engine with fasm is like trying to eat an elephant,
you just have to keep focused and take it one 'byte' at a time.
Post 01 May 2009, 04:21
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 01 May 2009, 06:44
Is there a reason we resurrect this very old thread? Smile
Post 01 May 2009, 06:44
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3

< 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.