flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Submission: while / break / end while

Goto page Previous  1, 2, 3
Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 01 Aug 2005, 08:54
Well, not really. I just wanted to signalize that it's possible to make such macro even someone really wanted to try. But the main problem with such expressions is that generating a good code out of them is actually the same as HLL compiling with optimizations - since this is the assembly language, the low-level solutions (simple "brick" commands) are better in my opinion.
Post 01 Aug 2005, 08:54
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 01 Aug 2005, 10:24
Nickolay has just reminded me that FOR was earlier called IRP in MASM and it goes in TASM the same way. So maybe better would be to call this IRP? Especially that REPT in MASM has been called REPEAT at the same time when IRP became FOR.

Also there was an IRPC directive to loop through all the characters. With fasm's preprocessor it wouldn't make sense, since it doesn't operate on text - but instead I could implement something like IRPS, which would loop through all the symbols and provide me with that nice symbol splitter I wanted to have for "proc" macro. And thus the IRP would be implemented to go just with the commas and grouped arguments.

OK, so it would be like:
Code:
irp a, 1,2,3
{ reverse display `a } ; Will display 321

irps a, eax ebx ecx
{ xor a,a }    

Note that the syntax is at the same time very analoguous to "match". I like this solution the most from the all the ideas so far - I even think I will try implementing it now.
Post 01 Aug 2005, 10:24
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 01 Aug 2005, 15:49
Can we keep the name FOR, IRP is not nice.
Post 01 Aug 2005, 15:49
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 01 Aug 2005, 16:29
Well, there are adherents for both of them, however I noticed that by calling it this way I will get it more consisent with TASM-basing principle.

Look at this small juxtaposition (taken from here):
Code:
MASM 6.1  MASM 5.1/TASM

EXTERN    EXTRN
FOR       IRP
FORC      IRPC
REPEAT    REPT
STRUCT    STRUC    

Since fasm already used EXTRN, REPT and STRUC names for its analogs of those directive, it's natural to choose the IRP over FOR.
Post 01 Aug 2005, 16:29
View user's profile Send private message Visit poster's website Reply with quote
Nikolay Petrov



Joined: 22 Apr 2004
Posts: 101
Location: Bulgaria
Nikolay Petrov 01 Aug 2005, 20:00
The assembler is a nice programing language. The symbolically is simple and possible to exchange without create a problems for compiler. My opinion is that it doesn't matter how name it, and what job do it.
in tasm/masm have a very useful macro directives, that make possible to use compilers for create a libraries for HLL.
Post 01 Aug 2005, 20:00
View user's profile Send private message 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.