more and better documentation and some reorganisation
[rrq/rrqforth.git] / adoc / p_allot.adoc
1 // compile.asm: WORD p_allot,'ALLOT',fasm
2
3 anchor:p_allot[]
4
5 === Word: ALLOT
6
7 ....
8 Data stack: ( n -- )
9 ....
10
11 "ALLOT" is a function word that merely increments the <<p_here,HERE>>
12 variable with +n+ so as to claim that amount of the heap.
13
14 ====
15 .Defintion concept for ALLOT
16 ****
17 ( n -- ) : ALLOT HERE @ + HERE ! ;
18 ****
19 ====
20
21 ====
22 .Usage example {counter:example}: claim 16 bytes for variable FOO
23 CREATE FOO DROP HERE @ 16 ALLOT
24 ====