flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > need help with macros

Author
Thread Post new topic Reply to topic
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav 11 Jul 2005, 16:27
good evening!

fasm macros are very powerfull, but it's complex for me, i need help with this:

i have a lot of filenames and checksums, how can i define it with macros? something like strtbl macro in fasm.pdf, but need with two fields

strtbl crcdata,\
"main.exe",0FFFFFFFFh,\
"main1.exe",0AFFFFFFFh

ps. thanks for help

_________________
[not enough memory]
Post 11 Jul 2005, 16:27
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8390
Location: Kraków, Poland
Tomasz Grysztar 11 Jul 2005, 16:34
Look at the import macros for some ideas how to do such things.
Post 11 Jul 2005, 16:34
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 11 Jul 2005, 17:20
this may be what you wanted:
Code:
macro files name,[filename,checksum]
{
  common
    name:
  ;table of strucs containing pointer to filename and checksum
  forward
    local ..thisfile ;makes ..thisfile unique pointer for each repeating of "forward" block
    dd ..thisfile ;pointer to filename
    dd checksum ;checksum
  ;table of strings
  forward
    ..thisfile db filename,0 ;same ..thisfile names are used as was in previous forward
}    


To start with macros my preprocessor article http://decard.net/?body=tajga&chapter=preproc may help, altough it is obsolete in some parts, but you will get the basics.
Post 11 Jul 2005, 17:20
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav 12 Jul 2005, 06:49
thanks for help
Post 12 Jul 2005, 06:49
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.