Archive for December, 2008|Monthly archive page
C Function Calling conventions
- __cdecl
- Standard/default calling convention in Unix/Win32
- Caller should push and pop the arguments (right to left)
- Variable number of argument functions such as printf, scanf can be used with because the callee cannot know the number of parameters
- Freeing stack Instructions are inserted after every call of the function, so it increases the code size if many calls are made
- __stdcall/PASCAL
- Microsoft Win32 supported
- Arguments are pushed (left to right) by the called and stack is cleaned up by the callee
- No variable number of argument functions are allowed
- Conserve some code space (one time cleanup by callee)
- __fastcall
- Microsoft Win32 supported
- Registers are used for passing arguments
- The registers are pushed to and popped from the stack (first two arguments are copied into the registers, the rest should resort to the stack by_stdcall fashion)
- Bit overhead
- Used for local functions within the module
Arguments by Philosophy
Has one ever noticed whether someone or oneself is making sense during the argument or in a discussion? Is there any better way to put the argument or to make it clear without any king of misunderstanding?
Of course, there is one – Critical Thinking. We have centuries of philosophical concepts and ideas to ponder over. HongKong University provides open and free course on Critical Thinking. I enjoyed revisiting these concepts, which I have come across from childhood and even have used many times in real life.
Critical Thinking mini-guide is neatly organized materials to start with. The following are the important excerpts from the guide not to miss.
“Critical thinking is the ability to engage in reflective and independent
thinking, and being able to think clearly and rationally.”
“Critical thinking does not mean being argumentative or being critical of
others. Although critical thinking skills can be used in exposing fallacies
and bad reasoning, they can also be used to support other viewpoints, and
to cooperate with others in solving problems and acquiring knowledge.”
Leave a Comment
Leave a Comment
Leave a Comment