more and better documentation and some reorganisation
[rrq/rrqforth.git] / adoc / p_base.adoc
index 43c2e9e52c21a4e6be374843d72774e56516817c..fe6d66f4a10545663a558c3d01edbc586a034318 100644 (file)
@@ -1,8 +1,25 @@
-Word: BASE
-----------
+// compile.asm: WORD p_base,'BASE',dovariable
 
 anchor:p_base[]
-----
-compile.asm:   WORD p_base,'BASE',dovariable
-----
 
+=== Word: BASE
+
+....
+Data stack: ( -- a )
+....
+
+"BASE" is a variable word for the numerical base used by input and
+output functions, <<p_number,NUMBER>> and <<p_dot>>, when
+translating numbers between cell value form and text form. The
+numerical base is set to 10 or 16 by <<p_decimal,DECIMAL>> and
+<<p_hex,HEX>> respectively, and those are the only two bases currently
+supported.
+
+See also <<p_digits,DIGITS>>, which holds the mapping table from
+digits to text.
+
+====
+.Usage example {counter:example}: claim 16 bytes for variable FOO
+[caption='Usage example {counter:example}: ']
+CREATE FOO BASE
+====