rename
[rrq/rrqforth.git] / adoc / p_2swap.adoc
1 // stack.asm:   WORD p_2swap, '2SWAP',fasm
2
3 anchor:p_2swap[]
4
5 === Word: 2SWAP
6
7 ....
8 Data stack: ( v1 v2 v3 v4 -- v3 v4 v1 v2 )
9 ....
10
11 "2SWAP" is a function word the reorgnizes the top 4 cells swappping
12 the upper and lower pair. This is similar to <<p_swap,SWAP>> but
13 working with cell pairs rather than single cells.
14
15 ====
16 .Definition concept for 2SWAP
17 ****
18 ( v1 v2 v3 v4 -- v3 v4 v1 v2 ) : 2SWAP 3 ROLL 3 ROLL ;
19 ****
20 ====