drop
( w – ) core “drop”
nip
( w1 w2 – w2 ) core-ext “nip”
dup
( w – w w ) core “dupe”
over
( w1 w2 – w1 w2 w1 ) core “over”
third
( w1 w2 w3 – w1 w2 w3 w1 ) gforth-1.0 “third”
fourth
( w1 w2 w3 w4 – w1 w2 w3 w4 w1 ) gforth-1.0 “fourth”
swap
( w1 w2 – w2 w1 ) core “swap”
rot
( w1 w2 w3 – w2 w3 w1 ) core “rote”
-rot
( w1 w2 w3 – w3 w1 w2 ) gforth-0.2 “not-rote”
tuck
( w1 w2 – w2 w1 w2 ) core-ext “tuck”
pick
( S:... u – S:... w ) core-ext “pick”
Actually the stack effect is x0 ... xu u -- x0 ... xu x0
.
roll
( x0 x1 .. xn n – x1 .. xn x0 ) core-ext “roll”
?dup
( w – S:... w ) core “question-dupe”
Actually the stack effect is: ( 0 -- 0 | x\0 -- x x )
. It performs a
dup
if x is nonzero.
2drop
( w1 w2 – ) core “two-drop”
2nip
( w1 w2 w3 w4 – w3 w4 ) gforth-0.2 “two-nip”
2dup
( w1 w2 – w1 w2 w1 w2 ) core “two-dupe”
2over
( w1 w2 w3 w4 – w1 w2 w3 w4 w1 w2 ) core “two-over”
2swap
( w1 w2 w3 w4 – w3 w4 w1 w2 ) core “two-swap”
2rot
( w1 w2 w3 w4 w5 w6 – w3 w4 w5 w6 w1 w2 ) double-ext “two-rote”
2tuck
( w1 w2 w3 w4 – w3 w4 w1 w2 w3 w4 ) gforth-0.2 “two-tuck”