From 790e9481bef2c62a8eb20d4ab4813286d8470782 Mon Sep 17 00:00:00 2001 From: sejo Date: Mon, 16 Aug 2021 16:03:14 -0500 Subject: [PATCH] added NIP instruction --- src/uxn_tutorial_day_3.gmo | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/uxn_tutorial_day_3.gmo b/src/uxn_tutorial_day_3.gmo index 038e38f..e3e6573 100644 --- a/src/uxn_tutorial_day_3.gmo +++ b/src/uxn_tutorial_day_3.gmo @@ -362,15 +362,16 @@ so far we have been using the stack as a place to store operands of instructions ## stack instructions -uxntal has five instructions that act upon the elements in the stack: +uxntal has six instructions that act upon the elements in the stack: * POP: Remove top element from the stack ( a -- ) * DUP: Duplicate; push a copy of the top element ( a -- a a ) * SWP: Swap; change the order of the top two elements of the stack ( a b -- b a ) +* NIP: Remove the top second element of the stack ( a b -- b ) * OVR: Over; push a copy of the second top element ( a b -- a b a ) * ROT: Rotate; reorder the top three elements of the stack so that the third one is now at the top ( a b c -- b c a ) -in short mode, POP2, DUP2, SWP2, OVR2 and ROT2 perform the same actions but using shorts instead of bytes. +in short mode, POP2, DUP2, SWP2, NIP2, OVR2 and ROT2 perform the same actions but using shorts instead of bytes. ## examples