flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > About fasm distribution

Author
Thread Post new topic Reply to topic
zhak



Joined: 12 Apr 2005
Posts: 490
Location: Belarus
zhak
Greetings!
My questions go to Tomasz:
1) Why don't you include macros into fasm packages for DOS and Linux?
For example, I do not program for Win32 but I use structure and procedure declaration macroses a lot.
2) It would be useful, I think, to include 16-bit proc declaration macro.
Post 28 Sep 2005, 17:56
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
I agree that there should be compatibility macros (for converting from other assemblers) included in Fasm (like what A86 does with COMPAT.8 but obviously, uh, better).
Post 28 Sep 2005, 20:19
View user's profile Send private message Visit poster's website Reply with quote
Remy Vincent



Joined: 16 Sep 2005
Posts: 155
Location: France
Remy Vincent
I remember that as long as I don't need macros, i don't want to know anything about it because it's so complex... and a separate package Some_macros.zip is frustrating for those who want too learn many many things about macros... and also fristrating if macros are too complex for you... I can only learn macros talking and talking with someone else...

- "why this result?"
- "because... blah blah...
- "Are you sure" ?...
- "Yes this macro works like that, ... blah blah..."


----- STOP DAMAGING YOUR BRAIN LEARNING MACROS ALL ALONE!! -----

_________________
Groups lower your IQ
Post 03 Oct 2005, 09:11
View user's profile Send private message Visit poster's website Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf
Remy Vincent wrote:
I remember that as long as I don't need macros, i don't want to know anything about it because it's so complex... and a separate package Some_macros.zip is frustrating for those who want too learn many many things about macros... and also fristrating if macros are too complex for you... I can only learn macros talking and talking with someone else...

- "why this result?"
- "because... blah blah...
- "Are you sure" ?...
- "Yes this macro works like that, ... blah blah..."


----- STOP DAMAGING YOUR BRAIN LEARNING MACROS ALL ALONE!! -----



Macros aren't that bad. I don't use macros because I use both masm and fasm ...and need to port between them both.
But actually macros are exceptionally useful after you have learnt what the macros do.
Basically my excuse is that I don't have the time to learn how to write them Smile But other than that...I really support the use of macros because you can do a lot of things faster.

I however tend to use assembly in conjunction with a high level language so I survive without macros. If you are however a pure asm programmer - macros are essential for quickly developing large projects with the exception of perhaps FASM itself - but Tomasz is one of a kind Smile

_________________
Raedwulf
Post 07 Oct 2005, 07:08
View user's profile Send private message MSN Messenger Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Switching between assemblers does usually throw a wrench in any plans for macros (although FASM can fake it: struc, dup, endm, comment, irp, NASM's %macro, proc, etc.). I don't usually use macros. However, one of the nicest features of FASM is the ability to define a macro for, say, XCHG, and use it instead of the normal machine code.

I read recently an alternative to XCHG (on this message board), which you can try out: Smile

Code:
macro xchg a,b {
   xor a,b
   xor b,a
   xor a,b
}
    
Post 08 Oct 2005, 07:13
View user's profile Send private message Visit poster's website Reply with quote
chris



Joined: 05 Jan 2006
Posts: 62
Location: China->US->China->?
chris
from my old discrete math knowledge:

a=a^b (*)
b=b^(a^b)=a (**)
a=(a^b)^a=b

-------------------------------------------
(*) ^ denotes xor
(**) a^b=b^a - commutative
(a^b)^c=a^(b^c) - associative
a^a=0 - nilpotent
0^a=a - 0 is the identity
Post 25 Jan 2006, 07:38
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.