flat assembler
Message board for the users of flat assembler.

Index > Main > [SUG] @@@:, jcc @@f, & jcc @@b

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner 04 Mar 2006, 13:48
do you program any usable program yet (not hello world) using fasm?
i am curious.
Post 04 Mar 2006, 13:48
View user's profile Send private message Visit poster's website Reply with quote
Posetf



Joined: 01 Mar 2004
Posts: 35
Location: London
Posetf 05 Mar 2006, 03:41
vbVeryBeginner wrote:
do you program any usable program yet (not hello world) using fasm?
i am curious.


Depends who you were asking. But you failed to state who that is. Since I
started this thread, it might be me. In which case the answer is a definite yes;
a hybrid interpreter/compiler with over 40 working test sets: >> 4000 individual
tests. Admittedly though, I am only writing a back end in fasm, the front end
is/will be self-hosted.

Regards,
Pete
Post 05 Mar 2006, 03:41
View user's profile Send private message Visit poster's website Reply with quote
Posetf



Joined: 01 Mar 2004
Posts: 35
Location: London
Posetf 05 Mar 2006, 03:56
tom tobias wrote:

Readability is in the eye of the beholder.

Hmm. Discussion of this is not pointless. We all need other peoples views.
tom tobias wrote:
As is the case with "misuse" of boolean operators to clear a register,

I habitually use xor eax,eax ; eax=0
tom tobias wrote:

rather than some sort of secret code that naive persons can not hope to comprehend. Maybe I should abandon the goal of convincing people to use letters arranged as meaningful words. Ok. I yield. Smile

Your argument would be better stated with an example of something you hate with the 'right way' after it. The blanket statements you make will never convince anyone.

Regards,
Pete
Post 05 Mar 2006, 03:56
View user's profile Send private message Visit poster's website Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner 05 Mar 2006, 07:26
vbVeryBeginner wrote:
do you program any usable program yet (not hello world) using fasm?
i am curious.


hi posetf, the "you" is not you, i reffer to tom tobias
Post 05 Mar 2006, 07:26
View user's profile Send private message Visit poster's website Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias 05 Mar 2006, 10:07
Posetf wrote:
...The blanket statements you make will never convince anyone.
I doubt that blanket statements by most folks are convincing. Many of my most outlandish proclamations are meant to challenge, and to stimulate thinking outside the traditional method of doing things. As far as your excellent suggestion to provide "an example of something you hate with the 'right way' after it", let me return to the thrust of the thread, which you kindly originated, and use your example:
@@@whatever, as something I detest (because it is an accumulation of symbols lacking an intrinsic meaning except to those who follow some secret CODE). With regard to providing an illustration of writing which I find attractive, here is this post from 02Mar2006@17:11, which I submitted to the forum:
http://board.flatassembler.net/topic.php?t=4785&postdays=0&postorder=asc&start=20
It is worth repeating from that thread, that this extract of the late Dr. Dandamudi's worthy textbook, on the subject of assembly language programming, is not offered to vindicate some of my "extreme" positions, but rather to illustrate the "correct" style and method of programming, as opposed to the typical FASM post, such as your own, Pete, which, in my opinion, is largely unreadable (including, FASM source, in many cases). The notion of criticizing someone's contribution, which, at first glance seems disrespectful, is in fact, intended, at least by me, to offer an alternative opinion, to what often constitutes the prevailing mood, and therefore, may be an isolated, hence, irrelevant notion, or on occasion, may actually represent something of merit. Each circumstance is different. In your case, Pete, you commenced by writing something which is (in my opinion) COMPLETELY ERRONEOUS, namely, "As we all know...". No, I don't know, and further, as I stated at the outset of this topic, I don't want to learn about any secret codes, not yours, not Privalov's, not expert ABC's, not Intel's, not Microsoft's, not ANYONE's. I want READABLE PROGRAMS, not CODE. @@this or @@ that is NOT readable, anymore than ##2a, or ^*$gh is readable. Some people understand a CONVENTION, a typical useage, for @@@@, but I am not one of them, nor do I wish to become one of them.
@VeryBeginner:
Thanks for your question. Implicit in your question about whether or not I currently use FASM, is another question: Does person ABC, in this case, me, possess the necessary prerequisite skill and experience to dare to challenge some topic on this forum?
In particular, who is this guy, tom, and who is he to come here to our forum, and ask impudent questions? OFF WITH HIS HEAD.
Actually, this is not very far removed from reality. In ancient times, and in fact, not even so ancient times, those who challenged the authorities were EXECUTED. As recently as YESTERDAY, in Kandahar, the Taliban were fomenting unrest, and KILLING people, who dared to challenge the autocratic methods explicitly written in both the Koran, and its antecedent documents, in particular, the Torah.
Yes, I disrespect ALL authority. I don't respect ANYONE, because of their stature. I don't bow down, or bend to the will of ANY autocrat, for any reason. I CHALLENGE every single stupid assumption, whenever I possibly can. The Bible? The Torah? The Koran, The BhagavadGita? ALL TRASH as far as I am concerned. Where do I get the authority to challenge such notables as the POPE, or the President of the USA, or Mohammed, or Jesus, or ANY OTHER BIG SHOT?? I have no authority. I have no experience. I have nothing to justify my incredulity. I have no credentials. I have no money. I have no power, and I certainly do not possess "THE TRUTH". I do possess a willingness to challenge ANYONE on ANY topic, at any time, even though, I acknowledge having no RIGHT to challenge anyone about anything, because I am ignorant. In a perfect world, I suppose the only folks who could challenge an authority, would be those possessed of knowledge and/or experience superior to the existing authority. So, I answer your question this way. Yes, you are correct to challenge my right to question anyone about anything, for almost everyone on this forum knows more than I about most things. I suggest that since you now know this fact, which I had thought was not concealed, but which is certainly now completely exposed, you may relax, and simply ignore my ramblings, as utterly irrelevant.
Smile
Post 05 Mar 2006, 10:07
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20299
Location: In your JS exploiting you and your system
revolution 05 Mar 2006, 11:40
tom tobias: You don't like the suggestion. That's fine by me for you not to like it.

