OSDN Git Service

added design text file for codeing design!
authorsparky4 <sparky4@cock.li>
Fri, 18 Sep 2015 20:47:38 +0000 (15:47 -0500)
committersparky4 <sparky4@cock.li>
Fri, 18 Sep 2015 20:47:38 +0000 (15:47 -0500)
new file:   design.txt

design.txt [new file with mode: 0755]

diff --git a/design.txt b/design.txt
new file mode 100755 (executable)
index 0000000..8cdc990
--- /dev/null
@@ -0,0 +1,28 @@
+Near functions should be for frequently used functions that update the game engine are are time critial\r
+\r
+far functions are for like menus, file loaders, and such\r
+\r
+\r
+\r
+"\r
+It is also possible to use the small code option, and to override certain functions and pointers to functions as\r
+being\r
+ far.\r
+  However, this method may lead to problems.  The Open Watcom C\r
+16\r
+ compiler generates special\r
+function calls that the programmer doesn’t see, such as checking for stack overflow when a function is\r
+invoked.  These calls are either\r
+ near\r
+ or\r
+ far\r
+ depending entirely on the memory model chosen when the\r
+module is compiled.  If the small code model is being used, all calls will be near calls.  If, however, several\r
+code groups are created with far calls between them, they will all need to access the stack overflow\r
+checking routines.  The linker can only place these special routines in one of the code groups, leaving the\r
+other functions without access to them, causing an error.\r
+To resolve this problem, mixing code models requires that all modules be compiled with the big code\r
+model, overriding certain functions as being near.  In this manner, the stack checking routines can be placed\r
+in any code group, which the other code groups can still access.  Alternatively, a command-line switch may\r
+be used to turn off stack checking, so no stack checking routines get called.\r
+"\r