flat assembler
Message board for the users of flat assembler.

Index > Main > Recommended to add parameter of macro instructions warning

Author
Thread Post new topic Reply to topic
jiangfasm



Joined: 08 Mar 2015
Posts: 58
jiangfasm
;tst.asm
Quote:

macro tst [arg]
{
arg db 1
}
tst5 db 0
tst tst1,tst2,tst3,tst4,tst5


$ fasm tst.asm
flat assembler version 1.71.49 (1048576 kilobytes memory)
hello.asm [6]:
tst tst1,tst2,tst3,tst4,tst5
hello.asm [3] tst [1]:
arg db 1
error: symbol already defined.



FASM is a tst5 error is displayed instead of "error:symbol already defined." so friendly!
In particular import macros, very useful!

Quote:

import ntoskrnl,\
CcCanIWrite,'CcCanIWrite',\
CcCopyRead,'CcCopyRead',\
CcCopyWrite,'CcCopyWrite',\
CcDeferWrite,'CcDeferWrite',\
CcFastCopyRead,'CcFastCopyRead',\
CcFastCopyWrite,'CcFastCopyWrite',\
CcFastMdlReadWait,'CcFastMdlReadWait',\
CcFastReadNotPossible,'CcFastReadNotPossible',\
CcFastReadWait,'CcFastReadWait',\
CcFlushCache,'CcFlushCache',\
CcGetDirtyPages,'CcGetDirtyPages',\
CcGetFileObjectFromBcb,'CcGetFileObjectFromBcb',\
CcGetFileObjectFromSectionPtrs,'CcGetFileObjectFromSectionPtrs',\
CcGetFlushedValidData,'CcGetFlushedValidData',\
CcGetLsnForFileObject,'CcGetLsnForFileObject',\
CcInitializeCacheMap,'CcInitializeCacheMap',\
CcIsThereDirtyData,'CcIsThereDirtyData',\
CcMapData,'CcMapData',\
CcMdlRead,'CcMdlRead',\
CcMdlReadComplete,'CcMdlReadComplete',\
CcMdlWriteAbort,'CcMdlWriteAbort',\
CcMdlWriteComplete,'CcMdlWriteComplete',\
CcPinMappedData,'CcPinMappedData',\
CcPinRead,'CcPinRead',\
...........
Post 28 Dec 2015, 05:14
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: 17247
Location: In your JS exploiting you and your system
revolution
fasm displays the line from the source file as is without any modifications.

I think what you are suggesting is to display the line after all EQUs, FIXes and macro parameter substitutions have been made.

There is a tool called "listing.inc" (in the "tools" folder) that may help you discover which and what is actually being assembled. I haven't used it for some time now but IIRC it can do stuff like that. Anyhow, try it and it might give you the needed insight into the problem.
Post 28 Dec 2015, 05:19
View user's profile Send private message Visit poster's website Reply with quote
jiangfasm



Joined: 08 Mar 2015
Posts: 58
jiangfasm
Yes, after replacing the identifier of the error is displayed. I listen to you to learn " listing. INC " source.
Post 28 Dec 2015, 06:11
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-2020, Tomasz Grysztar.

Powered by rwasa.