X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=adoc%2Fp_rot.adoc;h=649a4067c981855b291fcccfe4af65d3da01f90d;hb=26055b00fd17f803cf80d1ebce450db6c2159af7;hp=5764e0e4c001125cd7059a8b075f22e685f2f00e;hpb=b7da3f7bbd1cb10241163abdb950472e539e796d;p=rrq%2Frrqforth.git diff --git a/adoc/p_rot.adoc b/adoc/p_rot.adoc index 5764e0e..649a406 100644 --- a/adoc/p_rot.adoc +++ b/adoc/p_rot.adoc @@ -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 <>.