aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/words/mod.asm
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/common/words/mod.asm')
-rw-r--r--amforth-6.5/common/words/mod.asm23
1 files changed, 23 insertions, 0 deletions
diff --git a/amforth-6.5/common/words/mod.asm b/amforth-6.5/common/words/mod.asm
new file mode 100644
index 0000000..1f6cdee
--- /dev/null
+++ b/amforth-6.5/common/words/mod.asm
@@ -0,0 +1,23 @@
+; ( n1 n2 -- n3)
+; Arithmetics
+; divide n1 by n2 giving the remainder n3
+
+.if cpu_msp430==1
+ HEADER(XT_MOD,3,"mod",DOCOLON)
+.endif
+
+.if cpu_avr8==1
+
+
+VE_MOD:
+ .dw $ff03
+ .db "mod",0
+ .dw VE_HEAD
+ .set VE_HEAD = VE_MOD
+XT_MOD:
+ .dw DO_COLON
+PFA_MOD:
+.endif
+ .dw XT_SLASHMOD
+ .dw XT_DROP
+ .dw XT_EXIT