X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=adoc%2Fp_2swap.adoc;h=2c03e4968161ed5654e9af6263bc926c5e03e504;hb=e5fe03259bcad1abf45257971eb92de95f269b1d;hp=7b0694caf8cb7f68bb4d67730a0d8632f243e689;hpb=b7da3f7bbd1cb10241163abdb950472e539e796d;p=rrq%2Frrqforth.git diff --git a/adoc/p_2swap.adoc b/adoc/p_2swap.adoc index 7b0694c..2c03e49 100644 --- a/adoc/p_2swap.adoc +++ b/adoc/p_2swap.adoc @@ -1,9 +1,20 @@ +// stack.asm: WORD p_2swap, '2SWAP',fasm + anchor:p_2swap[] -Word: 2SWAP ----------- +=== Word: 2SWAP + +.... +Data stack: ( v1 v2 v3 v4 -- v3 v4 v1 v2 ) +.... ----- -stack.asm: WORD p_2swap, '2SWAP',fasm ----- +"2SWAP" is a function word the reorgnizes the top 4 cells swappping +the upper and lower pair. This is similar to <> but +working with cell pairs rather than single cells. +==== +.Definition concept for 2SWAP +**** +( v1 v2 v3 v4 -- v3 v4 v1 v2 ) : 2SWAP 3 ROLL 3 ROLL ; +**** +====