📄 classforth.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Forth Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.4 --><div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div><h1>Forth Class Reference<br><small>[<a class="el" href="group__forth.html">Forth - Forth virtual machine</a>]</small></h1><!-- doxytag: class="Forth" --><code>#include <<a class="el" href="forth_8h-source.html">forth.h</a>></code><p><p>Inheritance diagram for Forth:<p><center><img src="classForth.png" usemap="#Forth_map" border="0" alt=""></center><map name="Forth_map"><area href="classForthTest.html" alt="ForthTest" shape="rect" coords="0,56,65,80"><area href="classForthVM.html" alt="ForthVM" shape="rect" coords="75,56,140,80"></map><a href="classForth-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>Public interface to the forth virtual machine. <p><p>Definition at line <a class="el" href="forth_8h-source.html#l00125">125</a> of file <a class="el" href="forth_8h-source.html">forth.h</a>.<table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classForth.html#a0">Reset</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__forth.html#ga0">CELL</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classForth.html#a1">Quit</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__forth.html#ga0">CELL</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classForth.html#a2">Execute</a> (<a class="el" href="group__forth.html#ga0">CELL</a> xt)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__forth.html#ga0">CELL</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classForth.html#a3">Evaluate</a> (const <a class="el" href="group__forth.html#ga2">CHAR</a> *text, <a class="el" href="group__integers.html#ga6">uint</a> textLength)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classForth.html#a4">Push</a> (const <a class="el" href="group__forth.html#ga0">CELL</a> *cells, <a class="el" href="group__integers.html#ga6">uint</a> numCells)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="group__forth.html#ga0">CELL</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classForth.html#a5">Pop</a> (<a class="el" href="group__integers.html#ga6">uint</a> numCells)</td></tr><tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classForth.html">Forth</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classForth.html#e0">Construct</a> (void *memoryStart, <a class="el" href="group__integers.html#ga6">uint</a> memorySize, <a class="el" href="classForthIo.html">ForthIo</a> *ioHandler)</td></tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="e0"></a><!-- doxytag: member="Forth::Construct" ref="e0" args="(void *memoryStart, uint memorySize, ForthIo *ioHandler)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="classForth.html">Forth</a> * Forth::Construct </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void * </td> <td class="mdname" nowrap> <em>memoryStart</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="group__integers.html#ga6">uint</a> </td> <td class="mdname" nowrap> <em>memorySize</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="classForthIo.html">ForthIo</a> * </td> <td class="mdname" nowrap> <em>ioHandler</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Construct a forth virtual machine in the specified memory region.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>memoryStart</em> </td><td>Start address of memory. </td></tr> <tr><td valign="top"></td><td valign="top"><em>memorySize</em> </td><td>Size of memory. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ioHandler</em> </td><td>Pointer to the console i/o object the VM will use.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>Pointer to VM or 0 if <em>memorySize</em> is too small.</dd></dl><p>Definition at line <a class="el" href="forth_8cpp-source.html#l02286">2286</a> of file <a class="el" href="forth_8cpp-source.html">forth.cpp</a>. </td> </tr></table><a class="anchor" name="a0"></a><!-- doxytag: member="Forth::Reset" ref="a0" args="()" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void Forth::Reset </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Reset the virtual machine state to that of a newly constructed object.<p>Definition at line <a class="el" href="forth_8cpp-source.html#l02299">2299</a> of file <a class="el" href="forth_8cpp-source.html">forth.cpp</a>. </td> </tr></table><a class="anchor" name="a1"></a><!-- doxytag: member="Forth::Quit" ref="a1" args="()" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="group__forth.html#ga0">CELL</a> Forth::Quit </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Perform the action of the forth word <code>QUIT</code>. I.e. continuously accept console input and interpret it.<p>To exit this function, enter the word <code>BYE</code> at the console.<p><dl compact><dt><b>Returns:</b></dt><dd>0 or a forth execption value.</dd></dl><p>Definition at line <a class="el" href="forth_8cpp-source.html#l02305">2305</a> of file <a class="el" href="forth_8cpp-source.html">forth.cpp</a>. </td> </tr></table><a class="anchor" name="a2"></a><!-- doxytag: member="Forth::Execute" ref="a2" args="(CELL xt)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="group__forth.html#ga0">CELL</a> Forth::Execute </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__forth.html#ga0">CELL</a> </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -