home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1996 December / CD_shareware_12-96.iso / DOS / Programa / CCDL122.ZIP / DOC / CODEGEN.DOC < prev    next >
Encoding:
Text File  |  1996-08-08  |  1.3 KB  |  24 lines

  1. Stack frames are non-ansi.  On the m68k a pointer to arguments is
  2. passed in A0; the compiler puts the arguments on the stack but assembly 
  3. language code may put parameters anywhere.  On the 386 EBP is used
  4. as a general purpose register; arguments and local variables are 
  5. indexed directly off the stack.  The stack depth is monitored at all 
  6. times and addresses are adjusted accordingly.
  7.  
  8. On the 68K, three codegen options are available.  The first allows
  9. 68020 code to be generated for bit fields, muls, divs, and addressing 
  10. modes.  The second allows data to be of arbitrary size.  In the absence
  11. of either of these, 68K code based on a 32k memory model will be 
  12. generated.
  13.  
  14. 386 code is fairly straightforward except for the use of the stack 
  15. pointer to get arguments.  It is a little more complex than need be 
  16. because of the need to use special function registers for some 
  17. operations like multiplies and shifts.  386 Code will be a little bulky
  18. because of this need.
  19.  
  20. 68K code is position-independent.  All global data is accessed off of
  21. register A5; function arguments are indexed off of A6; and the stack is
  22. indexed off A7.  String constants are indexed off the PC.  Because of
  23. this, the total data size may only be 32K unless either the /2 or the 
  24. /L options are used.