aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/msp430/words/d-plus.asm
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/msp430/words/d-plus.asm')
-rw-r--r--amforth-6.5/msp430/words/d-plus.asm10
1 files changed, 10 insertions, 0 deletions
diff --git a/amforth-6.5/msp430/words/d-plus.asm b/amforth-6.5/msp430/words/d-plus.asm
new file mode 100644
index 0000000..90e62d7
--- /dev/null
+++ b/amforth-6.5/msp430/words/d-plus.asm
@@ -0,0 +1,10 @@
+;C d+ d1/ud1 d2/ud2 -- d3/ud3 add d1+d2
+; d1-lo d1-hi d2-lo d2-hi -- d3-lo d3 -hi
+; 4(PSP) 2(PSP) @(PSP) TOS -- NOS TOS
+
+ CODEHEADER(XT_DPLUS,2,"d+")
+ ADD 0(PSP), 4(PSP) ; add contents of work- and scratchregister, result is in workregister
+ ADDC 2(PSP),TOS ; add content of TOS to the 3rd item, result is in TOS
+ ADD #4,PSP ; adjust parameterstackpointer, i.e. nip nip
+ NEXT
+