aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/words/2dup.asm
blob: 258c4f94867aa6a7d7519792659e403bbfaa5c76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
; ( x1 x2 -- x1 x2 x1 x2 ) 
; Stack
; Duplicate the 2 top elements

.if cpu_msp430==1
    HEADER(XT_2DUP,4,"2dup",DOCOLON)
.endif

.if cpu_avr8==1
VE_2DUP:
    .dw $ff04
    .db "2dup"
    .dw VE_HEAD
    .set VE_HEAD = VE_2DUP
XT_2DUP:
    .dw DO_COLON
PFA_2DUP:
.endif

    .dw XT_OVER
    .dw XT_OVER
    .dw XT_EXIT