flat assembler
Message board for the users of flat assembler.

Index > Windows > String macros

Author
Thread Post new topic Reply to topic
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 24 Jun 2003, 07:49
Hi friends,

Is it possible to code string macros such as CATSTR for Fasm?

_________________
Code it... That's all...
Post 24 Jun 2003, 07:49
View user's profile Send private message Visit poster's website Reply with quote
fasm9



Joined: 19 Jun 2003
Posts: 439
fasm9 24 Jun 2003, 10:05
smallest temp-c-compiler which tinycc's mother Smile
http://fabrice.bellard.free.fr/otcc/

Resurrection of two primeval C compilers from 1972-73,
http://www.cs.bell-labs.com/who/dmr/

i think c compiler also macro assembler.
Post 24 Jun 2003, 10:05
View user's profile Send private message Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 24 Jun 2003, 10:39
fasm9,

Thanks for the links;but I am looking for string macros which can be
adapted from Masm to Fasm.It would be good to have a CATSTR macro
for Fasm.

_________________
Code it... That's all...
Post 24 Jun 2003, 10:39
View user's profile Send private message Visit poster's website Reply with quote
fasm9



Joined: 19 Jun 2003
Posts: 439
fasm9 24 Jun 2003, 10:51
thanks for point it.

what is CATSTR macro? did you post this to the masm forum?
Post 24 Jun 2003, 10:51
View user's profile Send private message Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 24 Jun 2003, 15:15
fasm9,

CATSTR is a predefined macro used by the Macro Assembler (Masm)
It concatenates one or more strings to a single string.

Code:
num     =       7
newstr  CATSTR  <3 + >, %num, < = > , %3 + num ; "3 + 7 = 10"
    

assign the string "3 + 7 = 10" to newstr.

Full information about using macros in masm32:

http://webster.cs.ucr.edu/Page_TechDocs/MASMDoc/ProgrammersGuide/Chap_09.htm

_________________
Code it... That's all...
Post 24 Jun 2003, 15:15
View user's profile Send private message Visit poster's website Reply with quote
fasm9



Joined: 19 Jun 2003
Posts: 439
fasm9 24 Jun 2003, 21:35
ok. thanks

i wouldn't learn masm, imho, fasm is equal to masm.
moreover, fasm is *open*.

--
PS: slightly off-topic, i see something similar like this in lisp..
Post 24 Jun 2003, 21:35
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 25 Jun 2003, 04:25
FASM has no ability to return values from macros. You cannot use a macro as a function.

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 25 Jun 2003, 04:25
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 25 Jun 2003, 09:16
Maybe,in the future,we can think this feature (macros returning values
like functions) can be added to Fasm.

_________________
Code it... That's all...
Post 25 Jun 2003, 09:16
View user's profile Send private message Visit poster's website Reply with quote
jInuQ



Joined: 26 Jun 2003
Posts: 48
Location: USA - NV
jInuQ 30 Jun 2003, 08:59
you can check out my library that has some basic functions for string work. StrLen, StrCat are there. Still working on others. It uses a macro that privalov provide so it doesn't put unused functions in.

Beaware that the CVS is broken and it won't let me commit a fix copy.

http://sourceforge.net/projects/pattod/

_________________
jInuQ

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away."
- Antoine de Saint Exupery
Post 30 Jun 2003, 08:59
View user's profile Send private message Visit poster's website AIM Address Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 30 Jun 2003, 10:39
Thanks jInuQ

_________________
Code it... That's all...
Post 30 Jun 2003, 10:39
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:  


< 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.