aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/avr8/words/d-invert.asm
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/avr8/words/d-invert.asm')
-rw-r--r--amforth-6.5/avr8/words/d-invert.asm20
1 files changed, 20 insertions, 0 deletions
diff --git a/amforth-6.5/avr8/words/d-invert.asm b/amforth-6.5/avr8/words/d-invert.asm
new file mode 100644
index 0000000..c87ae05
--- /dev/null
+++ b/amforth-6.5/avr8/words/d-invert.asm
@@ -0,0 +1,20 @@
+; ( d1 -- d2)
+; Arithmetics
+; invert all bits in the double cell value
+VE_DINVERT:
+ .dw $ff07
+ .db "dinvert",0
+ .dw VE_HEAD
+ .set VE_HEAD = VE_DINVERT
+XT_DINVERT:
+ .dw PFA_DINVERT
+PFA_DINVERT:
+ ld temp0, Y+
+ ld temp1, Y+
+ com tosl
+ com tosh
+ com temp0
+ com temp1
+ st -Y, temp1
+ st -Y, temp0
+ jmp_ DO_NEXT