2 problems

Peter Johnson peter at tortall.net
Sun Aug 19 16:05:08 PDT 2007


On Sun, 19 Aug 2007, dave wrote:
> Speaking of macros, why doesn't the following definition work?
>
> %macro  movs    2
> %substr t       macro   '%1' 1
>        movs%t  %2,%3
> %endmacro
>
> 	movs	dword [edi]

dword [edi] is a single identifier parameter.  So what you want is 
something like:
%macro movs 1
%ifidni %1, dword [edi]
a32 movsd
%elifidni %1, word [edi]
a32 movsw
; etc for other combinations
%endif
%endmacro

Peter


More information about the yasm-devel mailing list