more and better documentation and some reorganisation
[rrq/rrqforth.git] / adoc / p_base.adoc
1 // compile.asm: WORD p_base,'BASE',dovariable
2
3 anchor:p_base[]
4
5 === Word: BASE
6
7 ....
8 Data stack: ( -- a )
9 ....
10
11 "BASE" is a variable word for the numerical base used by input and
12 output functions, <<p_number,NUMBER>> and <<p_dot>>, when
13 translating numbers between cell value form and text form. The
14 numerical base is set to 10 or 16 by <<p_decimal,DECIMAL>> and
15 <<p_hex,HEX>> respectively, and those are the only two bases currently
16 supported.
17
18 See also <<p_digits,DIGITS>>, which holds the mapping table from
19 digits to text.
20
21 ====
22 .Usage example {counter:example}: claim 16 bytes for variable FOO
23 [caption='Usage example {counter:example}: ']
24 CREATE FOO BASE
25 ====