X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=adoc%2Fp_2swap.adoc;h=6c123cfad61406bd5549c66dae164c4e224c9308;hb=26055b00fd17f803cf80d1ebce450db6c2159af7;hp=7b0694caf8cb7f68bb4d67730a0d8632f243e689;hpb=b7da3f7bbd1cb10241163abdb950472e539e796d;p=rrq%2Frrqforth.git diff --git a/adoc/p_2swap.adoc b/adoc/p_2swap.adoc index 7b0694c..6c123cf 100644 --- a/adoc/p_2swap.adoc +++ b/adoc/p_2swap.adoc @@ -1,9 +1,21 @@ +// stack.asm: WORD p_2swap, '2SWAP',fasm + anchor:p_2swap[] -Word: 2SWAP ----------- +=== Word: 2SWAP + +.... +Data stack: ( v1 v2 v3 v4 -- v3 v4 v1 v2 ) +.... +"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. + +==== +.Word: 2SWAP +[caption='Definition concept {counter:exec}: '] ---- -stack.asm: WORD p_2swap, '2SWAP',fasm +: 2SWAP 3 ROLL 3 ROOL ; ---- - +====