aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/msp430/words/i.asm
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/msp430/words/i.asm')
-rw-r--r--amforth-6.5/msp430/words/i.asm8
1 files changed, 8 insertions, 0 deletions
diff --git a/amforth-6.5/msp430/words/i.asm b/amforth-6.5/msp430/words/i.asm
new file mode 100644
index 0000000..bd6b4eb
--- /dev/null
+++ b/amforth-6.5/msp430/words/i.asm
@@ -0,0 +1,8 @@
+;C I -- n R: sys1 sys2 -- sys1 sys2
+;C get the innermost loop index
+ CODEHEADER(XT_I,1,"i")
+ SUB #2,PSP ; make room in TOS
+ MOV TOS,0(PSP)
+ MOV INDEX,TOS ; index = loopctr - fudge
+ SUB LIMIT,TOS
+ NEXT