Emulation-Primitives.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <html lang="en">
  2. <head>
  3. <title>Emulation Primitives - avram - a virtual machine code interpreter</title>
  4. <meta http-equiv="Content-Type" content="text/html">
  5. <meta name="description" content="avram - a virtual machine code interpreter">
  6. <meta name="generator" content="makeinfo 4.13">
  7. <link title="Top" rel="start" href="index.html#Top">
  8. <link rel="up" href="Library-Reference.html#Library-Reference" title="Library Reference">
  9. <link rel="prev" href="Profiling.html#Profiling" title="Profiling">
  10. <link rel="next" href="External-Library-Maintenance.html#External-Library-Maintenance" title="External Library Maintenance">
  11. <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
  12. <meta http-equiv="Content-Style-Type" content="text/css">
  13. <style type="text/css"><!--
  14. pre.display { font-family:inherit }
  15. pre.format { font-family:inherit }
  16. pre.smalldisplay { font-family:inherit; font-size:smaller }
  17. pre.smallformat { font-family:inherit; font-size:smaller }
  18. pre.smallexample { font-size:smaller }
  19. pre.smalllisp { font-size:smaller }
  20. span.sc { font-variant:small-caps }
  21. span.roman { font-family:serif; font-weight:normal; }
  22. span.sansserif { font-family:sans-serif; font-weight:normal; }
  23. --></style>
  24. </head>
  25. <body>
  26. <div class="node">
  27. <a name="Emulation-Primitives"></a>
  28. <p>
  29. Next:&nbsp;<a rel="next" accesskey="n" href="External-Library-Maintenance.html#External-Library-Maintenance">External Library Maintenance</a>,
  30. Previous:&nbsp;<a rel="previous" accesskey="p" href="Profiling.html#Profiling">Profiling</a>,
  31. Up:&nbsp;<a rel="up" accesskey="u" href="Library-Reference.html#Library-Reference">Library Reference</a>
  32. <hr>
  33. </div>
  34. <h3 class="section">3.8 Emulation Primitives</h3>
  35. <p>The functions documented in this section can be used to take very
  36. specific control over the evaluation of virtual code applications. It is
  37. unlikely that a client program will have any need for them unless it
  38. aims to replace or extend the <code>avm_apply</code> function.
  39. <p>The virtual machine is somewhat removed from a conventional von Neumann
  40. model of computation, so emulating it in C or any other imperative
  41. language is less straightforward than one would prefer. An elaborate
  42. system of interdependent data structures is used to represent partially
  43. evaluated computations, which does not particularly lend itself to a
  44. convenient, modular API. The abstraction provided by the functions in
  45. this section is limited mainly to that of simple memory management and
  46. stack operations. Consequently, a developer wishing to build on them
  47. effectively would need to <em>grok</em> the data structures involved,
  48. which are described in some detail.
  49. <ul class="menu">
  50. <li><a accesskey="1" href="Lists-of-Pairs-of-Ports.html#Lists-of-Pairs-of-Ports">Lists of Pairs of Ports</a>
  51. <li><a accesskey="2" href="Ports-and-Packets.html#Ports-and-Packets">Ports and Packets</a>
  52. <li><a accesskey="3" href="Instruction-Stacks.html#Instruction-Stacks">Instruction Stacks</a>
  53. </ul>
  54. </body></html>