From: Ralph Ronnquist Date: Sat, 5 Jun 2021 23:41:52 +0000 (+1000) Subject: added CFA>TFA X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=dde72a74dda4836bbce74d39bf869ac3b0c0cef1;p=rrq%2Frrqforth.git added CFA>TFA --- diff --git a/adoc/p_cfa2tfa.adoc b/adoc/p_cfa2tfa.adoc new file mode 100644 index 0000000..841720d --- /dev/null +++ b/adoc/p_cfa2tfa.adoc @@ -0,0 +1,18 @@ +// memory.asm: WORD p_cfa2tfa, 'CFA>TFA',fasm + +anchor:p_cfa2tfa[] + +=== Word: CFA>TFA + +.... +Data stack: ( cfa -- tfa ) +.... + +"CFA>TFA" is a function word that pushes word tfa of the given cfa. + +==== +.Definition concept for CFA>TFA +**** +: CFA>TFA 14 - @ ; +**** +==== diff --git a/memory.asm b/memory.asm index 80ce280..4fe4772 100644 --- a/memory.asm +++ b/memory.asm @@ -29,6 +29,13 @@ push rax next + WORD p_cfa2tfa,'CFA>TFA',fasm + ;; ( cfa -- tfa ) + pop rax + cfa2tfa rax + push rax + next + WORD p_cfa2flags_get,'CFA>FLAGS@',fasm ;; ( cfa -- flags ) pop rax diff --git a/reference.adoc b/reference.adoc index a45d496..7720490 100644 --- a/reference.adoc +++ b/reference.adoc @@ -31,6 +31,8 @@ include::adoc/p_2swap.adoc[] include::separator.adoc[] include::adoc/p_Ccomma.adoc[] include::separator.adoc[] +include::adoc/p_cfa2tfa.adoc[] +include::separator.adoc[] include::adoc/p_Cget.adoc[] include::separator.adoc[] include::adoc/p_Cput.adoc[] diff --git a/wordindex.adoc b/wordindex.adoc index 7cbca39..a64f84b 100644 --- a/wordindex.adoc +++ b/wordindex.adoc @@ -68,6 +68,7 @@ xref:p_begin[BEGIN] {nbsp} xref:p_break[BREAK] {nbsp} xref:p_cfa2flags_get[CFA>FLAGS@] {nbsp} +xref:p_cfa2tfa[CFA>TFA] {nbsp} xref:p_clear_stream[CLEAR-STREAM] {nbsp} xref:p_create[CREATE] {nbsp} xref:p_current_wordlist[CURRENT-WORDLIST] {nbsp}