Article View: comp.os.ms-windows.programmer.misc
Article #2702Re: PASCAL
From: Scott Evernden
Date: Mon, 11 Jan 1993 22:06
Date: Mon, 11 Jan 1993 22:06
21 lines
1315 bytes
1315 bytes
In article <93008.102758TMVANDER@MTUS5.BITNET> TMVANDER@MTUS5.BITNET writes: >I'm new to this programming in windows, and I'm curious as to why WinMain >is alwasy declared as a PASCAL calling sequence. Please e-mail me. > - Todd Vander Woude >-- >tmvander@major.cs.mtu.edu I believe it's because the Pascal calling convention is slightly more efficient than the C convention. With C routines, the caller must cleanup (pop) arguments passed to a function. With the PASCAL convention, the called routine cleans up the stack. A variation of the INTEL RET opcode can include a count which will automagically do this stack cleanup as part of the return operation, saving the caller the trouble and the cycles. Of course, this might not be the reason also... -scott ---- Technical Consultant GrayMatter Software Holliston MA spe@world.std.com scott@opl.com 73116.3451@compuserve.com User interface and application development technology and tools
Technical Details
Message-ID:
<1395@ottawa.opl.com.opl.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!opl.com!scottReferences:
<93008.102758TMVANDER@MTUS5.BITNET>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!opl.com!scott From: scott@opl.com (Scott Evernden) Newsgroups: comp.os.ms-windows.programmer.misc Subject: Re: PASCAL Message-ID: <1395@ottawa.opl.com.opl.com> Date: 11 Jan 93 22:06:51 GMT References: <93008.102758TMVANDER@MTUS5.BITNET> Sender: news@opl.com Organization: OPL. , Inc. Lines: 21