various fixes to cross refs
[rrq/rrqforth.git] / adoc / p_literal_string.adoc
index 5eaaec5345809a36b6df3c5c9aa0ee0b64e3e57c..218f443e7bab945ce1bedf8550502cb890129a04 100644 (file)
@@ -1,15 +1,23 @@
-Word: S"
-----------
+//compile.asm: WORD p_literal_string,'S"',fasm ;; " (fool emacs)
 
 anchor:p_literal_string[]
-----
-compile.asm:   WORD p_literal_string,'S"',fasm ;; " (fool emacs)
-----
 
-"S"" is a function word for, in compaling mode, creating a string
-literal whose pname ( char* n ) gets pushed in interpreting mode.
+=== Word: S"
+
+....
+Data stack: ( -- chars* n )
+....
 
-Similar to "LIT", "S"" will insert the string into the containing
-definition, and use it from there.
+"S"" is a function word that pushes the [n:char] pointer for a string
+inlined subsequently to it in the containing definition. This is
+similar to <<p_lit,LIT>> but for a string literal.
+
+====
+.Word: LIT
+[caption='Definition concept {counter:exec}: ']
+----
+: LIT R> DUP @ 2DUP + 8 + >R SWAP 8 + SWAP ;
+----
+====