flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > simple macro to defining data

Author
Thread Post new topic Reply to topic
Blid



Joined: 19 Apr 2007
Posts: 31
Location: Russia, Novorossysk
Blid
i write this to improve listing, (it will be readfriendly).
may be it will be useful for you

Code:
macro _dword [arg]
{
local status,metka,contain
forward

  status = 0

match metka == contain,arg

       \{

metka: dd contain
if ~ used metka
   show 'warning : label ',metka,' is not used'
end if
status = 1

     \}

if   status = 0
arg:
 dd ?
if ~ used arg
   show 'warning : label ',arg,' is not used'
end if
end if

common
}

code:

  _dword a = 2h,b,c=23h,d=?

will be:

a: dd 2h
b: dd ?
c: dd 23
d: dd ?

    

;as usual: find bug's, set your marks at 100% scale, write replys for improving
Post 17 Aug 2007, 09:18
View user's profile Send private message Reply with quote
shism2



Joined: 14 Sep 2005
Posts: 248
shism2
What is this macro for ? Can you show me an example ?
Post 23 Aug 2007, 13:13
View user's profile Send private message Reply with quote
Blid



Joined: 19 Apr 2007
Posts: 31
Location: Russia, Novorossysk
Blid
Code:
code
;----------------------------------------------------------------------------------
_dword ZwQueryPerformanceCounter,\  ;NTfunctioun
        SizeTick,\         ; size tick count in nanoseconds
        DeltaSwith,\
        ErrorProf,\        ;Error Profiling in ticks
        Errorns=90,\          ;Error Profiling in nanoseconds
        lpParameter,\      ;for thread
        pThreadId          ;for thread
;----------------------------------------------------------------------------------
will be:
;----------------------------------------------------------------------------------
ZwQueryPerformanceCounter dd ?           ;NTfunctioun
SizeTick                  dd ?           ; size tick count in nanoseconds
DeltaSwith                dd ? 
ErrorProf                 dd ?           ;Error Profiling in ticks
Errorns                   dd 90          ;Error Profiling in nanoseconds
lpParameter               dd ?           ;for thread
pThreadId                 dd ?           ;for thread
;----------------------------------------------------------------------------------
    
Post 25 Aug 2007, 08:29
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.