Posetf: You think it is a good idea. That's also fine by me for you to want it.

Each to their own, I always think.

Personally I would not like to use such a construction in my code/program, but that's just me. I would be botherd by the feeling that when I come back in weeks/months/years and look at the code/program I would cringe and despair at how to understand it.

However, if the author wants to include the suggestion in the final product (which he is perfectly entitled to do) then it is always my choice to use it or not to use it. I occasionally use the current @@ construction, mainly because it is there and I get lazy sometimes to think of a better name, but I always try to make it jump np more than a few instructions at a time so as to keep the "flow of reading" easy.

One important point with the @@ style labels is remembering NOT to use them in macros. Macros can sometimes look like typical instructions and JMPing over a macro with a @@ label might just end up JMPing into the macro code instead.

I really wish there were a truly "correct" way to do programming. But unfortunately such a concept cannot be the same for everyone. I do my best to respect opinions when I hear/see them. People have always and will always think differently from others. Such is life.
Post 05 Mar 2006, 11:40
View user's profile Send private message Visit poster's website Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner 05 Mar 2006, 11:48
Quote:
I CHALLENGE every single stupid assumption, whenever I possibly can.

assumption is based on perception, and perception is based on experience. and people gather experience only after they gone through it.

Quote:
Yes, you are correct to challenge my right to question anyone about anything, for almost everyone on this forum knows more than I about most things.

since you said, "for almost everyone on this forum knows more than I about most things", then you said . " I don't want to learn about any secret codes, not yours, not Privalov's, not expert ABC's, not Intel's, not Microsoft's, not ANYONE's."

well... maybe u just another stuborn guy out day :p
k, enjoy your life.
Post 05 Mar 2006, 11:48
View user's profile Send private message Visit poster's website Reply with quote
RedGhost



Joined: 18 May 2005
Posts: 443
Location: BC, Canada
RedGhost 05 Mar 2006, 12:00
maybe when(if) this feature is added (i hope Surprised) there can be two versions of FASM, one with, one without, seems like this is going to start a jihad Laughing

