The MASM Forum

Microsoft 64 bit MASM => MASM64 SDK => Topic started by: seasea on March 13, 2018, 01:14:42 AM

Title: Modify the marcos like "invoke" ?
Post by: seasea on March 13, 2018, 01:14:42 AM
Hello, I want to modify the macro "invoke", for example, automate save the registers( push/pop rcx ).
Is that idea meaningful or realizable ?
And, I did''t find the marco's define.
:biggrin:
Title: Re: Modify the marcos like "invoke" ?
Post by: Mikl__ on March 13, 2018, 01:57:14 AM
And for what it is necessary to modify a macro? The contents of the registers can be stored in memory, and then restored. Before calling "invoke", the stack can be reduced or increased by multiples of 16 bytes and you have to execute two push/pop commands
Title: Re: Modify the marcos like "invoke" ?
Post by: hutch-- on March 13, 2018, 02:51:13 AM
seasea,

If you understand the Microsoft 64 bit ABI, you in fact should not push/pop rcx and you will find that the macro system in the 64 bit MASM project is by no means simple to modify. If you look at the reference material in this 64 bit sub forum you will find data on the Microsoft ABI and you must get this right or your application will not even start.
Title: Re: Modify the marcos like "invoke" ?
Post by: seasea on March 13, 2018, 09:33:13 AM
Yes, I should first read more and think more.
Thanks,  Mikl__,hutch--.  :t