TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: NEIL HELLER
from: BOB STOUT
date: 1998-04-25 16:16:00
subject: CALLING CONVENTIONS

On , Neil Heller (1:161/204@fidonet) wrote: 
 > I'm familiar with using the reserved word PASCAL to modify the order in
 > which formal parameters are placed on the stack.  Does anyone know if the
 > PASCAL keyword also affects who is responsible (the caller or the called
 > function) for cleaning up the stack after the called function exits?
Neil...
  When using _pascal calling conventions in a C program (at least on PC's), 
the following things change:
1.  The unmodified identifier name is converted to all caps.
2.  The order in which the arguments are pushed onto the stack is reversed.
3.  The function assumes responsibility for cleaning the stack rather than 
he
    caller.
  It is this last point which makes _pascal functions slightly faster than 
their default C counterparts. Note also that the identifier name is not 
altered other than to be converted to an all caps case-insensitive version. 
All other name conversions supported by the implementation (e.g. prepended or 
appended '_' characters) are suppressed. 
--- QM v1.00
---------------
* Origin: MicroFirm : Down to the C in chips (1:106/2000.6)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.