standardized call-out blocks
[rrq/rrqforth.git] / adoc / p_literal.adoc
index b469880fdeac41b629c6d6052e0b0a99cfdb020c..5a50f2d5ab3fb7f0807c637a078862e441e1a799 100644 (file)
@@ -1,30 +1,26 @@
-Word: LIT
----------
+// compile.asm:        WORD p_literal,'LIT',fasm
 
 anchor:p_literal[]
-----
-compile.asm:   WORD p_literal,'LIT',fasm
-----
 
-Data stack: compiling ( v -- ) interpreting ( -- v )
+=== Word: LIT
 
-"LIT" is a function word for, in compiling mode, creating a literal
-value the gets pushed in interpreting mode. In compiling mode, it a
-lays out its own CFA pointer, then grabs the current stack value onto
-the heap. In interpreting mode it recreates the value onto the stack.
+....
+Data stack: ( -- v )
+....
 
-Note that the value is layed out as if a subsequent CFA poitnter in
-the containing definition, but the LIT execution will make the
-execution skip past that and instead contine with the CFA pointer
-folling the value.
+"LIT" is a function word that pushes the cell subsequent and moves
+excution past that. The literal value is thus layed out as if a
+subsequent CFA pointer in the containing definition, and the LIT
+execution will make the execution skip past that and instead contine
+with the CFA pointer following the value.
 
 It's not a good idea to use "LIT" interactively.
 
-.Execution semantics expressed in RRQFORTH
 ====
-: LIT IMMEDIATE
-  STATE @ IF p_literal , ELSE R> DUP 8 + >R @ THEN
-;
+.Definition concept for LIT
+****
+: LIT R> DUP 8 + >R @ ;
+****
 ====