Moving the debug trace point to be prior to advancing %rsi
[rrq/rrqforth.git] / adoc / p_begin.adoc
index ca4f1af8160b00d8905cd34584995661b33dff97..da124abb1076d85352994226fabab83e52f9a2b8 100644 (file)
@@ -14,3 +14,21 @@ implement structured execution control. BEGIN simply places the
 address for resolving branches back to this point during execution,
 and then a 0 as a marker so as to allow for an unknown number of block
 exit points.
+
+====
+.Usage example {counter:example}: 
+----
+: WTELL ( tfa -- ; Print word pname )
+  24 + DUP 8 + SWAP @ TELL SP EMIT
+;
+
+: WORDS ( wordlist -- ; Print all words of word list )
+  BEGIN
+    @ DUP 0= IFBREAK
+    DUP WTELL
+  END
+  DROP
+  NL EMIT
+;
+----
+====