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/avr8/words/d-plus.asm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 amforth-6.5/avr8/words/d-plus.asm (limited to 'amforth-6.5/avr8/words/d-plus.asm') diff --git a/amforth-6.5/avr8/words/d-plus.asm b/amforth-6.5/avr8/words/d-plus.asm new file mode 100644 index 0000000..60286dd --- /dev/null +++ b/amforth-6.5/avr8/words/d-plus.asm @@ -0,0 +1,27 @@ +; ( d1 d2 -- d3) +; Arithmetics +; add 2 double cell values +VE_DPLUS: + .dw $ff02 + .db "d+" + .dw VE_HEAD + .set VE_HEAD = VE_DPLUS +XT_DPLUS: + .dw PFA_DPLUS +PFA_DPLUS: + ld temp2, Y+ + ld temp3, Y+ + + ld temp4, Y+ + ld temp5, Y+ + ld temp6, Y+ + ld temp7, Y+ + + add temp2, temp6 + adc temp3, temp7 + adc tosl, temp4 + adc tosh, temp5 + + st -Y, temp3 + st -Y, temp2 + jmp_ DO_NEXT -- cgit v1.2.3