aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/avr8/words/plus.asm
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/avr8/words/plus.asm')
-rw-r--r--amforth-6.5/avr8/words/plus.asm16
1 files changed, 16 insertions, 0 deletions
diff --git a/amforth-6.5/avr8/words/plus.asm b/amforth-6.5/avr8/words/plus.asm
new file mode 100644
index 0000000..1b2a6c4
--- /dev/null
+++ b/amforth-6.5/avr8/words/plus.asm
@@ -0,0 +1,16 @@
+; ( n1 n2 -- n3)
+; Arithmetics
+; add n1 and n2
+VE_PLUS:
+ .dw $ff01
+ .db "+",0
+ .dw VE_HEAD
+ .set VE_HEAD = VE_PLUS
+XT_PLUS:
+ .dw PFA_PLUS
+PFA_PLUS:
+ ld temp0, Y+
+ ld temp1, Y+
+ add tosl, temp0
+ adc tosh, temp1
+ jmp_ DO_NEXT