flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2, 3 Next |
Author |
|
MHajduk 22 Aug 2006, 08:54
vid:
I hope that it wasn't directed to me: vid wrote: You are blaming our programs for not being readable to you, but you don't know the language they are written in. I've just described my way of programming. I don't blame You and anyone from this forum. BTW. It's Your 2000th post! Congrats! ![]() Regards, M.H. |
|||
![]() |
|
vid 22 Aug 2006, 09:00
no it was to tom tobias - he is the one who says our "programs" are unreadable, and then on practical example he showed that it's because he can't read - he don't know the "words", how are they used (xor), how are some "words" applied to context (mul with one argument) etc.
|
|||
![]() |
|
MHajduk 22 Aug 2006, 09:04
Uff!
![]() ![]() BTW, how to say 'Regards' in Slovak language? |
|||
![]() |
|
vid 22 Aug 2006, 09:10
Could be "S pozdravom" (can be translated better as "with greetings"), but it's kinda "official" style
|
|||
![]() |
|
MHajduk 22 Aug 2006, 09:12
OK. What about "non-official" style?
S pozdravom, M.H. |
|||
![]() |
|
tom tobias 22 Aug 2006, 14:07
Quote:
Lots to discuss here, but sticking to the only two people's comments which thus far have been meaningful, i.e. Fudder, and Garthower, let me explain to poor Vid, that, as Fudder noted above, it is incorrect to write OR reg reg, when one wishes merely to establish the value of a particular flag for a loop instruction, (instead one ought to employ TEST, for, as Fudder explained (thanks!) TEST, unlike the boolean instructions, has no impact on the contents of the register.) The fact that I had assumed a typographical error, i.e. that OR was really XOR, points to the reason for NOT USING XOR to clear registers. Thus, VID, it was not that tom is unable to READ the meaning of XOR, an instruction whose misuse is well appreciated by me, it is that Tom could not figure out, before Fudder's explanation, why the OTHER BOOLEAN operator, OR, was in the code. CODE. not program. CODE. WHY CODE???? Because it is not the skill of READING which is necessary to possess when examining FASM source, but the skill of DECRYPTING the code. If it were READABLE, one would not need to decrypt it. It would not have INVISIBLE operands: (Vid, the mul instruction doesn't REQUIRE invisible operands, it can be used NORMALLY, with two operands, but using the second operand would then make the CODE readable, instead of CRYPTIC, as Tomasz prefers.) Yes, Vid, I have a reading disorder, I am unable to READ PEOPLE'S minds. I can not see invisible operands. I am sure that Vid considers it FURTHER evidence of Tom's obvious DYSLEXIC condition, that he does not understand the significance of the numeric constant, what is it, 182, or some such eminently readable value. Obviously, NORMAL people, can see that value, and UNDERSTAND what it signifies, so tom must have an impairment, a relatively severe form of dyslexia. I will conclude my ramblings on this topic by acknowledging with gratitude the excellent rejoinder, which Garthower offered, above, in reply to the moronic suggestion yesterday, that Assembly language is unfit to be presented in readable fashion. Outstanding contribution from the originator of this very useful thread. If for whatever reason one does not wish to read Dandamudi's excellent textbook, (better than Knuth, in my opinion), then, Kip Irvine's book is also wonderful, and I further admire Brey's very skillful text. There are several other well written books, even some on the internet, which support the notion that good programming can be accomplished with Assembly language, as with any other language. I posted, about a year ago, a review of several assembly language programming books, maybe it is still around in the dusty archives somewhere.... ![]() |
|||
![]() |
|
UCM 22 Aug 2006, 14:42
Unfortunately, 'mul' does not accept a second argument.
![]() |
|||
![]() |
|
vid 22 Aug 2006, 14:42
hey, don't take it too serious
![]() could you try to post link to some actual asm code/book that you find readable? It's hard to get those books here just by name, and if you can somehow find them, they cost too much. About invisible mul operand: it's what i caled "definition of word". It's common definition that "mul reg32" performs "EDX:EAX = (unsigned)EAX*(unsigned)reg32". If you don't know words, you can't read. There is not way to write this another way, if you would write it using two-operands form of mul, you would end up with potential bug in code, there will your desire for readability and lack of "vocabulary" lead. About or - yes, "test" is more understandable and better, "cmp" is even more understandable. But using OR for this is so common, that it cannot be considered some kind of hack. Just same as when you use "i.e.", or "..." in you text, btw, if you wouldn't pull that source out of context, it would be much more understandable. It is like ripping sentence "And then he did it!" from book, and blaming it because you don't know who did what. And you cut it off exactly at place where it really did something (where it stopped refering to context and showed what is context). So i think you understood what that code does too, otherwise you wouldn't know where to cut it so well ![]() ![]() For me, biggest comment worth of this block (+part you censored) would be ";display elapsed time" before calling int 1Ah. PS: my nick is "vid", not "Vid". I am not calling you "Tom" too ![]() Last edited by vid on 22 Aug 2006, 15:07; edited 1 time in total |
|||
![]() |
|
MHajduk 22 Aug 2006, 15:03
tom tobias + vid = the best way to making thread trendy
![]() S pozdravom/Regards, M.H. |
|||
![]() |
|
MHajduk 22 Aug 2006, 16:34
tom tobias wrote: Dandamudi's excellent textbook Do You mean that: http://www.scs.carleton.ca/~sivarama/asm_book/asm2ed_slides/slides/al2ed_chapter1.ppt ![]() Regards, M.H. |
|||
![]() |
|
tom tobias 22 Aug 2006, 18:53
Quote:
http://board.flatassembler.net/topic.php?t=4074&start=20 vid and Mazegen drinking my favorite brew... Quote:
Intel486 Programmer's Reference Manual (1992) (hey, I am only 15 years behind the times...) page 26-218 "opcode F7/4 Instruction: MUL EAX, r/m32" Description: A doubleword operand is multiplied by the EAX value, and the result is left in the EDX:EAX register..." Quote:
yes, Thanks M.Hajduk, great find. I did not know of this powerpoint presentation. I wonder if the rest of Dandamudi's lectures on Computer Organization and Architecture are also available. This was a great teacher, in my opinion. Quote:
Dandamudi's books are here: http://www.bizrate.com/computerbooks/pid327491375/compareprices.html http://www.amazon.com/gp/product/0387206361 http://www.powells.com/biblio?isbn=0387206361 Kip Irvine's book: http://www.amazon.com/gp/product/0130910139/ref=pd_bxgy_text_b/104-3772569-6914311?ie=UTF8 Barry Brey's book: http://www.bestwebbuys.com/The_'intel_Microprocessors_8086/8088_Pentium-ISBN_0131195069.html?isrc=b-search (and read the fine print, they have an "International Edition", for less money!) Quote:
No, I don't consider it a "hack", I consider it an ERROR. It is WRONG. One MUST not employ BOOLEAN operators, to perform NON-BOOLEAN functions. This is the heart of the distinction between writing CODE, and writing a program. Quote:
Well, truth be told, I just clicked my mouse on the directory with FASM sources, and clicked on the first file, and took out a chunk of code in the middle of the file. I didn't devote more than ten milliseconds of time trying to find a suitable bit of code to illustrate the point. What is the point? OK, I admit, I tend to ramble, though I do display slightly improved coherency, and exhibit the tiniest possible sense of humor, after a couple of pints of pilsner urquell (lower case in honor of VID). The point is this: An excellent question was posed by Garthower, and excellent responses were obtained from Fudder and MHjduk, explaining much better than I will ever be able to, how one should program, instead of authoring CODE. I challenged the notion, perhaps unconvincingly, that FASM code should be called Spaghetti code, or, in honor of VID, or Vid, or vid, spaghetti code. Specifically, FASM is NOT READABLE. It is CRYPTIC. I believe, that Tomasz, by his response, has explained the rationale for this cryptic appearance: HE WANTS FASM source code to be NOT UNDERSTANDABLE, i.e. NOT READABLE. Obviously, if "OR" CAN be used to accomplish what "TEST", or "CMP" do, (EVEN BETTER than "OR", because they carry NONE of the excess baggage which "OR" provides,) then, a guy as proficient as Tomasz knows that fact. The notion that this is simply a question of "TASTE", as suggested by Tomasz in his Latin aphorism, is of course NONSENSE. He knows EVERY instruction backwards and forwards. "OR" is sitting in that unreadable code specifically because it DOES NOT afford readability. It is obscure. It is cryptic. In fact, it is ILLOGICAL, because FASM here is NOT performing a Boolean operation. If Tomasz put it in his code, and I believe he did, then, it is not there "as a hack", nor is it inserted as if by accident, "OR" was placed there DELIBERATELY, CONSCIOUSLY, and, in my opinion, IN POOR TASTE. As Tomasz noted yesterday, FASM is written AS HE WANTS IT TO BE, an artistic endeavor, not a software engineering project. Quote:
Quote:
Ok. yeah, maybe I am a little too serious. Had one p.u. for lunch, and it is not yet time for the 1600 bottle, or beyond, so hey, yeah, maybe I should delay writing anything further until after dinner.... However, it is not TRENDY, dear friend, that we need, but CLARITY. We cannot answer Garthower's question based on trendiness. ![]() |
|||
![]() |
|
vid 22 Aug 2006, 19:17
okay, so we ended up with "matter of taste". I quess that matter of taste for most (asm) programmers is to produce code whose quality are shown when people USE their apps, instead of when people study or maintain their apps.
What do you think programs (in general meaning, not in yours) are for? To be used, or to be maintained? Really, you are only one i know, who prefers readability and clearness of source over functionality. (not taking programming teachers into account, of course). Also, i am still wondering, even after two times not answered, what will be your readable solution to FASM's "heavy use of pointers" problem. You surely remember, as example i gave you the directive/instruction handler table... how will you do it? |
|||
![]() |
|
okasvi 22 Aug 2006, 19:44
we should have option to choose 'title' under our nicknames here with options 'Proud CODER' and 'Boring PROGRAMMER' or such...
![]() |
|||
![]() |
|
f0dder 22 Aug 2006, 21:45
s/Fudder/f0dder
Oh, and tom, learn to break your ramblings into paragraphs - it's an unreadable mess otherwise. |
|||
![]() |
|
vid 22 Aug 2006, 22:42
Quote: we should have option to choose 'title' under our nicknames here with options 'Proud CODER' and 'Boring PROGRAMMER' or such... we can already... ![]() Quote: Oh, and tom, learn to break your ramblings into paragraphs - it's an unreadable mess otherwise. kinda... spaghettish ![]() ![]() |
|||
![]() |
|
tom tobias 23 Aug 2006, 00:00
Thank you vid, for soliciting my opinion concerning access of elements within a data structure. I fail to see the relevance of this question to the central issue discussed in this thread, i.e. whether or not FASM is amenable to modification, as Garthower inquired.
We have learned, yesterday, from Tomasz, that his opus lies within the domain of ART, not engineering. Accordingly, it will not be subject to any kind of rigourous analysis, since, in the end, the changes desired will occur, if at all, in accord with the whims of the artist, not the requirements of the technicians using, or potentially using, his piece of "art". Garthower's question has thus been addressed. In the course of pursuing this interesting thread, we have learned, somewhat off topic, that you, vid, consider FASM to be eminently readable, while I consider that FASM is utterly unreadable, cryptic text, aka CODE. Whether or not FASM is "readable", or "cryptic" remains for me, a topic of considerable interest, but, I doubt that anyone else on the forum shares my enthusiasm for exploring this point further. In any event, whether or not one can demonstrate, objectively, to yours, or to anyone else's satisfaction, that FASM is, or is not, readable, what difference does it make, since, the only value in readability lies in the encouragement of CHANGE, a feature undesired by the artist who has created his oeuvre? With regard to Okasvi's suggestion for us to adopt titles, you can simply call me boring: Quote:
Quote:
Still, if my pedantic style could elicit some few laughs, even at my own expense, I will be satisfied....I do enjoy eating pasta... ![]() |
|||
![]() |
|
okasvi 23 Aug 2006, 00:16
sry, I wasnt calling you boring, but I find PROGRAMMING boring |:
that's why I've never even thought of doing programming nor coding for living... edit: btw. my nick here is 'okasvi' for a reason, 'Okasvi' looks stupid ![]() |
|||
![]() |
|
RedGhost 23 Aug 2006, 00:50
fasm source is very readable, very compact and organized style. The only fault of the fasm source is the lack of comments which I have seen Tomasz comment on before on these boards. If you think readability is more important than size and speed maybe you are posting on the wrong type of forum?
![]() _________________ redghost.ca |
|||
![]() |
|
MHajduk 23 Aug 2006, 09:25
RedGhost wrote: If you think readability is more important than size and speed... ![]() Regards, M.H. |
|||
![]() |
|
Goto page Previous 1, 2, 3 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.