projects
/
rrq
/
rrqforth.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed AGAIN (CnP) bug
[rrq/rrqforth.git]
/
adoc
/
p_create.adoc
diff --git
a/adoc/p_create.adoc
b/adoc/p_create.adoc
index cf8914e7b9afb27f0315a414e8f36a50e693aade..5fdfe27d3caa6536bededd5473358779baf49ec0 100644
(file)
--- a/
adoc/p_create.adoc
+++ b/
adoc/p_create.adoc
@@
-14,6
+14,8
@@
indicated [n:char*] print name, and returns the "TFA" (Token Field
Address) of the word. The header memory layout is as follows:
====
Address) of the word. The header memory layout is as follows:
====
+.rrqforth word structure
+[caption='Layout {counter:layout}: ']
----
struct WORD
TFA 8 link ; tfa of previous word
----
struct WORD
TFA 8 link ; tfa of previous word
@@
-42,9
+44,8
@@
function words initiated by ":" (aka "COLON") or changed to "dovalue"
for RRQFORTH constants created by "CONSTANT".
====
for RRQFORTH constants created by "CONSTANT".
====
-.Word: CREATE
-[caption='Definition concept {counter:exec}: ']
-----
+.Definition concept for CREATE
+****
HERE @ R> ( save tfa on RS )
R@ CURRENT-WORD @ DUP @ , ! ( link in a new word )
DUP 49 + R@ + , ( pCFA )
HERE @ R> ( save tfa on RS )
R@ CURRENT-WORD @ DUP @ , ! ( link in a new word )
DUP 49 + R@ + , ( pCFA )
@@
-54,13
+55,16
@@
HERE @ R> ( save tfa on RS )
R@ , ( pTFA )
0 , ( OFF )
doVARIABLE ( CFA, default semantics )
R@ , ( pTFA )
0 , ( OFF )
doVARIABLE ( CFA, default semantics )
-----
+****
====
====
-.Usage example: a possible definition of CONSTANT
-****
+====
+.a possible definition of CONSTANT
+[caption='Usage example {counter:example}: ']
+----
: CONSTANT READ-WORD CREATE TFA>DFA doVALUE OVER 8 - ! ! ;
: CONSTANT READ-WORD CREATE TFA>DFA doVALUE OVER 8 - ! ! ;
-****
+----
+====
See also <<p_put,!>>, <<p_plus,+>>, <<p_comma>>, <<p_get,@>>,
<<p_Ccomma>>, <<p_current_word,CURRENT-WORD>>, <<p_dup,DUP>>,
See also <<p_put,!>>, <<p_plus,+>>, <<p_comma>>, <<p_get,@>>,
<<p_Ccomma>>, <<p_current_word,CURRENT-WORD>>, <<p_dup,DUP>>,