SP should be space character
[rrq/rrqforth.git] / adoc / p_2swap.adoc
index 7b0694caf8cb7f68bb4d67730a0d8632f243e689..6c123cfad61406bd5549c66dae164c4e224c9308 100644 (file)
@@ -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 <<p_swap,SWAP>> 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 ;
 ----
-
+====