flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2, 3 Next |
Fasm Support for High-Level Constructs? | ||||||||||||||
|
||||||||||||||
Total Votes : 20 |
Author |
|
scientica 28 Nov 2003, 13:52
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. sort of "tell show me a Kanji and I'll tell you it's meaning, ask me to translate a novel and I'll quit". There are macros theat do the things you ask for, but IMO these HLL structs are a bit too much abstraction, well commented plain assembly code is better - it's better to learn how things work before hiding them behind "if"s, to me it's like, you should first learn how to walk before you learn how to tie a shoe and go for a run in the park. I vote no, as there are macros that works. _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
![]() |
|
JohnFound 28 Nov 2003, 13:52
art_sands wrote: 1. Easier migration for beginners. Maybe yes, but they gains bad habits. ![]() Quote: 2. Less errors in code and makes coding a lot easier. I am not agree at all. There is no connection between HLL constructions and the count of the errors, neither coding speed. Quote: 3. Easier to read and understand (self-commenting). Readability of the program depends from programmer wish to write it readable, not from syntax construction. Or maybe you never see C program that is ugly mess of brackets and double-plus signs? ![]() BTW: It is easy to implement all these HLL constructions by macroses. If you like them simply use them. Why to embed them in the compiler core and to make compiler biger, slower and buggyer? Moreover, many of FASM users (me too) like FASM namely because of it's simplicity combined with macro power. Regards. |
|||
![]() |
|
silkodyssey 28 Nov 2003, 14:11
Yes, I think fasm should support high level control structures
![]() Code: if ( eax == 0 && edx == 1 ) { ;do something } else { } This would be nice. It should include the while loops and for loops too ![]() I've had a peek at the fasm source code and from that I can tell privalov wouldn't like this idea much ![]() ![]() ![]() ![]() _________________ silkodyssey |
|||
![]() |
|
pelaillo 28 Nov 2003, 14:47
This was already discussed several times.
http://board.win32asmcommunity.net/showthread.php?s=&threadid=6855 http://board.win32asmcommunity.net/showthread.php?s=&threadid=6857&perpage=10&pagenumber=2 There are macros that do this constructions. Believe me, this HLL constructs will slow the learning for a beginner, not the contrary. I said this out of my own experience. If you stick with Privalov's coding style, you will be doing more readable/reusable/efficient code rather than the mix of HLL vain things. A few instructions to do every other constructions. |
|||
![]() |
|
pelaillo 28 Nov 2003, 15:06
silkodyssey wrote: a lot of more experienced asm coders feel the same way also. There is a reason: experience. Experience shows them that there is more proficient way to code in assembly, so why not take their word? I'm a newbee too and I have had the same difficulties, until I start to study the fasm source and get convinced. You have an advantage over me, the fasm is already here ![]() silkodyssey wrote: The newcomers to asm programming are programming with the High Level Assembly style. This I think is the way to go, this is the future. This is maybe the future of other languages. And the past if you get started with fasm ![]() |
|||
![]() |
|
Betov 28 Nov 2003, 15:35
Too bad: I can't click twenty times on [No]. Too bad.
Betov. |
|||
![]() |
|
LiuJunfeng 28 Nov 2003, 16:15
I think assembly language should be pure and directly matches the actions of CPU.
If you prefer high level constructs, you should use a high level language. For example, Euphoria. |
|||
![]() |
|
silkodyssey 28 Nov 2003, 18:00
LiuJunfeng wrote:
What if the HLL doesn't give me access to machine instructions or register? ![]() ![]() pelaillo wrote:
Well I guess the reason some of are fond of HLL control structures is because we grew up with them in our HLL programmng days. I guess we just have to learn to think in assembly. ![]() _________________ silkodyssey |
|||
![]() |
|
roticv 28 Nov 2003, 18:10
It does not matter to me. Even if there exist high level constructs, I will still not use them.
Quote: HLL control structures are close to how people think so that makes it easier to read and understand for most of us. When we can think like the machine then I guess the low level control structures would be easy to understand too. Does not make much of a difference to me. I can code in both assembler and HLL. Quote: Too bad: I can't click twenty times on [No]. Too bad. Somehow I agree with betov. ![]() |
|||
![]() |
|
Varchilde 28 Nov 2003, 18:14
I think if you want HLL constructs build into the assembler, you should go with a compiler that already has them. I hear HLA is pretty powerful that way.
In my opinion, as a beginner. HLL constructs complicate the learning process. FASM already has macro features that can simulate HLL, no need for more. |
|||
![]() |
|
silkodyssey 28 Nov 2003, 18:28
roticv wrote:
My Point exactly ![]() Varchilde wrote:
Good point ![]() Varchilde wrote:
Complicate the learning process in what way? If the person is learning asm as a first language then maybe HLL control structures would complicate the learning process but I don't agree with you because HLL control structures is closer to how people think. If on the other hand the person already knows an HLL I don't see how it will complicate anything because they are already familiar with it whereas with the person learning asm for the first time they have to learn the HLL control structures too. What does fasm have to lose by adding support for HLL control structures? How many of you will stop using fasm if this is done? On the other hand fasm has a lot to gain by adding support for these structures like the many beginners to asm who like to program with the high level asm style. Nothing to lose, everything to gain ![]() _________________ silkodyssey |
|||
![]() |
|
Varchilde 28 Nov 2003, 18:59
Quote:
I am somewhat familiar with HLL from learning C many years ago. It would complicate the learning process in assembly because to use it, I would not learn what happens at the machine level upcodes and how the flags register operates. On the other hand, if someone knows already all the upcodes involved, they might want to use HLL for some reason, in that case, FASM already has macros that do the job nicely. Is there something missing that you can't already do with the macros? Quote:
That's just it, I don't understand. I think there is already support in macros. But I could be speaking from ignorance. Are there HLLs that the macros won't allow you to duplicate? I think once I know enough to write my own HLL macros, I will do so and I will not need them in FASM itself. |
|||
![]() |
|
art_sands 28 Nov 2003, 19:04
Betov:
I understand your emotions, and in many ways you're right. But by not supporting them YOU are dictating the user, and limiting him from his freedom. He should be allowed to do what he wants to, not what you want him to. I personally don't like high level structures very much, but i think they should be supported. Additionally, if developers were to develop in a team, and every other guy uses his own version of constructs and code, this will only help add bloat to code, instead of slimming it down. This is exactly why libraries are standardized. Don't think about only yourselves people. Microsoft may be bad players regarding their various monopolies, but the software engineers that work there at their various laboratories and at Intel Corporation are codegods. We cannot possibly compare to them because these are the pioneers who actually invented what we end up using. What do you think got Microsoft such success? They listened. If you think the assembly revolution is going at the speed it should, then you're probably wrong. It's painfully slow. Many programmers who turn to assembly are already experienced in some other language. The shorter the time it takes them to migrate to assembly, the faster things start building. Without added features, you can't expect the programming world to shift from C/C++ or other languages to assembly. Supporting High-level constructs doesn't mean you enforce them upon the user. The user is then free to choose. Frankly, extremism never got anybody anywhere. You have to listen to even the smallest kid, if you want respect. People have always preferred freedom over slavery or restrictions--that applies to you too Betov. The disadvantage to implementing these constructs using macros is that there will be a zillion versions and bugs aplenty. Instead of bringing order to the world that would create only chaos. I think they should be supported. Consider things practically and get out of the box. If people do not want to use them, they can choose not to. But not supporting these will guarantee only lesser migration. MASM has reigned for long. Now it's time for FASM. People stick to MASM because of it's so called "features". Imagine, if FASM supported most of what MASM can do, people will automatically shift to using FASM. You have to understand one thing: People don't like change. And you're changing things for them big time. They will surely be annoyed. Also remember, the computer was invented to solve your problems not to create them for you. For once, go to the beach, keep a cool head, think 'rationally', and then decide. I posted this only to know the response, and not to force Privalov to include the constructs. It's up to the people--not just accomplished assembly programmers but wannabes too. And if you are getting too cozy with using the terms "pure asm", then I'm sorry to say, FASM should not support MACRO definition directives, structure definition directives, and other such stuff because they are not "pure" assembly. You can as well try coding in binary if that is your inclination. Or if you're of the more adventurous types, go straight to semiconductor electronics and program things in hardware. Heck, why are you developing an assembler for programmers? I hope you're doing that to make things easier for them. The aim here is to make things as simple as possible. I'm not saying this, Sir Albert Einstein did. And you directly contradict that. Regards, Art Last edited by art_sands on 28 Nov 2003, 20:21; edited 3 times in total |
|||
![]() |
|
fasm9 28 Nov 2003, 19:38
Glad,
instead, How about make to try implement compiler written in FASM? OR C# 2 ASM written in FASM ![]() -- |
|||
![]() |
|
Tommy 28 Nov 2003, 19:51
Seems to be a good idea...
![]() |
|||
![]() |
|
Tomasz Grysztar 28 Nov 2003, 20:22
When you like such high-level construct, why not use HLA? I can generate fasm code. Or you can try the PureBASIC compiler, it supports inline fasm code. When I was designing flat assembler, I thought of it rather as a kind of nice back-end for high level language compilers than the high level capable compiler itself. High level processing should be done first, and then it's time for fasm with its multi-pass code optimization algorithms.
|
|||
![]() |
|
art_sands 28 Nov 2003, 20:34
Privalov, the point cannot be overstated--I'm not forcing anybody and it's not me who likes high-level constructs. The world does, that's why even though there are many assembly programmers (perhaps a thousand or more) at the boards, they are only the size of peanuts compared to those using C/C++ or other languages. If you want to increase your user base, add more features. The concern here is not using several things to accomplish one thing. You can compare the number of people using FASM, MASM, GoAsm, TASM, and RosAsm. HLA may be called an assembler, but I see it more as a preprocessor.
Take a break today and check the statistics yourself. That will do the talking. And on a more clever note, one of the laws of good business and marketing says that: Give the people what THEY want, and not what YOU want them to have. Regards, Art |
|||
![]() |
|
JohnFound 28 Nov 2003, 21:53
To art_sands:
Actually, I don't understand what you need? Did you look at the fasmw include directory? There is a file "include\macro\if.inc' In this file are declaration of following HLL style constructs: if, else elseif endif, repeat and until. Simply include this file in your program and use it if you like HLL so much. What more than this you need? |
|||
![]() |
|
art_sands 28 Nov 2003, 21:57
when did i say i like HLL? Well, you need to be practical to understand what I have posted above. Read it very carefully.
I only asked for flexibility for migrators so that our community exceeds that of C/C++ or other langs. Anyway, thanks for answering. Regards, Art |
|||
![]() |
|
Goto page 1, 2, 3 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.