Skip to content

Instruction 5 DUP_3

HoverCatz edited this page Feb 8, 2024 · 1 revision

This will DUP (aka duplicate) the last 3 elements (the top/the right-most/the last added element) on the stack, and add a copy of them to the top of the stack.

Stack before: ${[\space\color{#947cdd}A\space\color{white}, \space\color{#947cdd}B\color{white}\space, \space\color{#947cdd}C\color{white}\space, \space\color{#947cdd}D\color{white}\space]}$

DUP_3

Stack after: ${[\space\color{#947cdd}A\space\color{white}, \space\color{#947cdd}B\color{white}\space, \space\color{#947cdd}C\color{white}\space, \space\color{#947cdd}D\color{white}\space, \space\color{#947cdd}B\color{white}\space, \space\color{#947cdd}C\color{white}\space, \space\color{#947cdd}D\color{white}\space]}$

Values duplicated: ${[\space\color{#947cdd}B\color{white}\space,\space\color{#947cdd}C\color{white}\space,\space\color{#947cdd}D\color{white}\space]}$

Clone this wiki locally