binary.rst
changeset 209 c51f51e9a015
parent 207 be73a688eb22
--- a/binary.rst	Thu Sep 24 10:48:51 2009 +0300
+++ b/binary.rst	Thu Sep 24 10:50:51 2009 +0300
@@ -13,3 +13,27 @@
 From the perspective of the caller the thing which is passed is an argument.
 From the perspective of the routine that receives the call, i.e. the callee,
 the thing which is passed is a parameter.
+
+* Linkage convention.
+
+A linkage convention is computing term that means an agreement which is made
+between a caller and a callee. The agreement describes:
+
+ - how the caller should pass parameters to the callee
+
+ - what assumptions the callee is allowed to make about the values in the
+   machine registers at the moment of the call
+
+ - who should preserve registers which are modified by the callee and/or which
+   are important to the caller so that their original values are available
+   when the caller needs them
+
+ - how and where registers should be preserved
+
+ - how the callee knows where to return to when it is ready to return to the
+   caller
+
+ - how the callee returns a value to the caller if the routine is a function
+   (as opposed to a subroutine which has no return value)
+
+ - how a debugger will find the information necessary to obtain a stack trace