flat assembler
Message board for the users of flat assembler.

flat assembler > Macroinstructions > I play with irpv. I not clear undertstood irpv.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 467
In some tread Tomasz write me this macro.
Code:
macro apply [v] {
       define  __applied v
       v equ template.#v
       v                       ;i write this and get work

}

macro end.apply {
       irpv v,__applied \{
                restore v
                restore __applied

       \}
} 
    

I try do this:
Code:
template.regstr EQU EBP
template.z2 EQU [template.regstr+8]
template.zh EQU  mov template.z2,eax
 
template.regstr EQU ESI  ;some times i need change register to ESI or EBP or EDI. 
apply zh
end.apply

template.regstr EQU EDI 
apply zh
end.apply
    

IDA Pro show mov [ebp+8],eax and mov [ebp+8],eax
But i expect mov [esi+8],eax and mov [edi+8],eax


Last edited by Roman on 27 Jan 2019, 03:36; edited 4 times in total
Post 27 Jan 2019, 03:17
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 467
And i not understood why irpv use v and __applied.
I read fasm pdf but little information about irpv.
And not full irpv explanation.
Post 27 Jan 2019, 03:25
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-2019, Tomasz Grysztar.

Powered by rwasa.