aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/avr8/words/byteswap.asm
blob: b49cd2f25443fc0aeb55391bc469ba193b668c00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; ( n1 -- n2 ) 
; Arithmetics
; exchange the bytes of the TOS
VE_BYTESWAP:
    .dw $ff02
    .db "><"
    .dw VE_HEAD
    .set VE_HEAD = VE_BYTESWAP
XT_BYTESWAP:
    .dw PFA_BYTESWAP
PFA_BYTESWAP:
    mov temp0, tosh
    mov tosh, tosl
    mov tosl, temp0
    jmp_ DO_NEXT