DUPN_OPCODE=0xE6SWAPN_OPCODE=0xE7
Upon activation of this EIP, introduce two new instructions SWAPN and DUPN, both with an immediate operand n ∈ [17, 235].
SWAPN n:DUPN n:
Each instruction spans 2 bytes. The first byte is either SWAPN_OPCODE or DUPN_OPCODE. The second byte is f(n) as defined by the following Python code:
def f(n: int) -> int:
assert 17 <= n <= 235
y = n - 17
if y < 0x5B:
return y
else:
return y - 0x5B + 0x80