flat assembler
Message board for the users of flat assembler.
Index
> Main > x64 native FASM? Goto page Previous 1, 2, 3 |
Author |
|
tom tobias 23 Aug 2006, 10:39
Offering a mild rebuke of my notion of the PARAMOUNT importance of readability versus ANY other parameter, especially EXECUTION speed, or memory utilization, RedGhost (and many others, in thought) suggested:
Quote:
This comment was misunderstood by some members of the forum, who may have also misunderstood my statement concerning readability, the key to making CHANGES IN FASM-->the initial thrust of this thread by Garthower. RedGhost did not misunderstand me, he simply disagrees with my position, as is certainly his right.... However, my position may have been misunderstood by other forum members, as indicating mere DISSATISFACTION with the documentation of the CODE upon which FASM rests. Some forum members may share my unhappiness with the absence of appropriate commentary in the code, hence the kind hearted response to RedGhost, from MHajduk: Quote:
But, RedGhost is correct here, it is not simply the commentary's absence which so troubles me, but the type, and utilization of instructions, which, I claim, underscores FASM's hostility to readability. In my opinion, those, like RedGhost, who believe, erroneously, that FASM, when written with clarity as the prime objective, rather than optimizing for space or speed, would suffer as a result, are simply uninformed and inexperienced. (hint: less THC, more reading, please begin with Brooks "mythical man month") http://en.wikipedia.org/wiki/The_Mythical_Man-Month Absence of comments in FASM code is annoying, to be sure, but it is not CRITICAL. Line by line commentary is REQUIRED in some corporate environments, others are more lax about this, what is, however, NOT permitted, at least, not in any corporate environment in which I have ever worked, is the DELIBERATE obfuscation of the code, by introducing, inappropriately, Boolean functions to PREVENT understanding, i.e. to deter readability, to enhance the cryptic character of the project. In another thread, recently, Tomasz referenced the autocompilation time for FASM, at the beginning, many years ago, running on a 386, and indicated that several minutes had been required for that process. In that thread, RedGhost suggested that on his machine, of recent vintage, autocompilation of FASM required only a few seconds at the most, THEREBY MAKING THE CASE FOR MY ARGUMENT, that improving EXECUTION SPEED for compilation is DEAD LAST in the list of improvements needed for FASM. Garthower's question, how to proceed with MODIFYING FASM to accommodate some new feature, highlights what IS NOW, TODAY, AND ALWAYS HAS BEEN, the critical issue in ANY computer programming assignment: MODIFICATION. End of story. No readability: no modifiability. I can't count the number of projects in corporate society, where the decision was made to simply JUNK the existing code--throw it away, dispose of it, rather than try to figure out what the authors had been trying to accomplish, in order to modify the software to embrace new capabilities. Defending FASM's supposed readability, Fudder suggested that FASM possessed some degree of modularity. Hmm. Not likely. Modularity implies that one could REUSE some function, or some data structure, or some control function, in any significant revision of FASM, such as would be required by Garthower. If FASM were modular, someone else, say Bogdan, for example, who is designing his own assembler, could scavenge relevant components, maybe the parser, for instance. But, I don't see people lining up, with their hands out, hoping to acquire some of these supposedly modular components of FASM. A piece of software is not deemed modular, by virtue of a commentator's opinion, even one as learned as Fudder. It is acknowledged to be modular upon recognition that one or more of its constituent parts has been adopted by some other, distinct piece of software. Is there some other program in existance, which owes a debt of gratitude to Tomasz, for supplying NOT SIMPLY THE CONCEPT, not just the IDEA, but the actual code itself, taken right out of FASM? |
|||
23 Aug 2006, 10:39 |
|
vid 23 Aug 2006, 11:31
Quote: If FASM were modular, someone else, say Bogdan, for example, who is designing his own assembler, could scavenge relevant components, maybe the parser, for instance. But, I don't see people lining up, with their hands out, hoping to acquire some of these supposedly modular components of FASM. http://board.flatassembler.net/topic.php?t=4191 |
|||
23 Aug 2006, 11:31 |
|
MHajduk 23 Aug 2006, 12:06
vid wrote: ... I can read fasm code quite fluently... S pozdravom, M.H. |
|||
23 Aug 2006, 12:06 |
|
tom tobias 23 Aug 2006, 18:04
vid offered, in response to my question requesting an illustration of FASM's supposed modularity, (as proposed, previously in this thread, by Fudder,) this link from 2005:
http://board.flatassembler.net/topic.php?t=4191 There, revolution wrote: Quote:
Tomasz replied: Quote:
Revolution's comment in response: Quote:
Having not studied the problem, i.e. having not yet downloaded the ARM specs, or the software in question, it appears to me that this illustrates the very opposite of modularity. It seems, from these comments, that Revolution has taken THE WHOLE OF FASM, even when Tomasz suggested that it might be better to pare back some of the files, Revolution replied that he wanted to see what could be done by changing AS LITTLE AS POSSIBLE. This is the OPPOSITE approach to modular programming. Here, Revolution is acknowledging, without so writing, that it is arduous to try and dissect FASM, it is easier to simply leave FASM intact, even though, most of FASM should be irrelvant to ARM, as Tomasz hinted. This is less a testament to the supposed modularity of FASM, and more a confirmation that it is nearly impossible to break FASM apart, and use only some module or modules for a new application. This reference, to me, repudiates, rather than reinforces the notion of modularity in FASM. |
|||
23 Aug 2006, 18:04 |
|
LocoDelAssembly 23 Aug 2006, 18:21
tom tobias, why you constantly refer to f0dder as Fudder? Just typo error?
BTW, why do you think that changing a code as little as possible is opposite to modular programming? Is not suppossed that modular programming is intented to simplify future modification by doing less job that a non modular program? Regards, Hernán |
|||
23 Aug 2006, 18:21 |
|
vid 23 Aug 2006, 18:24
he didn't take some modules from FASM, as you may have thought. He replaced one module with another, specifcly x86 assembler module was replaced by ARM assembler module. Rest remained same (preprocessor, parser, formatter).
|
|||
23 Aug 2006, 18:24 |
|
tom tobias 23 Aug 2006, 19:45
Quote:
1. yes, typo error, of sorts, actually, sign of inadequate DNA; 2. prejudice against all FUDDERS; 3. unskillful 4. no umlaut on the keyboard, and too lazy to download a universal font 5. long, many DECADES of incorrectly typing Fudder instead of fudder. 6. BUT I PROMISE to try and improve.... (old dogs, new tricks, you know what I mean......) Quote:
I suppose you are correct. I am mistaken. fudder is right, I am wrong. |
|||
23 Aug 2006, 19:45 |
|
Borsuc 28 Aug 2006, 13:59
tom tobias wrote: If my life depended upon it, I could not explain what this code fragment is supposed to accomplish. I did not remove the comments--there simply are none. Quote: Wenn mein Leben nach ihm abhing, könnte ich nicht erklären, was dieses Codefragment vollenden soll. Ich entfernte nicht die Anmerkungen--es gibt einfach keine. Is it well written? I don't know. Is it correct? I don't know. Is it gramatically correct written? I don't know. Could the syntax be improved?? I haven't the slightest idea....I am so ignorant here, and so completely lost, that... (and so on) Second, criticizing someone's work is a sign of weakness, and you no doubt have that. That is, it's YOUR fault that you are "not clever". Did you ever bother to learn asm in "our (fanatical from your point of view) way", did you ever appreciate every creation, every low-level thing? Did you ever appreciate computers? So you see, it's in fact your fault that you don't even want to learn the language "the proper way", and you bash our work because you are not able to understand it. So what? Write it better. If you can't, then why do you criticize us instead of appreciating us (I'm mainly referring to Tomasz, since he is your main target, from what I see, you criticize Fasm)? Ok, let's take an example (it's only an example): I want to "understand" ALL the languages in the world. That damn chinese language... it uses such a different alphabet that I am unable to comprehend even a single word. Maybe I should start criticizing the chinese because they make it so very unreadable for me. Is it their fault or is it actually MY fault that I do not "try" to learn their language? I just want to clap and understand it? Maybe I should put some effort? That example was not very far from your perspective, really. But of course I am not such a bastard (that's why it was only an example). Tomasz writes Fasm in "his" way, why do you criticize him? Write it your way.. oh, I'm sorry, I forgot you're not clever (or at least you claim you're not clever) and want to write an assembler without any knowledge of it. Don't worry, you can start criticizing others and perhaps you'll gain more than working honestly and learning, while putting EFFORT in it to truly show that you WANT to do it, like we did it. Again I said this a thousand of times: asm is NOT designed for READABILITY. Don't you ever get it? It was designed for us "fanatics", and those who appreciate low-level stuff (like CPU writers), NOT for READABILITY. Tell me, if asm is readable, how does that make HLLs? More readable? And if so, why use asm at all, if it is the same as a HLL? I don't know why you would never simply understand this simple fact. But you'd better get back to work -- you know, criticizing everyone else, including "old" computers which you call crap, though you never actually started to understand what they really are. |
|||
28 Aug 2006, 13:59 |
|
vid 08 Sep 2006, 07:10
i think this thread no longer belongs to Projects, i move it to Main (without the discussion, it could go to Compiler Internals)...
|
|||
08 Sep 2006, 07:10 |
|
arafel 16 Oct 2006, 11:25
Hehe, it was really fun reading this thread.
Tom, you raise some interesting points. And while I agree with most of them, your opinion on deliberate code obfuscation (as in the 'or' case) has nothing to do with code readability that you have stressed so much. A house built with bolts, is not less a house than the one built with nails. As well as using xor eax, eax to clear a register is no less legitimate way than using mov eax, 0; sub eax, eax; or dec while not zero. with the only difference being speed, size, and/or developer personal preference. And unless the application incorporates some high code optimizations which need to be commented on line-by-line basis, it really shouldn't be commented in the source why one instruction was chosen over the other in some particular case. Third party reading the source and having adequate knowledge of a given language will understand anyway the purpose of particular instruction and if not than it's not really an author's fault. The_Grey_Beast wrote: Second, criticizing someone's work is a sign of weakness, Constructive criticism is ALWAYS a good thing, and sometimes even a necessity for a product intended for a public use. Quote:
It's no one's fault. At any given moment you can go to a bookshop, purchase book and start learning. But only because there ARE books commenting and describing the language. Imagine how harder it would be if the only source of information was only a Chinese writings without any commentary. Quote:
So you basically claim that Assembly can be used only for hobby programming? |
|||
16 Oct 2006, 11:25 |
|
vid 16 Oct 2006, 11:54
hehe, asm wasn't designed for readability nor for fanatics. it was just symbolic version of machine language. and asm code can be written readable. even readable considered by tom tobias (it is rumored that smiddy writes such code)
|
|||
16 Oct 2006, 11:54 |
|
Borsuc 19 Oct 2006, 17:08
arafel wrote: Constructive criticism is ALWAYS a good thing, and sometimes even a necessity for a product intended for a public use. arafel wrote: So you basically claim that Assembly can be used only for hobby programming? Asm is meant to be used for optimizing. That's why there are so many HLLs out there -- to accomodate each ones preferences. Most HLL focus on readability and (so called) clear syntax. Asm is just different in that it focuses on internals and optimization. However, like Tomasz, I do see programming as a kind of art. It doesn't matter what language I use -- the design is some "art"-ish piece of thing. You have to use imagination. Of course I'm reffering for original things -- i.e buying some software and using it is no art at all vid: don't get me wrong. I was not telling we are "fanatics". I did so from tom's point of view -- he sees us as the ones who fall in darkness and need some enlightment. ps: I'm a bit tired of reading such topics, especially since they're so long. Never really took them seriously anyway happy coding _________________ Previously known as The_Grey_Beast |
|||
19 Oct 2006, 17:08 |
|
vid 02 Dec 2006, 20:05
just for fun, i copypasted few tom's posts to this Mark V Shaney, to see how it can mimick his style:
Mark V Shaney wrote:
some are good |
|||
02 Dec 2006, 20:05 |
|
Goplat 02 Dec 2006, 21:43
tom tobias wrote: If my life depended upon it, I could not explain what this code fragment is supposed to accomplish. I did not remove the comments--there simply are none. mov ah,9 / mov dx,_passes_suffix / call dos_int Displays the string at _passes_suffix. xor ah,ah / int 1Ah Puts the BIOS's counter of timer ticks in CX:DX. mov ax,cx / shl eax,16 / mov ax,dx / sub eax,[start_time] Put the value in EAX and subtract the saved value of the counter from when fasm was started. Result is the number of ticks that have occurred during compilation. mov ebx,100 / mul ebx / mov ebx,182 / div ebx Converts tick count into a number of tenths of a second. (There are about 18.2 timer ticks in a second) or eax,eax / jz display_bytes_count If it's zero, don't bother with it, just skip to displaying the output size. xor edx,edx / mov ebx,10 / div ebx / push edx This is incomplete, but it looks like it's the start of the code to turn the number into ASCII in order to display it. Before criticizing other people's assembly code, maybe you should actually learn assembly? |
|||
02 Dec 2006, 21:43 |
|
Filter 03 Dec 2006, 23:40
Well this is an interesting conversation. I feel like adding my own opinions.
Tomasz does this for free so he can do what he feels like. Although, it is nice when code is well commented. It helps idiots like me understand what is going on. Most of the time when assembler is used it is not so the code can be obscure but rather faster and with smaller resulting binaries. Even assembler should be well commented. Having the idea that it doesn't matter is assembler is obscure because it is low level anyway doesn't make sense in my view. FASM is the only assembler that I have actually been able to learn anything on. I would get too tied up with all the semantics that I think are weird like .small and trying to remember what they all do instead of just trying to learn how to code in itself. With FASM I didn't have to do that and now I am understanding assembler. I sincerely thank Tomasz from the bottom of my heart for creating such a great assembler. I hope one day I will be able to look at the code from FASM and understand what is going on, better comments or not. |
|||
03 Dec 2006, 23:40 |
|
Goto page Previous 1, 2, 3 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.