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-minus.asm | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 amforth-6.5/msp430/words/d-minus.asm (limited to 'amforth-6.5/msp430/words/d-minus.asm') diff --git a/amforth-6.5/msp430/words/d-minus.asm b/amforth-6.5/msp430/words/d-minus.asm new file mode 100644 index 0000000..a39db67 --- /dev/null +++ b/amforth-6.5/msp430/words/d-minus.asm @@ -0,0 +1,10 @@ +;C d+ d1/ud1 d2/ud2 -- d3/ud3 sub d1-d2 +; d1-lo d1-hi d2-lo d2-hi -- d3-lo d3 -hi +; 4(PSP) 2(PSP) @(PSP) TOS -- NOS TOS + + CODEHEADER(XT_DMINUS,2,"d-") + SUB 0(PSP),4(PSP) ; subtract contents of scratchregister X from workregister, result is in scratchregister X + SUBC TOS,2(PSP) ; subtract content of TOS from the 3rd item, result is in 3rd item + MOV 2(PSP),TOS ; move contoent of 3rd item to TOS + ADD #4,PSP ; adjust parameterstackpointer, i.e. nip nip + NEXT -- cgit v1.2.3