flat assembler
Message board for the users of flat assembler.

Index > Main > How distinguish byte [edi] and (d)word [edi] in macro?

Author
Thread Post new topic Reply to topic
xRom



Joined: 26 Apr 2011
Posts: 13
xRom 14 Nov 2011, 20:41
And generate 'mov eax,op' or 'movzx eax,op'?
Post 14 Nov 2011, 20:41
View user's profile Send private message Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 618
cod3b453 15 Nov 2011, 19:15
As a pseudo-instruction replacement for mov or as part of a larger macro? It's not really deterministic but you can at least use these constructs:
Code:
macro my_mov dreg,sreg
{
; ...
if dreg in <eax,ebx,...,esp>
; Destination is 32bit...
end if

;...

if sreg eqtype [eax];???
; Pointer
end if
; ...
}    
Post 15 Nov 2011, 19:15
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 27 Nov 2011, 22:44
xRom,

Preprocessor can be used to handle that particular issue. match is powerful, yeah. Wink
Post 27 Nov 2011, 22:44
View user's profile Send private message Reply with quote
xRom



Joined: 26 Apr 2011
Posts: 13
xRom 29 Nov 2011, 20:54
cod3b453 wrote:
As a pseudo-instruction replacement for mov or as part of a larger macro?

It's part of macro. I'm get value from memory and it can be byte, word, etc...
Post 29 Nov 2011, 20:54
View user's profile Send private message Reply with quote
xRom



Joined: 26 Apr 2011
Posts: 13
xRom 29 Nov 2011, 20:56
baldr wrote:
xRom,
Preprocessor can be used to handle that particular issue. match is powerful, yeah. Wink

And so slowly Crying or Very sad on large project...
Post 29 Nov 2011, 20:56
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.