The MASM Forum

General => The Campus => Topic started by: SierraC on February 26, 2018, 02:57:39 PM

Title: stdcall
Post by: SierraC on February 26, 2018, 02:57:39 PM
Hello friends, please help

.model flat, stdcall

What is stdcall?
How does it work?
please explain me

Thanks in advance.
Title: Re: stdcall
Post by: hutch-- on February 26, 2018, 03:55:23 PM
We don't normally do "requests" but it goes something like this.

.MODEL = memory model, over time there has been more than 1.
FLAT = a memory model that is linear in design with no combined segment/offset addressing.
STDCALL = standard Win32 calling convention. push arguments in reverse order then call the procedure. The procedure reads the arguments left to right on the stack and must balance the stack on exit.
Title: Re: stdcall
Post by: SierraC on February 26, 2018, 05:35:58 PM
Quote from: hutch-- on February 26, 2018, 03:55:23 PM
We don't normally do "requests" but it goes something like this.

.MODEL = memory model, over time there has been more than 1.
FLAT = a memory model that is linear in design with no combined segment/offset addressing.
STDCALL = standard Win32 calling convention. push arguments in reverse order then call the procedure. The procedure reads the arguments left to right on the stack and must balance the stack on exit.
Ok, im sorry
Title: Re: stdcall
Post by: felipe on February 27, 2018, 02:40:42 PM
Well SierraC, don't you worry if you came here to stay and learn. But if you didn't, can you  talk a little why you want to know about that?
Just curious about what others do in the same world... :biggrin:
Title: Re: stdcall
Post by: SierraC on February 27, 2018, 03:42:40 PM
Quote from: felipe on February 27, 2018, 02:40:42 PM
Well SierraC, don't you worry if you came here to stay and learn. But if you didn't, can you  talk a little why you want to know about that?
Just curious about what others do in the same world... :biggrin:
Not deleting my account  ;) ;) ;)
Title: Re: stdcall
Post by: Mikl__ on February 27, 2018, 05:49:15 PM
Hi, SierraC!
See
Title: Re: stdcall
Post by: jj2007 on February 27, 2018, 07:23:53 PM
If you can't understand Mikl's first link, try this version (https://translate.google.it/translate?hl=en&sl=ru&tl=en&u=http%3A%2F%2Fwww.cyberforum.ru%2Fpost5323068.html) 8)

Scroll down to Structure of the program. It's worth it, I've never seen such a good explanation :t
Title: Re: stdcall
Post by: SierraC on February 27, 2018, 07:48:17 PM
Quote from: Mikl__ on February 27, 2018, 05:49:15 PM
Hi, SierraC!
See
  • http://www.cyberforum.ru/post5323068.html (.model option)
  • https://en.wikipedia.org/wiki/X86_calling_conventions stdcall
Thanks Master