aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/msp430/words/rot.asm
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/msp430/words/rot.asm')
-rw-r--r--amforth-6.5/msp430/words/rot.asm7
1 files changed, 7 insertions, 0 deletions
diff --git a/amforth-6.5/msp430/words/rot.asm b/amforth-6.5/msp430/words/rot.asm
new file mode 100644
index 0000000..fe5914b
--- /dev/null
+++ b/amforth-6.5/msp430/words/rot.asm
@@ -0,0 +1,7 @@
+;C ROT x1 x2 x3 -- x2 x3 x1 per stack diagram
+ CODEHEADER(XT_ROT,3,"rot")
+ MOV @PSP,W ; 2 fetch x2
+ MOV TOS,0(PSP) ; 4 store x3
+ MOV 2(PSP),TOS ; 3 fetch x1
+ MOV W,2(PSP) ; 4 store x2
+ NEXT ; 4