Author Topic: Modify the marcos like "invoke" ?  (Read 690 times)

seasea

  • Regular Member
  • *
  • Posts: 15
Modify the marcos like "invoke" ?
« 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:

Mikl__

  • Member
  • ****
  • Posts: 682
Re: Modify the marcos like "invoke" ?
« Reply #1 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

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5756
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Modify the marcos like "invoke" ?
« Reply #2 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

seasea

  • Regular Member
  • *
  • Posts: 15
Re: Modify the marcos like "invoke" ?
« Reply #3 on: March 13, 2018, 09:33:13 AM »
Yes, I should first read more and think more.
Thanks,  Mikl__,hutch--.  :t