aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/avr8/words/d-invert.asm
blob: c87ae0597f7709002171afecb736d5caa1fd1d6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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