From 67d25d837ac55f28a366c0a3b262e439a6e75fc3 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 19 Aug 2017 12:15:28 +0200 Subject: Add AmForth --- amforth-6.5/msp430/words/d-plus.asm | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 amforth-6.5/msp430/words/d-plus.asm (limited to 'amforth-6.5/msp430/words/d-plus.asm') 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 + -- cgit v1.2.3