News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Modify the marcos like "invoke" ?

Started by seasea, March 13, 2018, 01:14:42 AM

Previous topic - Next topic

seasea

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:

Mikl__

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

hutch--

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.

seasea

Yes, I should first read more and think more.
Thanks,  Mikl__,hutch--.  :t