make strncmp direction safe
[rrq/rrqforth.git] / adoc / p_rot.adoc
index 5764e0e4c001125cd7059a8b075f22e685f2f00e..649a4067c981855b291fcccfe4af65d3da01f90d 100644 (file)
@@ -1,9 +1,15 @@
+// stack.asm:  WORD p_rot, 'ROT',fasm
+
 anchor:p_rot[]
 
-Word: ROT
-----------
+=== Word: ROT
+
+....
+Data stack: ( v1 v2 v3 -- v2 v3 v1 )
+....
 
-----
-stack.asm:     WORD p_rot, 'ROT',fasm
-----
+"ROT" is a function word that "rotates" the top three data stack cells
+such that the third becomes the first while the second becomes third
+and the first becomes the second.
 
+See also <<p_roll,ROLL>>.