another example
[rrq/rrqforth.git] / adoc / p_execute.adoc
index 8197f0c3202fa499f0a432143d756d5e10f0d128..7b73566f0309e0dc7a928cb52d05f6eb9aaaa1b9 100644 (file)
@@ -1,9 +1,38 @@
+// rrqforth.asm:       WORD p_execute,'EXECUTE',fasm
+
 anchor:p_execute[]
 
-Word: EXECUTE
--------------
+=== Word: EXECUTE
+
+....
+Data stack: ( cfa -- )
+....
+
+"EXECUTE" is a function word that transfers the execution to the
+indicated "Code Field Address", which typically is the CFA of an
+RRQFORTH word with the CFA cell containing a jump address for the code
+that implements the execution semnatics of the word.
+
+The following execution semantics are predefined:
+
+ * assembler implemented words constitute their own execution
+   semantics;
+   
+ * <<p_doforth>> implements the FORTH machine. This treats the word
+   content as a succession of cells that hold the cfa pointers for the
+   words that make of the definition. As is customary in FORTH
+   machines, the advance through that succession is provided by each
+   word code ending making an explicit jump to its successor. The
+   <<p_return_stack,RETURN-STACK>> serves as a call stack for tracking
+   the nesting of FORTH executions by saving the "addresses" of the
+   successor cells.
+
+ * <<p_dodoes>> implements the variation of starting the FORTH
+   execution somewhere within a definition rather than at the
+   beginning.
 
-----
-rrqforth.asm:  WORD p_execute,'EXECUTE',fasm
-----
+ * <<p_dostring>>, <<p_dovalue>> and <<p_dovariable>> implement
+   different common ways of using word content other the as FORTH
+   definitions.
 
+