dup simply duplicates the top of the stack. It's a code word.
To see how F-PC v3.6 defines DUP, perform below steps.
DUP is Code, load DISASSEM to see it. ok
A file MUST be open to perform this operation.
open disassem of 16329 bytes. ok
Loading..ESCTOEXIT 6F6C 61 Stack Empty. OOPS! ←– oops! sounds like there's a problem but it can be ignored.
ESCTOEXIT
568 8B SP DI MOV, 8B FC .| ←— DUP 's definition start from here
56A FF 0 [DI] PUSH, FF 35 .5
56C 26 ES: 26 & ←— >NEXT
56D AD WORD LODS, AD -
56E FF AX #) JMP, FF E0 .` ←— end of DUP's definition
570 5A DX POP, 5A Z ←— start of the next word's definition
571 58 AX POP, 58 X