_________________
redghost.ca
Post 05 Mar 2006, 12:00
View user's profile Send private message AIM Address MSN Messenger Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 05 Mar 2006, 13:04
So far I haven't seen any fork-versions of fasm not maintained by me, and from my side you can expect I will add only the features that I like and that fit, in my opinion, my overall vision for fasm (for this reason I started writing texts like Design Principles or Understanding fasm in hope that this will make it easier to understand some of my choices).
Recently the most of features added are the ones that bring fasm's syntax back nearer to other assemblers in some areas (while retaining fasm's own solutions in areas where it already has defined individuality, the example is the fasm-specific logical expression syntax combined with the ".if" macro). Thus for the features like this one I would consider it to be an important hint if some of the "mainstream" assemblers already had something like that. Otherwise, I do not want to be the first to go into such direction (since I don't like it).
Post 05 Mar 2006, 13:04
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 05 Mar 2006, 22:25
However, look how simple is to implement this feature as macro, if you really want it Wink
Code:
macro @@@ colon
{ @@b equ @@f
  @@b:
  local ..new
  @@f equ ..new }    

Test code:
Code:
@@:
@@@:

        jmp     @@b
@@@:

        jmp     @@b
        jmp     @b    
Post 05 Mar 2006, 22:25
View user's profile Send private message Visit poster's website Reply with quote
RedGhost



Joined: 18 May 2005
Posts: 443
Location: BC, Canada
RedGhost 05 Mar 2006, 23:13
Tomasz Grysztar wrote:
However, look how simple is to implement this feature as macro, if you really want it Wink
Code:
macro @@@ colon
{ @@b equ @@f
  @@b:
  local ..new
  @@f equ ..new }    

Test code:
Code:
@@:
@@@:

        jmp     @@b
@@@:

        jmp     @@b
        jmp     @b    


never considered using macroinstuctions for this, probably will from now on

Tomasz Grysztar wrote:
So far I haven't seen any fork-versions of fasm not maintained by me, and from my side you can expect I will add only the features that I like and that fit, in my opinion, my overall vision for fasm (for this reason I started writing texts like Design Principles or Understanding fasm in hope that this will make it easier to understand some of my choices).
Recently the most of features added are the ones that bring fasm's syntax back nearer to other assemblers in some areas (while retaining fasm's own solutions in areas where it already has defined individuality, the example is the fasm-specific logical expression syntax combined with the ".if" macro). Thus for the features like this one I would consider it to be an important hint if some of the "mainstream" assemblers already had something like that. Otherwise, I do not want to be the first to go into such direction (since I don't like it).


imo thats when fasm went a bit down hill, when it started emulating support for other assemblers syntax, i really prefer fasm syntax, if i wanted masm i would code in masm Smile

_________________
redghost.ca
Post 05 Mar 2006, 23:13
View user's profile Send private message AIM Address MSN Messenger Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 05 Mar 2006, 23:22
All the emulating that exists is only in form of the macros - thus you can reject them or modify them, as you wish. The "bringing syntax back nearer to other assemblers" I mentioned was in choosing the keywords for some new directives - instead of inventing new own names, I chose the ones that were used for analogous directives in the TASM, which was one of the bases for the fasm's syntax. The features themselves, however, are still differently implemented in case of fasm, because of its generally different philosophy - see the "Understanding fasm" I'm working on.
Post 05 Mar 2006, 23:22
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 06 Mar 2006, 07:20
nice Wink

you could also match =:, colon
Post 06 Mar 2006, 07:20
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2465
Location: Bucharest, Romania
Borsuc 07 Mar 2006, 18:36
tom tobias wrote:
I suppose for non-native speakers of English, this point may seem quite arcane, distant, obtuse, and irrelevant.

Well, I'm not native english speaker, but I like english FAR more than romanian (in my programs, of course).. but I still don't like lengthy-english names for my CODE (program = code + comments).
tom tobias wrote:
I want READABLE PROGRAMS, not CODE. @@this or @@ that is NOT readable, anymore than ##2a, or ^*$gh is readable.

Well, @@ is quite readable for me. So, your statement is false (i.e it's false from someone else's point of view). And I argued because you said in your first post that we make a mistake, not just that you think that's not readable from your point of view, but rather saying that our perspective is wrong and yours is right.

For example, suppose I don't like Pascal (and that's true, anyway), but I like C.. and I find C much more readable (without lengthy-names and operators) than Pascal. What if I say C is the READABLE language? Does that make my statement true? Obviously not, because that's just from my point of view. If you were to say that Pascal is the READABLE language, then which of the two statements is the true one? Yours or mine? The answer, of course, is none of them, because a third guy could show up and say that Machine code is the READABLE language (sure, I'm exaggerating here, but you get the point).

