LightElf (13.11.2024 18:03, просмотров: 51) ответил Cкpипaч на Это в Си освобождает вызывающая сторона. Потому что возможны
функции с переменным числом параметров. В Паскале - вызываемая
(экономя код).
Точно, оплошал ;-) A number of symbols are predefined by the compiler with a set of attributes that describe a particular calling convention. These symbols can be used as aliases. The following is a list of these symbols.
__cdecl cdecl or cdecl defines the calling convention used by Microsoft compilers.
__pascal pascal or pascal defines the calling convention used by OS/2 1.x and Windows 3.x API functions.
__stdcall stdcall or stdcall defines a special calling convention used by the Win32 API functions.
__syscall syscall or syscall defines the calling convention used by the 32-bit OS/2 API functions.
__system system or system are identical to syscall.
Predefined "__pascal" Alias
1. All symbols are mapped to upper case.
2. Arguments are pushed on the stack in reverse order. That is, the first argument is pushed first, the second argument is pushed next, and so on. The routine being called will remove the arguments from the stack.
3. Floating-point values are returned in the same way as structures. When a structure is returned, the caller allocates space on the stack. The address of the allocated space will be pushed on the stack immediately before the call instruction. Upon returning from the call, register EAX will contain address of the space allocated for the return value.
4. Registers EAX, EBX, ECX and EDX are not saved and restored when a call is made.
Не надо делать мне как лучше, оставьте мне как хорошо