Just because I like english in the comments/notes I make doesn't mean that I must use that skill to program. I understand the computer and see it different than the human perspective, and since it doesn't understand human languages directly, then I suppose it's quite ok if I don't use my english skill to program, but rather my programming skill (and experience, of course).

Do you want to understand a program written in ANY language? You can't possibly read something that is not written in a language you know. Especially not from it's CODE.. the notes/comments, however, are another story.

When I took a look at some big source code, I usually don't even know where to start. Why?? Because the author didn't add a few notes to explain: the overall structure of the code, the design that it follows, a brief walkthrough the entire code (this also helps to redesign your code better, etc..), a summary (if it's a small program), what he had in mind when designed this code (so others can possibly fix bugs, if the CODE is buggy, or simply find other algorithms for better design), and finally, additional notes to be aware of. So you see, CODE doesn't need to be lengthy english-style, because that is not how compilers see it easily, and not how some of us see it easily either. Such lengthy names like in Pascal make me see the code pretty FULL (somehow, I don't know how to explain this, but I like CLEAN code, with many spaces and a few symbols).

tom tobias wrote:
As is the case with "misuse" of boolean operators to clear a register,

I would rather not call it misuse.. they are circuitry inside, what's to misuse? Maybe for how humans prefer to think (not everyone, for example me, but...), but not for computers. So what's to misuse? A circuitry? Or some bytes/bits for the application? I don't know how you think (abstracted, of course) about the boolean logic, but it's certainly not the one used by the CPU.. So I would rather call your method a misuse of the CPU's circuitry, but I'm getting off the point.

Seriously, why do you even bother with asm then? If you need READABILITY (from your point of view), Pascal or other HLLs suit (note: you don't consider C readable, that's ok for your perspective).. Asm is the language closer to the CPU logic. To appreciate how to program well in assembly, one must have the knowledge and thinking of how the computer works and it's logic, not the human's logic. Needless to say that if you code so unoptimized (small example: mov eax, 0 instead of xor eax, eax) in asm, and consider this a "misuse", then a HLL compiler can probably even generate better code, and the HLLs are easier to read anyway, so I simply don't know why you chose asm?

tom tobias wrote:
I don't want to learn about any secret codes, not yours, not Privalov's, not expert ABC's, not Intel's, not Microsoft's, not ANYONE's

Ah, but you do want to learn the english language's secret codes (or words, if you prefer). Razz

I know, this discussion is pointless anyway.


Tomasz Grysztar wrote:
However, look how simple is to implement this feature as macro, if you really want it Wink

Fasm is so damn powerful Very Happy That's why I love it Smile

Tomasz Grysztar wrote:
So far I haven't seen any fork-versions of fasm not maintained by me, and from my side you can expect I will add only the features that I like and that fit, in my opinion, my overall vision for fasm (for this reason I started writing texts like Design Principles or Understanding fasm in hope that this will make it easier to understand some of my choices).

That's what I like about you -- you explain the design, which many (and I mean, MANY) programmers, sadly, forget or simply don't want to add. Especially because there are many notes they tend to miss, and that can be a crucial step, to either explain the structure of the code or any other notes that someone needs to be aware of when reading the program. You're, sadly, one of the few such guys who explain the stuff, and that's what I really like about you Wink. Keep up the good work :thumbsup:
Post 07 Mar 2006, 18:36
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 26 Jun 2007, 14:28
@@:
it's use full if you don't find the name of the label or if your label is not a really important address like a loop in an other loop in another loop

and it's very readable, more than names everywhere
you just have to practice this in your codes
Post 26 Jun 2007, 14:28
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< 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.