TVM Instructions
This information is very low-level and could be hard to understand for newcomers. So feel free to read about it later.
Introduction
This document provides a list of TVM instructions along with their opcodes and mnemonics.
TVM.pdf concept document for TON Virtual Machine (may include outdated information).
Fift is a stack-based programming language designed to manage TON smart contracts. The Fift assembler is a Fift library that converts mnemonics of TVM instructions into their binary representation.
A description of Fift, including an introduction to the Fift assembler, can be found here.
This document specifies the corresponding mnemonic for each instruction.
Note the following:
- Fift is a stack-based language, therefore all the arguments of any instruction are written before it (e.g. 5 PUSHINT,s0 s4 XCHG).
- Stack registers are denoted by s0, s1, ..., s15. Other stack registers (up to 255) are denoted byi s()(e.g.100 s()).
- Control registers are denoted by c0, c1, ..., c15.
Gas prices
The gas price of each instruction is specified in this document. The basic gas price of an instruction is 10 + b, where b is the instruction length in bits. Some operations have additional fees:
- Parsing cells: Transforming a cell into a slice costs 100 gas units if the cell is loading for the first time and 25 for subsequent loads during the same transaction. For such instructions, two gas prices are specified (e.g. CTOS:118/43).
- Cell creation: 500 gas units.
- Throwing exceptions: 50 gas units. In this document the exception fee is only specified for an instruction if its primary purpose is to throw (e.g. THROWIF,FITS). If the instruction only throws in some cases, two gas prices are specified (e.g.FITS:26/76).
- Tuple creation: 1 gas unit for every tuple element.
- Implicit jumps: 10 gas units for an implicit jump, 5 gas units for an implicit back jump. This fee is not a part of any instruction.
- Moving stack elements between continuations: 1 gas unit per element, however moving the first 32 elements is free.
Quick search
A full machine-readable list of TVM instructions is available here.
Each section of TVM Instructions includes a built-in search component for finding opcodes specific to that section as well.
On this page, however, the search covers all existing opcodes, providing a comprehensive search option across the entire opcode range.
Feel free to use the search field below to find a specific instruction:
- Overview
- Stack Manipulation
- Tuple, List and Null
- Constants and Literals
- Arithmetic Operations
- Data Comparison
- Cell Manipulation
- Continuation and Control Flow
- Exception Generation and Handling
- Dictionary Manipulation
- Application-specific Primitives
- Miscellaneous
- Aliases
| Opcode | Fift syntax | Stack | Description | Gas | 
|---|---|---|---|---|
| 00 | NOP | - | Does nothing. | 18 | 
| 0i | s[i] XCHG0 |  | Interchanges s0withs[i],1 <= i <= 15. | 18 | 
| 10ij | s[i] s[j] XCHG |  | Interchanges s[i]withs[j],1 <= i < j <= 15. | 26 | 
| 11ii | s0 [ii] s() XCHG |  | Interchanges s0withs[ii],0 <= ii <= 255. | 26 | 
| 1i | s1 s[i] XCHG |  | Interchanges s1withs[i],2 <= i <= 15. | 18 | 
| 2i | s[i] PUSH |  | Pushes a copy of the old s[i]into the stack. | 18 | 
| 3i | s[i] POP |  | Pops the old s0value into the olds[i]. | 18 | 
| 4ijk | s[i] s[j] s[k] XCHG3 |  | Equivalent to s2 s[i] XCHGs1 s[j] XCHGs[k] XCHG0. | 26 | 
| 50ij | s[i] s[j] XCHG2 |  | Equivalent to s1 s[i] XCHGs[j] XCHG0. | 26 | 
| 51ij | s[i] s[j] XCPU |  | Equivalent to s[i] XCHG0s[j] PUSH. | 26 | 
| 52ij | s[i] s[j-1] PUXC |  | Equivalent to s[i] PUSHSWAPs[j] XCHG0. | 26 | 
| 53ij | s[i] s[j] PUSH2 |  | Equivalent to s[i] PUSHs[j+1] PUSH. | 26 | 
| 540ijk | s[i] s[j] s[k] XCHG3_l |  | Long form of XCHG3. | 34 | 
| 541ijk | s[i] s[j] s[k] XC2PU |  | Equivalent to s[i] s[j] XCHG2s[k] PUSH. | 34 | 
| 542ijk | s[i] s[j] s[k-1] XCPUXC |  | Equivalent to s1 s[i] XCHGs[j] s[k-1] PUXC. | 34 | 
| 543ijk | s[i] s[j] s[k] XCPU2 |  | Equivalent to s[i] XCHG0s[j] s[k] PUSH2. | 34 | 
| 544ijk | s[i] s[j-1] s[k-1] PUXC2 |  | Equivalent to s[i] PUSHs2 XCHG0s[j] s[k] XCHG2. | 34 | 
| 545ijk | s[i] s[j-1] s[k-1] PUXCPU |  | Equivalent to s[i] s[j-1] PUXCs[k] PUSH. | 34 | 
| 546ijk | s[i] s[j-1] s[k-2] PU2XC |  | Equivalent to s[i] PUSHSWAPs[j] s[k-1] PUXC. | 34 | 
| 547ijk | s[i] s[j] s[k] PUSH3 |  | Equivalent to s[i] PUSHs[j+1] s[k+1] PUSH2. | 34 | 
| 55ij | [i+1] [j+1] BLKSWAP |  | Permutes two blocks  | 26 | 
| 56ii | [ii] s() PUSH |  | Pushes a copy of the old  | 26 | 
| 57ii | [ii] s() POP |  | Pops the old  | 26 | 
| 58 | ROT | a b c - b c a | Equivalent to 1 2 BLKSWAPor tos2 s1 XCHG2. | 18 | 
| 59 | ROTREV
-ROT | a b c - c a b | Equivalent to 2 1 BLKSWAPor tos2 s2 XCHG2. | 18 | 
| 5A | SWAP2
2SWAP | a b c d - c d a b | Equivalent to 2 2 BLKSWAPor tos3 s2 XCHG2. | 18 | 
| 5B | DROP2
2DROP | a b -  | Equivalent to DROPDROP. | 18 | 
| 5C | DUP2
2DUP | a b - a b a b | Equivalent to s1 s0 PUSH2. | 18 | 
| 5D | OVER2
2OVER | a b c d - a b c d a b | Equivalent to s3 s2 PUSH2. | 18 | 
| 5Eij | [i+2] [j] REVERSE |  | Reverses the order of s[j+i+1] ... s[j]. | 26 | 
| 5F0i | [i] BLKDROP |  | Equivalent to DROPperformeditimes. | 26 | 
| 5Fij | [i] [j] BLKPUSH |  | Equivalent to  | 26 | 
| 60 | PICK
PUSHX |  | Pops integer ifrom the stack, then performss[i] PUSH. | 18 | 
| 61 | ROLLX |  | Pops integer ifrom the stack, then performs1 [i] BLKSWAP. | 18 | 
| 62 | -ROLLX
ROLLREVX |  | Pops integer ifrom the stack, then performs[i] 1 BLKSWAP. | 18 | 
| 63 | BLKSWX |  | Pops integers i,jfrom the stack, then performs[i] [j] BLKSWAP. | 18 | 
| 64 | REVX |  | Pops integers i,jfrom the stack, then performs[i] [j] REVERSE. | 18 | 
| 65 | DROPX |  | Pops integer ifrom the stack, then performs[i] BLKDROP. | 18 | 
| 66 | TUCK | a b - b a b | Equivalent to SWAPOVERor tos1 s1 XCPU. | 18 | 
| 67 | XCHGX |  | Pops integer ifrom the stack, then performss[i] XCHG. | 18 | 
| 68 | DEPTH | - depth | Pushes the current depth of the stack. | 18 | 
| 69 | CHKDEPTH | i - | Pops integer ifrom the stack, then checks whether there are at leastielements, generating a stack underflow exception otherwise. | 18/58 | 
| 6A | ONLYTOPX |  | Pops integer ifrom the stack, then removes all but the topielements. | 18 | 
| 6B | ONLYX |  | Pops integer ifrom the stack, then leaves only the bottomielements. Approximately equivalent toDEPTHSWAPSUBDROPX. | 18 | 
| 6Cij | [i] [j] BLKDROP2 |  | Drops  | 26 | 
| 6D | NULL
PUSHNULL |  - null | Pushes the only value of type Null. | 18 | 
| 6E | ISNULL | x - ? | Checks whether xis a Null, and returns-1or0accordingly. | 18 | 
| 6F0n | [n] TUPLE | x_1 ... x_n - t | Creates a new Tuple  | 26+n | 
| 6F1k | [k] INDEX | t - x | Returns the  | 26 | 
| 6F2n | [n] UNTUPLE | t - x_1 ... x_n | Unpacks a Tuple  | 26+n | 
| 6F3k | [k] UNPACKFIRST | t - x_1 ... x_k | Unpacks first  | 26+k | 
| 6F4n | [n] EXPLODE | t - x_1 ... x_m m | Unpacks a Tuple t=(x_1,...,x_m)and returns its lengthm, but only ifm <= n <= 15. Otherwise throws a type check exception. | 26+m | 
| 6F5k | [k] SETINDEX | t x - t' | Computes Tuple  | 26+|t| | 
| 6F6k | [k] INDEXQ | t - x | Returns the k-th element of a Tuplet, where0 <= k <= 15. In other words, returnsx_{k+1}ift=(x_1,...,x_n). Ifk>=n, or iftis Null, returns a Null instead ofx. | 26 | 
| 6F7k | [k] SETINDEXQ | t x - t' | Sets the  | 26+|t'| | 
| 6F80 | TUPLEVAR | x_1 ... x_n n - t | Creates a new Tuple tof lengthnsimilarly toTUPLE, but with0 <= n <= 255taken from the stack. | 26+n | 
| 6F81 | INDEXVAR | t k - x | Similar to k INDEX, but with0 <= k <= 254taken from the stack. | 26 | 
| 6F82 | UNTUPLEVAR | t n - x_1 ... x_n | Similar to n UNTUPLE, but with0 <= n <= 255taken from the stack. | 26+n | 
| 6F83 | UNPACKFIRSTVAR | t n - x_1 ... x_n | Similar to n UNPACKFIRST, but with0 <= n <= 255taken from the stack. | 26+n | 
| 6F84 | EXPLODEVAR | t n - x_1 ... x_m m | Similar to n EXPLODE, but with0 <= n <= 255taken from the stack. | 26+m | 
| 6F85 | SETINDEXVAR | t x k - t' | Similar to k SETINDEX, but with0 <= k <= 254taken from the stack. | 26+|t'| | 
| 6F86 | INDEXVARQ | t k - x | Similar to n INDEXQ, but with0 <= k <= 254taken from the stack. | 26 | 
| 6F87 | SETINDEXVARQ | t x k - t' | Similar to k SETINDEXQ, but with0 <= k <= 254taken from the stack. | 26+|t'| | 
| 6F88 | TLEN | t - n | Returns the length of a Tuple. | 26 | 
| 6F89 | QTLEN | t - n or -1 | Similar to TLEN, but returns-1iftis not a Tuple. | 26 | 
| 6F8A | ISTUPLE | t - ? | Returns -1or0depending on whethertis a Tuple. | 26 | 
| 6F8B | LAST | t - x | Returns the last element of a non-empty Tuple t. | 26 | 
| 6F8C | TPUSH
COMMA | t x - t' | Appends a value xto a Tuplet=(x_1,...,x_n), but only if the resulting Tuplet'=(x_1,...,x_n,x)is of length at most 255. Otherwise throws a type check exception. | 26+|t'| | 
| 6F8D | TPOP | t - t' x | Detaches the last element x=x_nfrom a non-empty Tuplet=(x_1,...,x_n), and returns both the resulting Tuplet'=(x_1,...,x_{n-1})and the original last elementx. | 26+|t'| | 
| 6FA0 | NULLSWAPIF | x - x or null x | Pushes a Null under the topmost Integer x, but only ifx!=0. | 26 | 
| 6FA1 | NULLSWAPIFNOT | x - x or null x | Pushes a Null under the topmost Integer x, but only ifx=0. May be used for stack alignment after quiet primitives such asPLDUXQ. | 26 | 
| 6FA2 | NULLROTRIF | x y - x y or null x y | Pushes a Null under the second stack entry from the top, but only if the topmost Integer yis non-zero. | 26 | 
| 6FA3 | NULLROTRIFNOT | x y - x y or null x y | Pushes a Null under the second stack entry from the top, but only if the topmost Integer yis zero. May be used for stack alignment after quiet primitives such asLDUXQ. | 26 | 
| 6FA4 | NULLSWAPIF2 | x - x or null null x | Pushes two nulls under the topmost Integer  | 26 | 
| 6FA5 | NULLSWAPIFNOT2 | x - x or null null x | Pushes two nulls under the topmost Integer  | 26 | 
| 6FA6 | NULLROTRIF2 | x y - x y or null null x y | Pushes two nulls under the second stack entry from the top, but only if the topmost Integer  | 26 | 
| 6FA7 | NULLROTRIFNOT2 | x y - x y or null null x y | Pushes two nulls under the second stack entry from the top, but only if the topmost Integer  | 26 | 
| 6FBij | [i] [j] INDEX2 | t - x | Recovers  | 26 | 
| 6FE_ijk | [i] [j] [k] INDEX3 | t - x | Recovers  | 26 | 
| 7i | [x] PUSHINT
[x] INT | - x | Pushes integer  | 18 | 
| 80xx | [xx] PUSHINT
[xx] INT | - xx | Pushes integer xx.-128 <= xx <= 127. | 26 | 
| 81xxxx | [xxxx] PUSHINT
[xxxx] INT | - xxxx | Pushes integer xxxx.-2^15 <= xx < 2^15. | 34 | 
| 82lxxx | [xxx] PUSHINT
[xxx] INT | - xxx | Pushes integer  | 23 | 
| 83xx | [xx+1] PUSHPOW2 | - 2^(xx+1) | (Quietly) pushes  | 26 | 
| 83FF | PUSHNAN | - NaN | Pushes a NaN. | 26 | 
| 84xx | [xx+1] PUSHPOW2DEC | - 2^(xx+1)-1 | Pushes 2^(xx+1)-1for0 <= xx <= 255. | 26 | 
| 85xx | [xx+1] PUSHNEGPOW2 | - -2^(xx+1) | Pushes -2^(xx+1)for0 <= xx <= 255. | 26 | 
| 88 | [ref] PUSHREF | - c | Pushes the reference  | 18 | 
| 89 | [ref] PUSHREFSLICE | - s | Similar to PUSHREF, but converts the cell into a Slice. | 118/43 | 
| 8A | [ref] PUSHREFCONT | - cont | Similar to PUSHREFSLICE, but makes a simple ordinary Continuation out of the cell. | 118/43 | 
| 8Bxsss | [slice] PUSHSLICE
[slice] SLICE | - s | Pushes the slice  | 22 | 
| 8Crxxssss | [slice] PUSHSLICE
[slice] SLICE | - s | Pushes the slice  | 25 | 
| 8Drxxsssss | [slice] PUSHSLICE
[slice] SLICE | - s | Pushes the slice  | 28 | 
| 8F_rxxcccc | [builder] PUSHCONT
[builder] CONT | - c | Pushes a continuation made from  | 26 | 
| 9xccc | [builder] PUSHCONT
[builder] CONT | - c | Pushes a continuation made from  | 18 | 
| A0 | ADD | x y - x+y | 18 | |
| A1 | SUB | x y - x-y | 18 | |
| A2 | SUBR | x y - y-x | Equivalent to SWAPSUB. | 18 | 
| A3 | NEGATE | x - -x | Equivalent to  | 18 | 
| A4 | INC | x - x+1 | Equivalent to 1 ADDCONST. | 18 | 
| A5 | DEC | x - x-1 | Equivalent to -1 ADDCONST. | 18 | 
| A6cc | [cc] ADDCONST
[cc] ADDINT
[-cc] SUBCONST
[-cc] SUBINT | x - x+cc | -128 <= cc <= 127. | 26 | 
| A7cc | [cc] MULCONST
[cc] MULINT | x - x*cc | -128 <= cc <= 127. | 26 | 
| A8 | MUL | x y - x*y | 18 | |
| A900 | ADDDIVMOD | x w z - q=floor((x+w)/z) r=(x+w)-zq | 26 | |
| A901 | ADDDIVMODR | x w z - q=round((x+w)/z) r=(x+w)-zq | 26 | |
| A902 | ADDDIVMODC | x w y - q=ceil((x+w)/z) r=(x+w)-zq | 26 | |
| A904 | DIV | x y - q | q=floor(x/y),r=x-y*q | 26 | 
| A905 | DIVR | x y - q' | q'=round(x/y),r'=x-y*q' | 26 | 
| A906 | DIVC | x y - q'' | q''=ceil(x/y),r''=x-y*q'' | 26 | 
| A908 | MOD | x y - r | 26 | |
| A909 | MODR | x y - r | 26 | |
| A90A | MODC | x y - r | 26 | |
| A90C | DIVMOD | x y - q r | 26 | |
| A90D | DIVMODR | x y - q' r' | 26 | |
| A90E | DIVMODC | x y - q'' r'' | 26 | |
| A920 | ADDRSHIFTMOD | x w z - q=floor((x+w)/2^z) r=(x+w)-q*2^z | 26 | |
| A921 | ADDRSHIFTMODR | x w z - q=round((x+w)/2^z) r=(x+w)-q*2^z | 26 | |
| A922 | ADDRSHIFTMODC | x w z - q=ceil((x+w)/2^z) r=(x+w)-q*2^z | 26 | |
| A925 | RSHIFTR | x y - round(x/2^y) | 26 | |
| A926 | RSHIFTC | x y - ceil(x/2^y) | 26 | |
| A928 | MODPOW2 | x y - x mod 2^y | 26 | |
| A929 | MODPOW2R | x y - x mod 2^y | 26 | |
| A92A | MODPOW2C | x y - x mod 2^y | 26 | |
| A92C | RSHIFTMOD | x y - q=floor(x/2^y) r=x-q*2^y | 26 | |
| A92D | RSHIFTMODR | x y - q=round(x/2^y) r=x-q*2^y | 26 | |
| A92E | RSHIFTMODC | x y - q=ceil(x/2^y) r=x-q*2^y | 26 | |
| A930tt | [tt+1] ADDRSHIFT#MOD | x w - q=floor((x+w)/2^(tt+1)) r=(x+w)-q*2^(tt+1) | 34 | |
| A931tt | [tt+1] ADDRSHIFTR#MOD | x w - q=round((x+w)/2^(tt+1)) r=(x+w)-q*2^(tt+1) | 34 | |
| A932tt | [tt+1] ADDRSHIFTC#MOD | x w - q=round((x+w)/2^(tt+1)) r=(x+w)-q*2^(tt+1) | 34 | |
| A935tt | [tt+1] RSHIFTR# | x - round(x/2^(tt+1)) | 34 | |
| A936tt | [tt+1] RSHIFTC# | x - ceil(x/2^(tt+1)) | 34 | |
| A938tt | [tt+1] MODPOW2# | x - x mod 2^(tt+1) | 34 | |
| A939tt | [tt+1] MODPOW2R# | x - x mod 2^(tt+1) | 34 | |
| A93Att | [tt+1] MODPOW2C# | x - x mod 2^(tt+1) | 34 | |
| A93Ctt | [tt+1] RSHIFT#MOD | x - q=floor(x/2^(tt+1)) r=x-q*2^(tt+1) | 34 | |
| A93Dtt | [tt+1] RSHIFTR#MOD | x - q=round(x/2^(tt+1)) r=x-q*2^(tt+1) | 34 | |
| A93Ett | [tt+1] RSHIFTC#MOD | x - q=ceil(x/2^(tt+1)) r=x-q*2^(tt+1) | 34 | |
| A980 | MULADDDIVMOD | x y w z - q=floor((xy+w)/z) r=(xy+w)-zq | 26 | |
| A981 | MULADDDIVMODR | x y w z - q=round((xy+w)/z) r=(xy+w)-zq | 26 | |
| A982 | MULADDDIVMODC | x y w z - q=ceil((xy+w)/z) r=(xy+w)-zq | 26 | |
| A984 | MULDIV | x y z - q | q=floor(x*y/z) | 26 | 
| A985 | MULDIVR | x y z - q' | q'=round(x*y/z) | 26 | 
| A986 | MULDIVC | x y z - q' | q'=ceil(x*y/z) | 26 | 
| A988 | MULMOD | x y z - x*y mod z | 26 | |
| A989 | MULMODR | x y z - x*y mod z | 26 | |
| A98A | MULMODC | x y z - x*y mod z | 26 | |
| A98C | MULDIVMOD | x y z - q r | q=floor(x*y/z),r=x*y-z*q | 26 | 
| A98D | MULDIVMODR | x y z - q r | q=round(x*y/z),r=x*y-z*q | 26 | 
| A98E | MULDIVMODC | x y z - q r | q=ceil(x*y/z),r=x*y-z*q | 26 | 
| A9A0 | MULADDRSHIFTMOD | x y w z - q=floor((xy+w)/2^z) r=(xy+w)-q*2^z | 26 | |
| A9A1 | MULADDRSHIFTRMOD | x y w z - q=round((xy+w)/2^z) r=(xy+w)-q*2^z | 26 | |
| A9A2 | MULADDRSHIFTCMOD | x y w z - q=ceil((xy+w)/2^z) r=(xy+w)-q*2^z | 26 | |
| A9A4 | MULRSHIFT | x y z - floor(x*y/2^z) | 0 <= z <= 256 | 26 | 
| A9A5 | MULRSHIFTR | x y z - round(x*y/2^z) | 0 <= z <= 256 | 26 | 
| A9A6 | MULRSHIFTC | x y z - ceil(x*y/2^z) | 0 <= z <= 256 | 26 | 
| A9A8 | MULMODPOW2_VAR | x y z - x*y mod 2^z | 26 | |
| A9A9 | MULMODPOW2R_VAR | x y z - x*y mod 2^z | 26 | |
| A9AA | MULMODPOW2C_VAR | x y z - x*y mod 2^z | 26 | |
| A9AC | MULRSHIFTMOD_VAR | x y z - q=floor(x*y/2^z) r=xy-q*2^z | 26 | |
| A9AD | MULRSHIFTRMOD_VAR | x y z - q=round(x*y/2^z) r=xy-q*2^z | 26 | |
| A9AE | MULRSHIFTCMOD_VAR | x y z - q=ceil(x*y/2^z) r=xy-q*2^z | 26 | |
| A9B0tt | [tt+1] MULADDRSHIFT#MOD | x y w - q=floor((xy+w)/2^z) r=(xy+w)-q*2^z | 34 | |
| A9B1tt | [tt+1] MULADDRSHIFTR#MOD | x y w - q=round((xy+w)/2^z) r=(xy+w)-q*2^z | 34 | |
| A9B2tt | [tt+1] MULADDRSHIFTC#MOD | x y w - q=ceil((xy+w)/2^z) r=(xy+w)-q*2^z | 34 | |
| A9B4tt | [tt+1] MULRSHIFT# | x y - floor(x*y/2^(tt+1)) | 34 | |
| A9B5tt | [tt+1] MULRSHIFTR# | x y - round(x*y/2^(tt+1)) | 34 | |
| A9B6tt | [tt+1] MULRSHIFTC# | x y - ceil(x*y/2^(tt+1)) | 34 | |
| A9B8tt | [tt+1] MULMODPOW2# | x y - x*y mod 2^(tt+1) | 34 | |
| A9B9tt | [tt+1] MULMODPOW2R# | x y - x*y mod 2^(tt+1) | 34 | |
| A9BAtt | [tt+1] MULMODPOW2C# | x y - x*y mod 2^(tt+1) | 34 | |
| A9BC | MULRSHIFT#MOD | x y - q=floor(x*y/2^(tt+1)) r=xy-q*2^(tt+1) | 34 | |
| A9BD | MULRSHIFTR#MOD | x y - q=round(x*y/2^(tt+1)) r=xy-q*2^(tt+1) | 34 | |
| A9BE | MULRSHIFTC#MOD | x y - q=ceil(x*y/2^(tt+1)) r=xy-q*2^(tt+1) | 34 | |
| A9C0 | LSHIFTADDDIVMOD | x w z y - q=floor((x*2^y+w)/z) r=(x*2^y+w)-zq | 26 | |
| A9C1 | LSHIFTADDDIVMODR | x w z y - q=round((x*2^y+w)/z) r=(x*2^y+w)-zq | 26 | |
| A9C2 | LSHIFTADDDIVMODC | x w z y - q=round((x*2^y+w)/z) r=(x*2^y+w)-zq | 26 | |
| A9C4 | LSHIFTDIV | x y z - floor(2^z*x/y) | 0 <= z <= 256 | 26 | 
| A9C5 | LSHIFTDIVR | x y z - round(2^z*x/y) | 0 <= z <= 256 | 26 | 
| A9C6 | LSHIFTDIVC | x y z - ceil(2^z*x/y) | 0 <= z <= 256 | 26 | 
| A9C8 | LSHIFTMOD | x y z - 2^z*x mod y | 26 | |
| A9C9 | LSHIFTMODR | x y z - 2^z*x mod y | 26 | |
| A9CA | LSHIFTMODC | x y z - 2^z*x mod y | 26 | |
| A9CC | LSHIFTDIVMOD | x y z - q=floor(2^z*x/y) r=2^z*x-q*y | 26 | |
| A9CD | LSHIFTDIVMODR | x y z - q=round(2^z*x/y) r=2^z*x-q*y | 26 | |
| A9CE | LSHIFTDIVMODC | x y z - q=ceil(2^z*x/y) r=2^z*x-q*y | 26 | |
| A9D0tt | [tt+1] LSHIFT#ADDDIVMOD | x w z - q=floor((x*2^y+w)/z) r=(x*2^y+w)-zq | 34 | |
| A9D1tt | [tt+1] LSHIFT#ADDDIVMODR | x w z - q=round((x*2^y+w)/z) r=(x*2^y+w)-zq | 34 | |
| A9D2tt | [tt+1] LSHIFT#ADDDIVMODC | x w z - q=ceil((x*2^y+w)/z) r=(x*2^y+w)-zq | 34 | |
| A9D4tt | [tt+1] LSHIFT#DIV | x y - floor(2^(tt+1)*x/y) | 34 | |
| A9D5tt | [tt+1] LSHIFT#DIVR | x y - round(2^(tt+1)*x/y) | 34 | |
| A9D6tt | [tt+1] LSHIFT#DIVC | x y - ceil(2^(tt+1)*x/y) | 26 | |
| A9D8tt | [tt+1] LSHIFT#MOD | x y - 2^(tt+1)*x mod y | 34 | |
| A9D9tt | [tt+1] LSHIFT#MODR | x y - 2^(tt+1)*x mod y | 34 | |
| A9DAtt | [tt+1] LSHIFT#MODC | x y - 2^(tt+1)*x mod y | 34 | |
| A9DCtt | [tt+1] LSHIFT#DIVMOD | x y - q=floor(2^(tt+1)*x/y) r=2^(tt+1)*x-q*y | 34 | |
| A9DDtt | [tt+1] LSHIFT#DIVMODR | x y - q=round(2^(tt+1)*x/y) r=2^(tt+1)*x-q*y | 34 | |
| A9DEtt | [tt+1] LSHIFT#DIVMODC | x y - q=ceil(2^(tt+1)*x/y) r=2^(tt+1)*x-q*y | 34 | |
| AAcc | [cc+1] LSHIFT# | x - x*2^(cc+1) | 0 <= cc <= 255 | 26 | 
| ABcc | [cc+1] RSHIFT# | x - floor(x/2^(cc+1)) | 0 <= cc <= 255 | 18 | 
| AC | LSHIFT | x y - x*2^y | 0 <= y <= 1023 | 18 | 
| AD | RSHIFT | x y - floor(x/2^y) | 0 <= y <= 1023 | 18 | 
| AE | POW2 | y - 2^y | 
 | 18 | 
| B0 | AND | x y - x&y | Bitwise and of two signed integers xandy, sign-extended to infinity. | 18 | 
| B1 | OR | x y - x|y | Bitwise or of two integers. | 18 | 
| B2 | XOR | x y - x xor y | Bitwise xor of two integers. | 18 | 
| B3 | NOT | x - ~x | Bitwise not of an integer. | 26 | 
| B4cc | [cc+1] FITS | x - x | Checks whether  | 26/76 | 
| B5cc | [cc+1] UFITS | x - x | Checks whether xis acc+1-bit unsigned integer for0 <= cc <= 255(i.e., whether0 <= x < 2^(cc+1)). | 26/76 | 
| B600 | FITSX | x c - x | Checks whether xis ac-bit signed integer for0 <= c <= 1023. | 26/76 | 
| B601 | UFITSX | x c - x | Checks whether xis ac-bit unsigned integer for0 <= c <= 1023. | 26/76 | 
| B602 | BITSIZE | x - c | Computes smallest c >= 0such thatxfits into ac-bit signed integer (-2^(c-1) <= c < 2^(c-1)). | 26 | 
| B603 | UBITSIZE | x - c | Computes smallest c >= 0such thatxfits into ac-bit unsigned integer (0 <= x < 2^c), or throws a range check exception. | 26 | 
| B608 | MIN | x y - x or y | Computes the minimum of two integers xandy. | 26 | 
| B609 | MAX | x y - x or y | Computes the maximum of two integers xandy. | 26 | 
| B60A | MINMAX
INTSORT2 | x y - x y or y x | Sorts two integers. Quiet version of this operation returns two NaNs if any of the arguments areNaNs. | 26 | 
| B60B | ABS | x - |x| | Computes the absolute value of an integer x. | 26 | 
| B7A0 | QADD | x y - x+y | 26 | |
| B7A1 | QSUB | x y - x-y | 26 | |
| B7A2 | QSUBR | x y - y-x | 26 | |
| B7A3 | QNEGATE | x - -x | 26 | |
| B7A4 | QINC | x - x+1 | 26 | |
| B7A5 | QDEC | x - x-1 | 26 | |
| B7A8 | QMUL | x y - x*y | 26 | |
| B7A900 | QADDDIVMOD | x w z - q=floor((x+w)/z) r=(x+w)-zq | 34 | |
| B7A901 | QADDDIVMODR | x w z - q=round((x+w)/z) r=(x+w)-zq | 34 | |
| B7A902 | QADDDIVMODC | x w y - q=ceil((x+w)/z) r=(x+w)-zq | 34 | |
| B7A904 | QDIV | x y - q | Division returns NaNify=0. | 34 | 
| B7A905 | QDIVR | x y - q' | 34 | |
| B7A906 | QDIVC | x y - q'' | 34 | |
| B7A908 | QMOD | x y - r | 34 | |
| B7A909 | QMODR | x y - r | 34 | |
| B7A90A | QMODC | x y - r | 34 | |
| B7A90C | QDIVMOD | x y - q r | 34 | |
| B7A90D | QDIVMODR | x y - q' r' | 34 | |
| B7A90E | QDIVMODC | x y - q'' r'' | 34 | |
| B7A920 | QADDRSHIFTMOD | x w z - q=floor((x+w)/2^z) r=(x+w)-q*2^z | 34 | |
| B7A921 | QADDRSHIFTMODR | x w z - q=round((x+w)/2^z) r=(x+w)-q*2^z | 34 | |
| B7A922 | QADDRSHIFTMODC | x w z - q=ceil((x+w)/2^z) r=(x+w)-q*2^z | 34 | |
| B7A925 | QRSHIFTR | x y - round(x/2^y) | 34 | |
| B7A926 | QRSHIFTC | x y - ceil(x/2^y) | 34 | |
| B7A928 | QMODPOW2 | x y - x mod 2^y | 34 | |
| B7A929 | QMODPOW2R | x y - x mod 2^y | 34 | |
| B7A92A | QMODPOW2C | x y - x mod 2^y | 34 | |
| B7A92C | QRSHIFTMOD | x y - q=floor(x/2^y) r=x-q*2^y | 34 | |
| B7A92D | QRSHIFTMODR | x y - q=round(x/2^y) r=x-q*2^y | 34 | |
| B7A92E | QRSHIFTMODC | x y - q=ceil(x/2^y) r=x-q*2^y | 34 | |
| B7A930tt | [tt+1] QADDRSHIFT#MOD | x w - q=floor((x+w)/2^(tt+1)) r=(x+w)-q*2^(tt+1) | 42 | |
| B7A931tt | [tt+1] QADDRSHIFTR#MOD | x w - q=round((x+w)/2^(tt+1)) r=(x+w)-q*2^(tt+1) | 42 | |
| B7A932tt | [tt+1] QADDRSHIFTC#MOD | x w - q=round((x+w)/2^(tt+1)) r=(x+w)-q*2^(tt+1) | 42 | |
| B7A935tt | [tt+1] QRSHIFTR# | x - round(x/2^(tt+1)) | 42 | |
| B7A936tt | [tt+1] QRSHIFTC# | x - ceil(x/2^(tt+1)) | 42 | |
| B7A938tt | [tt+1] QMODPOW2# | x - x mod 2^(tt+1) | 42 | |
| B7A939tt | [tt+1] QMODPOW2R# | x - x mod 2^(tt+1) | 42 | |
| B7A93Att | [tt+1] QMODPOW2C# | x - x mod 2^(tt+1) | 42 | |
| A93Ctt | [tt+1] QRSHIFT#MOD | x - q=floor(x/2^(tt+1)) r=x-q*2^(tt+1) | 42 | |
| A93Dtt | [tt+1] QRSHIFTR#MOD | x - q=round(x/2^(tt+1)) r=x-q*2^(tt+1) | 42 | |
| B7A93Ett | [tt+1] QRSHIFTC#MOD | x - q=ceil(x/2^(tt+1)) r=x-q*2^(tt+1) | 42 | |
| B7A980 | QMULADDDIVMOD | x y w z - q=floor((xy+w)/z) r=(xy+w)-zq | 34 | |
| B7A981 | QMULADDDIVMODR | x y w z - q=round((xy+w)/z) r=(xy+w)-zq | 34 | |
| B7A982 | QMULADDDIVMODC | x y w z - q=ceil((xy+w)/z) r=(xy+w)-zq | 34 | |
| B7A984 | QMULDIV | x y z - q | q=floor(x*y/z) | 34 | 
| B7A985 | QMULDIVR | x y z - q' | 34 | |
| B7A986 | QMULDIVC | x y z - q' | q'=ceil(x*y/z) | 34 | 
| B7A988 | QMULMOD | x y z - x*y mod z | 34 | |
| B7A989 | QMULMODR | x y z - x*y mod z | 34 | |
| B7A98A | QMULMODC | x y z - x*y mod z | 34 | |
| B7A98C | QMULDIVMOD | x y z - q r | 34 | |
| B7A98D | QMULDIVMODR | x y z - q r | q=round(x*y/z),r=x*y-z*q | 34 | 
| B7A98E | QMULDIVMODC | x y z - q r | q=ceil(x*y/z),r=x*y-z*q | 34 | 
| B7A9A0 | QMULADDRSHIFTMOD | x y w z - q=floor((xy+w)/2^z) r=(xy+w)-q*2^z | 34 | |
| B7A9A1 | QMULADDRSHIFTRMOD | x y w z - q=round((xy+w)/2^z) r=(xy+w)-q*2^z | 34 | |
| B7A9A2 | QMULADDRSHIFTCMOD | x y w z - q=ceil((xy+w)/2^z) r=(xy+w)-q*2^z | 34 | |
| B7A9A4 | QMULRSHIFT | x y z - floor(x*y/2^z) | 0 <= z <= 256 | 34 | 
| B7A9A5 | QMULRSHIFTR | x y z - round(x*y/2^z) | 0 <= z <= 256 | 34 | 
| B7A9A6 | QMULRSHIFTC | x y z - ceil(x*y/2^z) | 0 <= z <= 256 | 34 | 
| B7A9A8 | QMULMODPOW2_VAR | x y z - x*y mod 2^z | 34 | |
| B7A9A9 | QMULMODPOW2R_VAR | x y z - x*y mod 2^z | 34 | |
| B7A9AA | QMULMODPOW2C_VAR | x y z - x*y mod 2^z | 34 | |
| B7A9AC | QMULRSHIFTMOD_VAR | x y z - q=floor(x*y/2^z) r=xy-q*2^z | 34 | |
| B7A9AD | QMULRSHIFTRMOD_VAR | x y z - q=round(x*y/2^z) r=xy-q*2^z | 34 | |
| B7A9AE | QMULRSHIFTCMOD_VAR | x y z - q=ceil(x*y/2^z) r=xy-q*2^z | 34 | |
| B7A9B0tt | [tt+1] QMULADDRSHIFT#MOD | x y w - q=floor((xy+w)/2^z) r=(xy+w)-q*2^z | 42 | |
| B7A9B1tt | [tt+1] QMULADDRSHIFTR#MOD | x y w - q=round((xy+w)/2^z) r=(xy+w)-q*2^z | 42 | |
| B7A9B2tt | [tt+1] QMULADDRSHIFTC#MOD | x y w - q=ceil((xy+w)/2^z) r=(xy+w)-q*2^z | 42 | |
| B7A9B4tt | [tt+1] QMULRSHIFT# | x y - floor(x*y/2^(tt+1)) | 42 | |
| B7A9B5tt | [tt+1] QMULRSHIFTR# | x y - round(x*y/2^(tt+1)) | 42 | |
| B7A9B6tt | [tt+1] QMULRSHIFTC# | x y - ceil(x*y/2^(tt+1)) | 42 | |
| B7A9B8tt | [tt+1] QMULMODPOW2# | x y - x*y mod 2^(tt+1) | 42 | |
| B7A9B9tt | [tt+1] QMULMODPOW2R# | x y - x*y mod 2^(tt+1) | 42 | |
| B7A9BAtt | [tt+1] QMULMODPOW2C# | x y - x*y mod 2^(tt+1) | 42 | |
| B7A9BC | QMULRSHIFT#MOD | x y - q=floor(x*y/2^(tt+1)) r=xy-q*2^(tt+1) | 42 | |
| B7A9BD | QMULRSHIFTR#MOD | x y - q=round(x*y/2^(tt+1)) r=xy-q*2^(tt+1) | 42 | |
| B7A9BE | QMULRSHIFTC#MOD | x y - q=ceil(x*y/2^(tt+1)) r=xy-q*2^(tt+1) | 42 | |
| B7A9C0 | QLSHIFTADDDIVMOD | x w z y - q=floor((x*2^y+w)/z) r=(x*2^y+w)-zq | 34 | |
| B7A9C1 | QLSHIFTADDDIVMODR | x w z y - q=round((x*2^y+w)/z) r=(x*2^y+w)-zq | 34 | |
| B7A9C2 | QLSHIFTADDDIVMODC | x w z y - q=round((x*2^y+w)/z) r=(x*2^y+w)-zq | 34 | |
| B7A9C4 | QLSHIFTDIV | x y z - floor(2^z*x/y) | 0 <= z <= 256 | 34 | 
| B7A9C5 | QLSHIFTDIVR | x y z - round(2^z*x/y) | 0 <= z <= 256 | 34 | 
| B7A9C6 | QLSHIFTDIVC | x y z - ceil(2^z*x/y) | 0 <= z <= 256 | 34 | 
| B7A9C8 | QLSHIFTMOD | x y z - 2^z*x mod y | 34 | |
| B7A9C9 | QLSHIFTMODR | x y z - 2^z*x mod y | 34 | |
| B7A9CA | QLSHIFTMODC | x y z - 2^z*x mod y | 34 | |
| B7A9CC | QLSHIFTDIVMOD | x y z - q=floor(2^z*x/y) r=2^z*x-q*y | 34 | |
| B7A9CD | QLSHIFTDIVMODR | x y z - q=round(2^z*x/y) r=2^z*x-q*y | 34 | |
| B7A9CE | QLSHIFTDIVMODC | x y z - q=ceil(2^z*x/y) r=2^z*x-q*y | 34 | |
| B7A9D0tt | [tt+1] QLSHIFT#ADDDIVMOD | x w z - q=floor((x*2^(tt+1)+w)/z) r=(x*2^(tt+1)+w)-zq | 42 | |
| B7A9D1tt | [tt+1] QLSHIFT#ADDDIVMODR | x w z - q=round((x*2^(tt+1)+w)/z) r=(x*2^(tt+1)+w)-zq | 42 | |
| B7A9D2tt | [tt+1] QLSHIFT#ADDDIVMODC | x w z - q=ceil((x*2^(tt+1)+w)/z) r=(x*2^(tt+1)+w)-zq | 42 | |
| B7A9D4tt | [tt+1] QLSHIFT#DIV | x y - floor(2^(tt+1)*x/y) | 42 | |
| B7A9D5tt | [tt+1] QLSHIFT#DIVR | x y - round(2^(tt+1)*x/y) | 42 | |
| B7A9D6tt | [tt+1] QLSHIFT#DIVC | x y - ceil(2^(tt+1)*x/y) | 34 | |
| B7A9D8tt | [tt+1] QLSHIFT#MOD | x y - 2^(tt+1)*x mod y | 42 | |
| B7A9D9tt | [tt+1] LSHIFT#MODR | x y - 2^(tt+1)*x mod y | 42 | |
| B7A9DAtt | [tt+1] QLSHIFT#MODC | x y - 2^(tt+1)*x mod y | 42 | |
| B7A9DCtt | [tt+1] QLSHIFT#DIVMOD | x y - q=floor(2^(tt+1)*x/y) r=2^(tt+1)*x-q*y | 42 | |
| B7A9DDtt | [tt+1] QLSHIFT#DIVMODR | x y - q=round(2^(tt+1)*x/y) r=2^(tt+1)*x-q*y | 42 | |
| B7A9DEtt | [tt+1] QLSHIFT#DIVMODC | x y - q=ceil(2^(tt+1)*x/y) r=2^(tt+1)*x-q*y | 42 | |
| B7AAcc | [cc+1] QLSHIFT# | x - x*2^(cc+1) | 0 <= cc <= 255 | 34 | 
| B7ABcc | [cc+1] RSHIFT# | x - floor(x/2^(cc+1)) | 0 <= cc <= 255 | 26 | 
| B7AC | QLSHIFT | x y - x*2^y | 26 | |
| B7AD | QRSHIFT | x y - floor(x/2^y) | 26 | |
| B7AE | QPOW2 | y - 2^y | 26 | |
| B7B0 | QAND | x y - x&y | 26 | |
| B7B1 | QOR | x y - x|y | 26 | |
| B7B2 | QXOR | x y - x xor y | 26 | |
| B7B3 | QNOT | x - ~x | 26 | |
| B7B4cc | [cc+1] QFITS | x - x | Replaces xwith aNaNif x is not acc+1-bit signed integer, leaves it intact otherwise. | 34 | 
| B7B5cc | [cc+1] QUFITS | x - x | Replaces xwith aNaNif x is not acc+1-bit unsigned integer, leaves it intact otherwise. | 34 | 
| B7B600 | QFITSX | x c - x | Replaces xwith aNaNif x is not a c-bit signed integer, leaves it intact otherwise. | 34 | 
| B7B601 | QUFITSX | x c - x | Replaces xwith aNaNif x is not a c-bit unsigned integer, leaves it intact otherwise. | 34 | 
| B8 | SGN | x - sgn(x) | Computes the sign of an integer  | 18 | 
| B9 | LESS | x y - x<y | Returns -1ifx<y,0otherwise. | 18 | 
| BA | EQUAL | x y - x=y | Returns -1ifx=y,0otherwise. | 18 | 
| BB | LEQ | x y - x<=y | 18 | |
| BC | GREATER | x y - x>y | 18 | |
| BD | NEQ | x y - x!=y | Equivalent to EQUALNOT. | 18 | 
| BE | GEQ | x y - x>=y | Equivalent to LESSNOT. | 18 | 
| BF | CMP | x y - sgn(x-y) | Computes the sign of  | 18 | 
| C0yy | [yy] EQINT | x - x=yy | Returns  | 26 | 
| C1yy | [yy] LESSINT
[yy-1] LEQINT | x - x<yy | Returns  | 26 | 
| C2yy | [yy] GTINT
[yy+1] GEQINT | x - x>yy | Returns  | 26 | 
| C3yy | [yy] NEQINT | x - x!=yy | Returns  | 26 | 
| C4 | ISNAN | x - x=NaN | Checks whether xis aNaN. | 18 | 
| C5 | CHKNAN | x - x | Throws an arithmetic overflow exception if xis aNaN. | 18/68 | 
| C700 | SEMPTY | s - ? | Checks whether a Slice sis empty (i.e., contains no bits of data and no cell references). | 26 | 
| C701 | SDEMPTY | s - ? | Checks whether Slice shas no bits of data. | 26 | 
| C702 | SREMPTY | s - ? | Checks whether Slice shas no references. | 26 | 
| C703 | SDFIRST | s - ? | Checks whether the first bit of Slice sis a one. | 26 | 
| C704 | SDLEXCMP | s s' - x | Compares the data of slexicographically with the data ofs', returning-1, 0, or 1 depending on the result. | 26 | 
| C705 | SDEQ | s s' - ? | Checks whether the data parts of sands'coincide, equivalent toSDLEXCMPISZERO. | 26 | 
| C708 | SDPFX | s s' - ? | Checks whether sis a prefix ofs'. | 26 | 
| C709 | SDPFXREV | s s' - ? | Checks whether s'is a prefix ofs, equivalent toSWAPSDPFX. | 26 | 
| C70A | SDPPFX | s s' - ? | Checks whether sis a proper prefix ofs'(i.e., a prefix distinct froms'). | 26 | 
| C70B | SDPPFXREV | s s' - ? | Checks whether s'is a proper prefix ofs. | 26 | 
| C70C | SDSFX | s s' - ? | Checks whether sis a suffix ofs'. | 26 | 
| C70D | SDSFXREV | s s' - ? | Checks whether s'is a suffix ofs. | 26 | 
| C70E | SDPSFX | s s' - ? | Checks whether sis a proper suffix ofs'. | 26 | 
| C70F | SDPSFXREV | s s' - ? | Checks whether s'is a proper suffix ofs. | 26 | 
| C710 | SDCNTLEAD0 | s - n | Returns the number of leading zeroes in s. | 26 | 
| C711 | SDCNTLEAD1 | s - n | Returns the number of leading ones in s. | 26 | 
| C712 | SDCNTTRAIL0 | s - n | Returns the number of trailing zeroes in s. | 26 | 
| C713 | SDCNTTRAIL1 | s - n | Returns the number of trailing ones in s. | 26 | 
| C8 | NEWC | - b | Creates a new empty Builder. | 18 | 
| C9 | ENDC | b - c | Converts a Builder into an ordinary Cell. | 518 | 
| CAcc | [cc+1] STI | x b - b' | Stores a signed cc+1-bit integerxinto Builderbfor0 <= cc <= 255, throws a range check exception ifxdoes not fit intocc+1bits. | 26 | 
| CBcc | [cc+1] STU | x b - b' | Stores an unsigned cc+1-bit integerxinto Builderb. In all other respects it is similar toSTI. | 26 | 
| CC | STREF | c b - b' | Stores a reference to Cell cinto Builderb. | 18 | 
| CD | STBREFR
ENDCST | b b'' - b | Equivalent to ENDCSWAPSTREF. | 518 | 
| CE | STSLICE | s b - b' | Stores Slice sinto Builderb. | 18 | 
| CF00 | STIX | x b l - b' | Stores a signed l-bit integerxintobfor0 <= l <= 257. | 26 | 
| CF01 | STUX | x b l - b' | Stores an unsigned l-bit integerxintobfor0 <= l <= 256. | 26 | 
| CF02 | STIXR | b x l - b' | Similar to STIX, but with arguments in a different order. | 26 | 
| CF03 | STUXR | b x l - b' | Similar to STUX, but with arguments in a different order. | 26 | 
| CF04 | STIXQ | x b l - x b f or b' 0 | A quiet version of  | 26 | 
| CF05 | STUXQ | x b l - x b f or b' 0 | A quiet version of STUX. | 26 | 
| CF06 | STIXRQ | b x l - b x f or b' 0 | A quiet version of STIXR. | 26 | 
| CF07 | STUXRQ | b x l - b x f or b' 0 | A quiet version of STUXR. | 26 | 
| CF08cc | [cc+1] STI_l | x b - b' | A longer version of [cc+1] STI. | 34 | 
| CF09cc | [cc+1] STU_l | x b - b' | A longer version of [cc+1] STU. | 34 | 
| CF0Acc | [cc+1] STIR | b x - b' | Equivalent to SWAP[cc+1] STI. | 34 | 
| CF0Bcc | [cc+1] STUR | b x - b' | Equivalent to SWAP[cc+1] STU. | 34 | 
| CF0Ccc | [cc+1] STIQ | x b - x b f or b' 0 | A quiet version of STI. | 34 | 
| CF0Dcc | [cc+1] STUQ | x b - x b f or b' 0 | A quiet version of STU. | 34 | 
| CF0Ecc | [cc+1] STIRQ | b x - b x f or b' 0 | A quiet version of STIR. | 34 | 
| CF0Fcc | [cc+1] STURQ | b x - b x f or b' 0 | A quiet version of STUR. | 34 | 
| CF10 | STREF_l | c b - b' | A longer version of STREF. | 26 | 
| CF11 | STBREF | b' b - b'' | Equivalent to SWAPSTBREFR. | 526 | 
| CF12 | STSLICE_l | s b - b' | A longer version of STSLICE. | 26 | 
| CF13 | STB | b' b - b'' | Appends all data from Builder b'to Builderb. | 26 | 
| CF14 | STREFR | b c - b' | Equivalent to SWAPSTREF. | 26 | 
| CF15 | STBREFR_l | b b' - b'' | A longer encoding of STBREFR. | 526 | 
| CF16 | STSLICER | b s - b' | Equivalent to SWAPSTSLICE. | 26 | 
| CF17 | STBR
BCONCAT | b b' - b'' | Concatenates two builders.
Equivalent to  | 26 | 
| CF18 | STREFQ | c b - c b -1 or b' 0 | Quiet version of STREF. | 26 | 
| CF19 | STBREFQ | b' b - b' b -1 or b'' 0 | Quiet version of STBREF. | 526 | 
| CF1A | STSLICEQ | s b - s b -1 or b' 0 | Quiet version of STSLICE. | 26 | 
| CF1B | STBQ | b' b - b' b -1 or b'' 0 | Quiet version of STB. | 26 | 
| CF1C | STREFRQ | b c - b c -1 or b' 0 | Quiet version of STREFR. | 26 | 
| CF1D | STBREFRQ | b b' - b b' -1 or b'' 0 | Quiet version of STBREFR. | 526 | 
| CF1E | STSLICERQ | b s - b s -1 or b'' 0 | Quiet version of STSLICER. | 26 | 
| CF1F | STBRQ
BCONCATQ | b b' - b b' -1 or b'' 0 | Quiet version of STBR. | 26 | 
| CF20 | [ref] STREFCONST | b - b' | Equivalent to PUSHREFSTREFR. | 26 | 
| CF21 | [ref] [ref] STREF2CONST | b - b' | Equivalent to STREFCONSTSTREFCONST. | 26 | 
| CF23 | ENDXC | b x - c | If  | 526 | 
| CF28 | STILE4 | x b - b' | Stores a little-endian signed 32-bit integer. | 26 | 
| CF29 | STULE4 | x b - b' | Stores a little-endian unsigned 32-bit integer. | 26 | 
| CF2A | STILE8 | x b - b' | Stores a little-endian signed 64-bit integer. | 26 | 
| CF2B | STULE8 | x b - b' | Stores a little-endian unsigned 64-bit integer. | 26 | 
| CF30 | BDEPTH | b - x | Returns the depth of Builder b. If no cell references are stored inb, thenx=0; otherwisexis one plus the maximum of depths of cells referred to fromb. | 26 | 
| CF31 | BBITS | b - x | Returns the number of data bits already stored in Builder b. | 26 | 
| CF32 | BREFS | b - y | Returns the number of cell references already stored in b. | 26 | 
| CF33 | BBITREFS | b - x y | Returns the numbers of both data bits and cell references in b. | 26 | 
| CF35 | BREMBITS | b - x' | Returns the number of data bits that can still be stored in b. | 26 | 
| CF36 | BREMREFS | b - y' | Returns the number of references that can still be stored in b. | 26 | 
| CF37 | BREMBITREFS | b - x' y' | Returns the numbers of both data bits and references that can still be stored in b. | 26 | 
| CF38cc | [cc+1] BCHKBITS# | b - | Checks whether cc+1bits can be stored intob, where0 <= cc <= 255. | 34/84 | 
| CF39 | BCHKBITS | b x -  | Checks whether xbits can be stored intob,0 <= x <= 1023. If there is no space forxmore bits inb, or ifxis not within the range0...1023, throws an exception. | 26/76 | 
| CF3A | BCHKREFS | b y -  | Checks whether yreferences can be stored intob,0 <= y <= 7. | 26/76 | 
| CF3B | BCHKBITREFS | b x y -  | Checks whether xbits andyreferences can be stored intob,0 <= x <= 1023,0 <= y <= 7. | 26/76 | 
| CF3Ccc | [cc+1] BCHKBITSQ# | b - ? | Checks whether cc+1bits can be stored intob, where0 <= cc <= 255. | 34 | 
| CF3D | BCHKBITSQ | b x - ? | Checks whether xbits can be stored intob,0 <= x <= 1023. | 26 | 
| CF3E | BCHKREFSQ | b y - ? | Checks whether yreferences can be stored intob,0 <= y <= 7. | 26 | 
| CF3F | BCHKBITREFSQ | b x y - ? | Checks whether xbits andyreferences can be stored intob,0 <= x <= 1023,0 <= y <= 7. | 26 | 
| CF40 | STZEROES | b n - b' | Stores nbinary zeroes into Builderb. | 26 | 
| CF41 | STONES | b n - b' | Stores nbinary ones into Builderb. | 26 | 
| CF42 | STSAME | b n x - b' | Stores nbinaryxes (0 <= x <= 1) into Builderb. | 26 | 
| CFC0_xysss | [slice] STSLICECONST | b - b' | Stores a constant subslice  | 24 | 
| D0 | CTOS | c - s | Converts a Cell into a Slice. Notice that cmust be either an ordinary cell, or an exotic cell which is automatically loaded to yield an ordinary cellc', converted into a Slice afterwards. | 118/43 | 
| D1 | ENDS | s -  | Removes a Slice sfrom the stack, and throws an exception if it is not empty. | 18/68 | 
| D2cc | [cc+1] LDI | s - x s' | Loads (i.e., parses) a signed cc+1-bit integerxfrom Slices, and returns the remainder ofsass'. | 26 | 
| D3cc | [cc+1] LDU | s - x s' | Loads an unsigned cc+1-bit integerxfrom Slices. | 26 | 
| D4 | LDREF | s - c s' | Loads a cell reference cfroms. | 18 | 
| D5 | LDREFRTOS | s - s' s'' | Equivalent to LDREFSWAPCTOS. | 118/43 | 
| D6cc | [cc+1] LDSLICE | s - s'' s' | Cuts the next cc+1bits ofsinto a separate Slices''. | 26 | 
| D700 | LDIX | s l - x s' | Loads a signed l-bit (0 <= l <= 257) integerxfrom Slices, and returns the remainder ofsass'. | 26 | 
| D701 | LDUX | s l - x s' | Loads an unsigned l-bit integerxfrom (the firstlbits of)s, with0 <= l <= 256. | 26 | 
| D702 | PLDIX | s l - x | Preloads a signed l-bit integer from Slices, for0 <= l <= 257. | 26 | 
| D703 | PLDUX | s l - x | Preloads an unsigned l-bit integer froms, for0 <= l <= 256. | 26 | 
| D704 | LDIXQ | s l - x s' -1 or s 0 | Quiet version of LDIX: loads a signedl-bit integer fromssimilarly toLDIX, but returns a success flag, equal to-1on success or to0on failure (ifsdoes not havelbits), instead of throwing a cell underflow exception. | 26 | 
| D705 | LDUXQ | s l - x s' -1 or s 0 | Quiet version of LDUX. | 26 | 
| D706 | PLDIXQ | s l - x -1 or 0 | Quiet version of PLDIX. | 26 | 
| D707 | PLDUXQ | s l - x -1 or 0 | Quiet version of PLDUX. | 26 | 
| D708cc | [cc+1] LDI_l | s - x s' | A longer encoding for LDI. | 34 | 
| D709cc | [cc+1] LDU_l | s - x s' | A longer encoding for LDU. | 34 | 
| D70Acc | [cc+1] PLDI | s - x | Preloads a signed cc+1-bit integer from Slices. | 34 | 
| D70Bcc | [cc+1] PLDU | s - x | Preloads an unsigned cc+1-bit integer froms. | 34 | 
| D70Ccc | [cc+1] LDIQ | s - x s' -1 or s 0 | A quiet version of LDI. | 34 | 
| D70Dcc | [cc+1] LDUQ | s - x s' -1 or s 0 | A quiet version of LDU. | 34 | 
| D70Ecc | [cc+1] PLDIQ | s - x -1 or 0 | A quiet version of PLDI. | 34 | 
| D70Fcc | [cc+1] PLDUQ | s - x -1 or 0 | A quiet version of PLDU. | 34 | 
| D714_c | [32(c+1)] PLDUZ | s - s x | Preloads the first 32(c+1)bits of Slicesinto an unsigned integerx, for0 <= c <= 7. Ifsis shorter than necessary, missing bits are assumed to be zero. This operation is intended to be used along withIFBITJMPand similar instructions. | 26 | 
| D718 | LDSLICEX | s l - s'' s' | Loads the first 0 <= l <= 1023bits from Slicesinto a separate Slices'', returning the remainder ofsass'. | 26 | 
| D719 | PLDSLICEX | s l - s'' | Returns the first 0 <= l <= 1023bits ofsass''. | 26 | 
| D71A | LDSLICEXQ | s l - s'' s' -1 or s 0 | A quiet version of LDSLICEX. | 26 | 
| D71B | PLDSLICEXQ | s l - s' -1 or 0 | A quiet version of LDSLICEXQ. | 26 | 
| D71Ccc | [cc+1] LDSLICE_l | s - s'' s' | A longer encoding for LDSLICE. | 34 | 
| D71Dcc | [cc+1] PLDSLICE | s - s'' | Returns the first 0 < cc+1 <= 256bits ofsass''. | 34 | 
| D71Ecc | [cc+1] LDSLICEQ | s - s'' s' -1 or s 0 | A quiet version of LDSLICE. | 34 | 
| D71Fcc | [cc+1] PLDSLICEQ | s - s'' -1 or 0 | A quiet version of PLDSLICE. | 34 | 
| D720 | SDCUTFIRST | s l - s' | Returns the first 0 <= l <= 1023bits ofs. It is equivalent toPLDSLICEX. | 26 | 
| D721 | SDSKIPFIRST | s l - s' | Returns all but the first 0 <= l <= 1023bits ofs. It is equivalent toLDSLICEXNIP. | 26 | 
| D722 | SDCUTLAST | s l - s' | Returns the last 0 <= l <= 1023bits ofs. | 26 | 
| D723 | SDSKIPLAST | s l - s' | Returns all but the last 0 <= l <= 1023bits ofs. | 26 | 
| D724 | SDSUBSTR | s l l' - s' | Returns 0 <= l' <= 1023bits ofsstarting from offset0 <= l <= 1023, thus extracting a bit substring out of the data ofs. | 26 | 
| D726 | SDBEGINSX | s s' - s'' | Checks whether sbegins with (the data bits of)s', and removess'fromson success. On failure throws a cell deserialization exception. PrimitiveSDPFXREVcan be considered a quiet version ofSDBEGINSX. | 26 | 
| D727 | SDBEGINSXQ | s s' - s'' -1 or s 0 | A quiet version of SDBEGINSX. | 26 | 
| D72A_xsss | [slice] SDBEGINS | s - s'' | Checks whether sbegins with constant bitstringsssof length8x+3(with continuation bit assumed), where0 <= x <= 127, and removessssfromson success. | 31 | 
| D72E_xsss | [slice] SDBEGINSQ | s - s'' -1 or s 0 | A quiet version of SDBEGINS. | 31 | 
| D730 | SCUTFIRST | s l r - s' | Returns the first 0 <= l <= 1023bits and first0 <= r <= 4references ofs. | 26 | 
| D731 | SSKIPFIRST | s l r - s' | Returns all but the first lbits ofsandrreferences ofs. | 26 | 
| D732 | SCUTLAST | s l r - s' | Returns the last 0 <= l <= 1023data bits and last0 <= r <= 4references ofs. | 26 | 
| D733 | SSKIPLAST | s l r - s' | Returns all but the last lbits ofsandrreferences ofs. | 26 | 
| D734 | SUBSLICE | s l r l' r' - s' | Returns 0 <= l' <= 1023bits and0 <= r' <= 4references from Slices, after skipping the first0 <= l <= 1023bits and first0 <= r <= 4references. | 26 | 
| D736 | SPLIT | s l r - s' s'' | Splits the first 0 <= l <= 1023data bits and first0 <= r <= 4references fromsintos', returning the remainder ofsass''. | 26 | 
| D737 | SPLITQ | s l r - s' s'' -1 or s 0 | A quiet version of SPLIT. | 26 | 
| D739 | XCTOS | c - s ? | Transforms an ordinary or exotic cell into a Slice, as if it were an ordinary cell. A flag is returned indicating whether cis exotic. If that be the case, its type can later be deserialized from the first eight bits ofs. |  | 
| D73A | XLOAD | c - c' | Loads an exotic cell cand returns an ordinary cellc'. Ifcis already ordinary, does nothing. Ifccannot be loaded, throws an exception. |  | 
| D73B | XLOADQ | c - c' -1 or c 0 | Loads an exotic cell cand returns an ordinary cellc'. Ifcis already ordinary, does nothing. Ifccannot be loaded, returns 0. |  | 
| D741 | SCHKBITS | s l -  | Checks whether there are at least ldata bits in Slices. If this is not the case, throws a cell deserialisation (i.e., cell underflow) exception. | 26/76 | 
| D742 | SCHKREFS | s r -  | Checks whether there are at least rreferences in Slices. | 26/76 | 
| D743 | SCHKBITREFS | s l r -  | Checks whether there are at least ldata bits andrreferences in Slices. | 26/76 | 
| D745 | SCHKBITSQ | s l - ? | Checks whether there are at least ldata bits in Slices. | 26 | 
| D746 | SCHKREFSQ | s r - ? | Checks whether there are at least rreferences in Slices. | 26 | 
| D747 | SCHKBITREFSQ | s l r - ? | Checks whether there are at least ldata bits andrreferences in Slices. | 26 | 
| D748 | PLDREFVAR | s n - c | Returns the n-th cell reference of Slicesfor0 <= n <= 3. | 26 | 
| D749 | SBITS | s - l | Returns the number of data bits in Slice s. | 26 | 
| D74A | SREFS | s - r | Returns the number of references in Slice s. | 26 | 
| D74B | SBITREFS | s - l r | Returns both the number of data bits and the number of references in s. | 26 | 
| D74E_n | [n] PLDREFIDX | s - c | Returns the n-th cell reference of Slices, where0 <= n <= 3. | 26 | 
| D750 | LDILE4 | s - x s' | Loads a little-endian signed 32-bit integer. | 26 | 
| D751 | LDULE4 | s - x s' | Loads a little-endian unsigned 32-bit integer. | 26 | 
| D752 | LDILE8 | s - x s' | Loads a little-endian signed 64-bit integer. | 26 | 
| D753 | LDULE8 | s - x s' | Loads a little-endian unsigned 64-bit integer. | 26 | 
| D754 | PLDILE4 | s - x | Preloads a little-endian signed 32-bit integer. | 26 | 
| D755 | PLDULE4 | s - x | Preloads a little-endian unsigned 32-bit integer. | 26 | 
| D756 | PLDILE8 | s - x | Preloads a little-endian signed 64-bit integer. | 26 | 
| D757 | PLDULE8 | s - x | Preloads a little-endian unsigned 64-bit integer. | 26 | 
| D758 | LDILE4Q | s - x s' -1 or s 0 | Quietly loads a little-endian signed 32-bit integer. | 26 | 
| D759 | LDULE4Q | s - x s' -1 or s 0 | Quietly loads a little-endian unsigned 32-bit integer. | 26 | 
| D75A | LDILE8Q | s - x s' -1 or s 0 | Quietly loads a little-endian signed 64-bit integer. | 26 | 
| D75B | LDULE8Q | s - x s' -1 or s 0 | Quietly loads a little-endian unsigned 64-bit integer. | 26 | 
| D75C | PLDILE4Q | s - x -1 or 0 | Quietly preloads a little-endian signed 32-bit integer. | 26 | 
| D75D | PLDULE4Q | s - x -1 or 0 | Quietly preloads a little-endian unsigned 32-bit integer. | 26 | 
| D75E | PLDILE8Q | s - x -1 or 0 | Quietly preloads a little-endian signed 64-bit integer. | 26 | 
| D75F | PLDULE8Q | s - x -1 or 0 | Quietly preloads a little-endian unsigned 64-bit integer. | 26 | 
| D760 | LDZEROES | s - n s' | Returns the count nof leading zero bits ins, and removes these bits froms. | 26 | 
| D761 | LDONES | s - n s' | Returns the count nof leading one bits ins, and removes these bits froms. | 26 | 
| D762 | LDSAME | s x - n s' | Returns the count nof leading bits equal to0 <= x <= 1ins, and removes these bits froms. | 26 | 
| D764 | SDEPTH | s - x | Returns the depth of Slice s. Ifshas no references, thenx=0; otherwisexis one plus the maximum of depths of cells referred to froms. | 26 | 
| D765 | CDEPTH | c - x | Returns the depth of Cell c. Ifchas no references, thenx=0; otherwisexis one plus the maximum of depths of cells referred to fromc. Ifcis a Null instead of a Cell, returns zero. | 26 | 
| D766 | CLEVEL | cell - level | Returns level of the cell. | 26 | 
| D767 | CLEVELMASK | cell - level_mask | Returns level mask of the cell. | 26 | 
| D76A_ | [i] CHASHI | cell - hash | Returns ith hash of the cell. | 26 | 
| D76E_ | [i] CDEPTHI | cell - depth | Returns ith depth of the cell. | 26 | 
| D770 | CHASHIX | cell i - hash | Returns ith hash of the cell. | 26 | 
| D771 | CDEPTHIX | cell i - depth | Returns ith depth of the cell. | 26 | 
| D8 | EXECUTE
CALLX | c -  | Calls, or executes, continuation c. | 18 | 
| D9 | JMPX | c -  | Jumps, or transfers control, to continuation  | 18 | 
| DApr | [p] [r] CALLXARGS | c -  | Calls continuation  | 26 | 
| DB0p | [p] -1 CALLXARGS | c -  | Calls continuation cwith0 <= p <= 15parameters, expecting an arbitrary number of return values. | 26 | 
| DB1p | [p] JMPXARGS | c -  | Jumps to continuation c, passing only the top0 <= p <= 15values from the current stack to it (the remainder of the current stack is discarded). | 26 | 
| DB2r | [r] RETARGS |  | Returns to c0, with0 <= r <= 15return values taken from the current stack. | 26 | 
| DB30 | RET
RETTRUE |  | Returns to the continuation at  | 26 | 
| DB31 | RETALT
RETFALSE |  | Returns to the continuation at  | 26 | 
| DB32 | BRANCH
RETBOOL | f -  | Performs RETTRUEif integerf!=0, orRETFALSEiff=0. | 26 | 
| DB34 | CALLCC | c -  | Call with current continuation, transfers control to c, pushing the old value ofccintoc's stack (instead of discarding it or writing it into newc0). | 26 | 
| DB35 | JMPXDATA | c -  | Similar to CALLCC, but the remainder of the current continuation (the old value ofcc) is converted into a Slice before pushing it into the stack ofc. | 26 | 
| DB36pr | [p] [r] CALLCCARGS | c -  | Similar to CALLXARGS, but pushes the old value ofcc(along with the top0 <= p <= 15values from the original stack) into the stack of newly-invoked continuationc, settingcc.nargsto-1 <= r <= 14. | 34 | 
| DB38 | CALLXVARARGS | c p r -  | Similar to CALLXARGS, but takes-1 <= p,r <= 254from the stack. The next three operations also takepandrfrom the stack, both in the range-1...254. | 26 | 
| DB39 | RETVARARGS | p r -  | Similar to RETARGS. | 26 | 
| DB3A | JMPXVARARGS | c p r -  | Similar to JMPXARGS. | 26 | 
| DB3B | CALLCCVARARGS | c p r -  | Similar to CALLCCARGS. | 26 | 
| DB3C | [ref] CALLREF |  | Equivalent to PUSHREFCONTCALLX. | 126/51 | 
| DB3D | [ref] JMPREF |  | Equivalent to PUSHREFCONTJMPX. | 126/51 | 
| DB3E | [ref] JMPREFDATA |  | Equivalent to PUSHREFCONTJMPXDATA. | 126/51 | 
| DB3F | RETDATA |  | Equivalent to c0 PUSHCTRJMPXDATA. In this way, the remainder of the current continuation is converted into a Slice and returned to the caller. | 26 | 
| DB4fff | flags RUNVM | x_1 ... x_n n code [r] [c4] [c7] [g_l] [g_m] - x'_1 ... x'_m exitcode [data'] [c4'] [c5] [g_c] | Runs child VM with code codeand stackx_1...x_n. Returns the resulting stackx'_1...x'_mand exitcode. Other arguments and return values are enabled by flags. |  | 
| DB50 | RUNVMX | x_1 ... x_n n code [r] [c4] [c7] [g_l] [g_m] flags - x'_1 ... x'_m exitcode [data'] [c4'] [c5] [g_c] | Runs child VM with code codeand stackx_1...x_n. Returns the resulting stackx'_1...x'_mand exitcode. Other arguments and return values are enabled by flags. |  | 
| DC | IFRET
IFNOT: | f -  | Performs a RET, but only if integerfis non-zero. Iffis aNaN, throws an integer overflow exception. | 18 | 
| DD | IFNOTRET
IF: | f -  | Performs a RET, but only if integerfis zero. | 18 | 
| DE | IF | f c -  | Performs EXECUTEforc(i.e., executesc), but only if integerfis non-zero. Otherwise simply discards both values. | 18 | 
| DF | IFNOT | f c -  | Executes continuation c, but only if integerfis zero. Otherwise simply discards both values. | 18 | 
| E0 | IFJMP | f c -  | Jumps to c(similarly toJMPX), but only iffis non-zero. | 18 | 
| E1 | IFNOTJMP | f c -  | Jumps to c(similarly toJMPX), but only iffis zero. | 18 | 
| E2 | IFELSE | f c c' -  | If integer fis non-zero, executesc, otherwise executesc'. Equivalent toCONDSELCHKEXECUTE. | 18 | 
| E300 | [ref] IFREF | f -  | Equivalent to  | 26/126/51 | 
| E301 | [ref] IFNOTREF | f -  | Equivalent to PUSHREFCONTIFNOT. | 26/126/51 | 
| E302 | [ref] IFJMPREF | f -  | Equivalent to PUSHREFCONTIFJMP. | 26/126/51 | 
| E303 | [ref] IFNOTJMPREF | f -  | Equivalent to PUSHREFCONTIFNOTJMP. | 26/126/51 | 
| E304 | CONDSEL | f x y - x or y | If integer fis non-zero, returnsx, otherwise returnsy. Notice that no type checks are performed onxandy; as such, it is more like a conditional stack operation. Roughly equivalent toROTISZEROINCROLLXNIP. | 26 | 
| E305 | CONDSELCHK | f x y - x or y | Same as CONDSEL, but first checks whetherxandyhave the same type. | 26 | 
| E308 | IFRETALT | f - | Performs RETALTif integerf!=0. | 26 | 
| E309 | IFNOTRETALT | f - | Performs RETALTif integerf=0. | 26 | 
| E30D | [ref] IFREFELSE | f c - | Equivalent to PUSHREFCONTSWAPIFELSE, with the optimization that the cell reference is not actually loaded into a Slice and then converted into an ordinary Continuation iff=0. Similar remarks apply to the next two primitives: cells are converted into continuations only when necessary. | 26/126/51 | 
| E30E | [ref] IFELSEREF | f c - | Equivalent to PUSHREFCONTIFELSE. | 26/126/51 | 
| E30F | [ref] [ref] IFREFELSEREF | f - | Equivalent to PUSHREFCONTPUSHREFCONTIFELSE. | 126/51 | 
| E39_n | [n] IFBITJMP | x c - x | Checks whether bit 0 <= n <= 31is set in integerx, and if so, performsJMPXto continuationc. Valuexis left in the stack. | 26 | 
| E3B_n | [n] IFNBITJMP | x c - x | Jumps to cif bit0 <= n <= 31is not set in integerx. | 26 | 
| E3D_n | [ref] [n] IFBITJMPREF | x - x | Performs a JMPREFif bit0 <= n <= 31is set in integerx. | 126/51 | 
| E3F_n | [ref] [n] IFNBITJMPREF | x - x | Performs a JMPREFif bit0 <= n <= 31is not set in integerx. | 126/51 | 
| E4 | REPEAT | n c -  | Executes continuation  | 18 | 
| E5 | REPEATEND
REPEAT: | n -  | Similar to REPEAT, but it is applied to the current continuationcc. | 18 | 
| E6 | UNTIL | c -  | Executes continuation c, then pops an integerxfrom the resulting stack. Ifxis zero, performs another iteration of this loop. The actual implementation of this primitive involves an extraordinary continuationec_untilwith its arguments set to the body of the loop (continuationc) and the original current continuationcc. This extraordinary continuation is then saved into the savelist ofcasc.c0and the modifiedcis then executed. The other loop primitives are implemented similarly with the aid of suitable extraordinary continuations. | 18 | 
| E7 | UNTILEND
UNTIL: | - | Similar to UNTIL, but executes the current continuationccin a loop. When the loop exit condition is satisfied, performs aRET. | 18 | 
| E8 | WHILE | c' c -  | Executes c'and pops an integerxfrom the resulting stack. Ifxis zero, exists the loop and transfers control to the originalcc. Ifxis non-zero, executesc, and then begins a new iteration. | 18 | 
| E9 | WHILEEND | c' -  | Similar to WHILE, but uses the current continuationccas the loop body. | 18 | 
| EA | AGAIN | c -  | Similar to REPEAT, but executescinfinitely many times. ARETonly begins a new iteration of the infinite loop, which can be exited only by an exception, or aRETALT(or an explicitJMPX). | 18 | 
| EB | AGAINEND
AGAIN: | - | Similar to AGAIN, but performed with respect to the current continuationcc. | 18 | 
| E314 | REPEATBRK | n c - | Similar to REPEAT, but also setsc1to the originalccafter saving the old value ofc1into the savelist of the originalcc. In this wayRETALTcould be used to break out of the loop body. | 26 | 
| E315 | REPEATENDBRK | n - | Similar to REPEATEND, but also setsc1to the originalc0after saving the old value ofc1into the savelist of the originalc0. Equivalent toSAMEALTSAVEREPEATEND. | 26 | 
| E316 | UNTILBRK | c - | Similar to UNTIL, but also modifiesc1in the same way asREPEATBRK. | 26 | 
| E317 | UNTILENDBRK
UNTILBRK: | - | Equivalent to SAMEALTSAVEUNTILEND. | 26 | 
| E318 | WHILEBRK | c' c - | Similar to WHILE, but also modifiesc1in the same way asREPEATBRK. | 26 | 
| E319 | WHILEENDBRK | c - | Equivalent to SAMEALTSAVEWHILEEND. | 26 | 
| E31A | AGAINBRK | c - | Similar to AGAIN, but also modifiesc1in the same way asREPEATBRK. | 26 | 
| E31B | AGAINENDBRK
AGAINBRK: | - | Equivalent to SAMEALTSAVEAGAINEND. | 26 | 
| ECrn | [r] [n] SETCONTARGS | x_1 x_2...x_r c - c' | Pushes 0 <= r <= 15valuesx_1...x_rinto the stack of (a copy of) the continuationc, starting withx_1. Whennis 15 (-1 in Fift notation), does nothing withc.nargs. For0 <= n <= 14, setsc.nargsto the final size of the stack ofc'plusn. In other words, transformscinto a closure or a partially applied function, with0 <= n <= 14arguments missing. | 26+s'' | 
| ED0p | [p] RETURNARGS | - | Leaves only the top 0 <= p <= 15values in the current stack (somewhat similarly toONLYTOPX), with all the unused bottom values not discarded, but saved into continuationc0in the same way asSETCONTARGSdoes. | 26+s'' | 
| ED10 | RETURNVARARGS | p - | Similar to RETURNARGS, but with Integer0 <= p <= 255taken from the stack. | 26+s'' | 
| ED11 | SETCONTVARARGS | x_1 x_2...x_r c r n - c' | Similar to SETCONTARGS, but with0 <= r <= 255and-1 <= n <= 255taken from the stack. | 26+s'' | 
| ED12 | SETNUMVARARGS | c n - c' | 
 | 26 | 
| ED1E | BLESS | s - c | Transforms a Slice sinto a simple ordinary continuationc, withc.code=sand an empty stack and savelist. | 26 | 
| ED1F | BLESSVARARGS | x_1...x_r s r n - c | Equivalent to ROTBLESSROTREVSETCONTVARARGS. | 26+s'' | 
| EErn | [r] [n] BLESSARGS | x_1...x_r s - c | 
 | 26 | 
| ED4i | c[i] PUSHCTR
c[i] PUSH | - x | Pushes the current value of control register c(i). If the control register is not supported in the current codepage, or if it does not have a value, an exception is triggered. | 26 | 
| ED5i | c[i] POPCTR
c[i] POP | x -  | Pops a value xfrom the stack and stores it into control registerc(i), if supported in the current codepage. Notice that if a control register accepts only values of a specific type, a type-checking exception may occur. | 26 | 
| ED6i | c[i] SETCONT
c[i] SETCONTCTR | x c - c' | Stores xinto the savelist of continuationcasc(i), and returns the resulting continuationc'. Almost all operations with continuations may be expressed in terms ofSETCONTCTR,POPCTR, andPUSHCTR. | 26 | 
| ED7i | c[i] SETRETCTR | x -  | Equivalent to c0 PUSHCTRc[i] SETCONTCTRc0 POPCTR. | 26 | 
| ED8i | c[i] SETALTCTR | x -  | Equivalent to c1 PUSHCTRc[i] SETCONTCTRc1 POPCTR. | 26 | 
| ED9i | c[i] POPSAVE
c[i] POPCTRSAVE | x - | Similar to  | 26 | 
| EDAi | c[i] SAVE
c[i] SAVECTR |  | Saves the current value of c(i)into the savelist of continuationc0. If an entry forc[i]is already present in the savelist ofc0, nothing is done. Equivalent toc[i] PUSHCTRc[i] SETRETCTR. | 26 | 
| EDBi | c[i] SAVEALT
c[i] SAVEALTCTR |  | Similar to c[i] SAVE, but saves the current value ofc[i]into the savelist ofc1, notc0. | 26 | 
| EDCi | c[i] SAVEBOTH
c[i] SAVEBOTHCTR |  | Equivalent to c[i] SAVEc[i] SAVEALT. | 26 | 
| EDE0 | PUSHCTRX | i - x | Similar to  | 26 | 
| EDE1 | POPCTRX | x i -  | Similar to c[i] POPCTR, but with0 <= i <= 255from the stack. | 26 | 
| EDE2 | SETCONTCTRX | x c i - c' | Similar to c[i] SETCONTCTR, but with0 <= i <= 255from the stack. | 26 | 
| EDF0 | COMPOS
BOOLAND | c c' - c'' | Computes the composition compose0(c, c'), which has the meaning of ''performc, and, if successful, performc''' (ifcis a boolean circuit) or simply ''performc, thenc'''. Equivalent toSWAPc0 SETCONT. | 26 | 
| EDF1 | COMPOSALT
BOOLOR | c c' - c'' | Computes the alternative composition compose1(c, c'), which has the meaning of ''performc, and, if not successful, performc''' (ifcis a boolean circuit). Equivalent toSWAPc1 SETCONT. | 26 | 
| EDF2 | COMPOSBOTH | c c' - c'' | Computes composition compose1(compose0(c, c'), c'), which has the meaning of ''compute boolean circuitc, then computec', regardless of the result ofc''. | 26 | 
| EDF3 | ATEXIT | c -  | Sets c0tocompose0(c, c0). In other words,cwill be executed before exiting current subroutine. | 26 | 
| EDF4 | ATEXITALT | c -  | Sets c1tocompose1(c, c1). In other words,cwill be executed before exiting current subroutine by its alternative return path. | 26 | 
| EDF5 | SETEXITALT | c -  | Sets  | 26 | 
| EDF6 | THENRET | c - c' | Computes compose0(c, c0). | 26 | 
| EDF7 | THENRETALT | c - c' | Computes compose0(c, c1) | 26 | 
| EDF8 | INVERT | - | Interchanges c0andc1. | 26 | 
| EDF9 | BOOLEVAL | c - ? | Performs cc:=compose1(compose0(c, compose0(-1 PUSHINT, cc)), compose0(0 PUSHINT, cc)). Ifcrepresents a boolean circuit, the net effect is to evaluate it and push either-1or0into the stack before continuing. | 26 | 
| EDFA | SAMEALT | - | Sets c1toc0. Equivalent toc0 PUSHCTRc1 POPCTR. | 26 | 
| EDFB | SAMEALTSAVE | - | Sets  | 26 | 
| F0nn | [nn] CALL
[nn] CALLDICT | - nn | Calls the continuation in  |  | 
| F12_n | [n] CALL
[n] CALLDICT | - n | For 0 <= n < 2^14, an encoding of[n] CALLfor larger values ofn. |  | 
| F16_n | [n] JMP |  - n | Jumps to the continuation in  |  | 
| F1A_n | [n] PREPARE
[n] PREPAREDICT |  - n c | Equivalent to  |  | 
| F22_n | [n] THROW |  - 0 n | Throws exception  | 76 | 
| F26_n | [n] THROWIF | f -  | Throws exception 0 <= n <= 63with  parameter zero only if integerf!=0. | 26/76 | 
| F2A_n | [n] THROWIFNOT | f -  | Throws exception 0 <= n <= 63with parameter zero only if integerf=0. | 26/76 | 
| F2C4_n | [n] THROW | - 0 nn | For 0 <= n < 2^11, an encoding of[n] THROWfor larger values ofn. | 84 | 
| F2CC_n | [n] THROWARG | x - x nn | Throws exception 0 <= n <  2^11with parameterx, by copyingxandninto the stack ofc2and transferring control toc2. | 84 | 
| F2D4_n | [n] THROWIF | f -  | For 0 <= n < 2^11, an encoding of[n] THROWIFfor larger values ofn. | 34/84 | 
| F2DC_n | [n] THROWARGIF | x f -  | Throws exception 0 <= nn < 2^11with parameterxonly if integerf!=0. | 34/84 | 
| F2E4_n | [n] THROWIFNOT | f -  | For 0 <= n < 2^11, an encoding of[n] THROWIFNOTfor larger values ofn. | 34/84 | 
| F2EC_n | [n] THROWARGIFNOT | x f -  | Throws exception 0 <= n < 2^11with parameterxonly if integerf=0. | 34/84 | 
| F2F0 | THROWANY | n - 0 n | Throws exception  | 76 | 
| F2F1 | THROWARGANY | x n - x n | Throws exception  | 76 | 
| F2F2 | THROWANYIF | n f -  | Throws exception 0 <= n < 2^16with parameter zero only iff!=0. | 26/76 | 
| F2F3 | THROWARGANYIF | x n f -  | Throws exception 0 <= n<2^16with parameterxonly iff!=0. | 26/76 | 
| F2F4 | THROWANYIFNOT | n f -  | Throws exception 0 <= n<2^16with parameter zero only iff=0. | 26/76 | 
| F2F5 | THROWARGANYIFNOT | x n f -  | Throws exception 0 <= n<2^16with parameterxonly iff=0. | 26/76 | 
| F2FF | TRY | c c' -  | Sets c2toc', first saving the old value ofc2both into the savelist ofc'and into the savelist of the current continuation, which is stored intoc.c0andc'.c0. Then runscsimilarly toEXECUTE. Ifcdoes not throw any exceptions, the original value ofc2is automatically restored on return fromc. If an exception occurs, the execution is transferred toc', but the original value ofc2is restored in the process, so thatc'can re-throw the exception byTHROWANYif it cannot handle it by itself. | 26 | 
| F3pr | [p] [r] TRYARGS | c c' -  | Similar to  | 26 | 
| F400 | STDICT
STOPTREF | D b - b' | Stores dictionary  | 26 | 
| F401 | SKIPDICT
SKIPOPTREF | s - s' | Equivalent to LDDICTNIP. | 26 | 
| F402 | LDDICTS | s - s' s'' | Loads (parses) a (Slice-represented) dictionary  | 26 | 
| F403 | PLDDICTS | s - s' | Preloads a (Slice-represented) dictionary  | 26 | 
| F404 | LDDICT
LDOPTREF | s - D s' | Loads (parses) a dictionary Dfrom Slices, and returns the remainder ofsass'. May be applied to dictionaries or to values of arbitrary(^Y)?types. | 26 | 
| F405 | PLDDICT
PLDOPTREF | s - D | Preloads a dictionary  | 26 | 
| F406 | LDDICTQ | s - D s' -1 or s 0 | A quiet version of LDDICT. | 26 | 
| F407 | PLDDICTQ | s - D -1 or 0 | A quiet version of PLDDICT. | 26 | 
| F40A | DICTGET | k D n - x -1 or 0 | Looks up key  |  | 
| F40B | DICTGETREF | k D n - c -1 or 0 | Similar to  |  | 
| F40C | DICTIGET | i D n - x -1 or 0 | Similar to DICTGET, but with a signed (big-endian)n-bit Integerias a key. Ifidoes not fit intonbits, returns0. Ifiis aNaN, throws an integer overflow exception. |  | 
| F40D | DICTIGETREF | i D n - c -1 or 0 | Combines DICTIGETwithDICTGETREF: it uses signedn-bit Integerias a key and returns a Cell instead of a Slice on success. |  | 
| F40E | DICTUGET | i D n - x -1 or 0 | Similar to DICTIGET, but with unsigned (big-endian)n-bit Integeriused as a key. |  | 
| F40F | DICTUGETREF | i D n - c -1 or 0 | Similar to DICTIGETREF, but with an unsignedn-bit Integer keyi. |  | 
| F412 | DICTSET | x k D n - D' | Sets the value associated with n-bit keyk(represented by a Slice as inDICTGET) in dictionaryD(also represented by a Slice) to valuex(again a Slice), and returns the resulting dictionary asD'. |  | 
| F413 | DICTSETREF | c k D n - D' | Similar to DICTSET, but with the value set to a reference to Cellc. |  | 
| F414 | DICTISET | x i D n - D' | Similar to DICTSET, but with the key represented by a (big-endian) signedn-bit integeri. Ifidoes not fit intonbits, a range check exception is generated. |  | 
| F415 | DICTISETREF | c i D n - D' | Similar to DICTSETREF, but with the key a signedn-bit integer as inDICTISET. |  | 
| F416 | DICTUSET | x i D n - D' | Similar to DICTISET, but withian unsignedn-bit integer. |  | 
| F417 | DICTUSETREF | c i D n - D' | Similar to DICTISETREF, but withiunsigned. |  | 
| F41A | DICTSETGET | x k D n - D' y -1 or D' 0 | Combines DICTSETwithDICTGET: it sets the value corresponding to keyktox, but also returns the old valueyassociated with the key in question, if present. |  | 
| F41B | DICTSETGETREF | c k D n - D' c' -1 or D' 0 | Combines DICTSETREFwithDICTGETREFsimilarly toDICTSETGET. |  | 
| F41C | DICTISETGET | x i D n - D' y -1 or D' 0 | DICTISETGET, but withia signedn-bit integer. |  | 
| F41D | DICTISETGETREF | c i D n - D' c' -1 or D' 0 | DICTISETGETREF, but withia signedn-bit integer. |  | 
| F41E | DICTUSETGET | x i D n - D' y -1 or D' 0 | DICTISETGET, but withian unsignedn-bit integer. |  | 
| F41F | DICTUSETGETREF | c i D n - D' c' -1 or D' 0 | DICTISETGETREF, but withian unsignedn-bit integer. |  | 
| F422 | DICTREPLACE | x k D n - D' -1 or D 0 | A Replace operation, which is similar to DICTSET, but sets the value of keykin dictionaryDtoxonly if the keykwas already present inD. |  | 
| F423 | DICTREPLACEREF | c k D n - D' -1 or D 0 | A Replace counterpart of DICTSETREF. |  | 
| F424 | DICTIREPLACE | x i D n - D' -1 or D 0 | DICTREPLACE, but withia signedn-bit integer. |  | 
| F425 | DICTIREPLACEREF | c i D n - D' -1 or D 0 | DICTREPLACEREF, but withia signedn-bit integer. |  | 
| F426 | DICTUREPLACE | x i D n - D' -1 or D 0 | DICTREPLACE, but withian unsignedn-bit integer. |  | 
| F427 | DICTUREPLACEREF | c i D n - D' -1 or D 0 | DICTREPLACEREF, but withian unsignedn-bit integer. |  | 
| F42A | DICTREPLACEGET | x k D n - D' y -1 or D 0 | A Replace counterpart of DICTSETGET: on success, also returns the old value associated with the key in question. |  | 
| F42B | DICTREPLACEGETREF | c k D n - D' c' -1 or D 0 | A Replace counterpart of DICTSETGETREF. |  | 
| F42C | DICTIREPLACEGET | x i D n - D' y -1 or D 0 | DICTREPLACEGET, but withia signedn-bit integer. |  | 
| F42D | DICTIREPLACEGETREF | c i D n - D' c' -1 or D 0 | DICTREPLACEGETREF, but withia signedn-bit integer. |  | 
| F42E | DICTUREPLACEGET | x i D n - D' y -1 or D 0 | DICTREPLACEGET, but withian unsignedn-bit integer. |  | 
| F42F | DICTUREPLACEGETREF | c i D n - D' c' -1 or D 0 | DICTREPLACEGETREF, but withian unsignedn-bit integer. |  | 
| F432 | DICTADD | x k D n - D' -1 or D 0 | An Add counterpart of DICTSET: sets the value associated with keykin dictionaryDtox, but only if it is not already present inD. |  | 
| F433 | DICTADDREF | c k D n - D' -1 or D 0 | An Add counterpart of DICTSETREF. |  | 
| F434 | DICTIADD | x i D n - D' -1 or D 0 | DICTADD, but withia signedn-bit integer. |  | 
| F435 | DICTIADDREF | c i D n - D' -1 or D 0 | DICTADDREF, but withia signedn-bit integer. |  | 
| F436 | DICTUADD | x i D n - D' -1 or D 0 | DICTADD, but withian unsignedn-bit integer. |  | 
| F437 | DICTUADDREF | c i D n - D' -1 or D 0 | DICTADDREF, but withian unsignedn-bit integer. |  | 
| F43A | DICTADDGET | x k D n - D' -1 or D y 0 | An Add counterpart of DICTSETGET: sets the value associated with keykin dictionaryDtox, but only if keykis not already present inD. Otherwise, just returns the old valueywithout changing the dictionary. |  | 
| F43B | DICTADDGETREF | c k D n - D' -1 or D c' 0 | An Add counterpart of DICTSETGETREF. |  | 
| F43C | DICTIADDGET | x i D n - D' -1 or D y 0 | DICTADDGET, but withia signedn-bit integer. |  | 
| F43D | DICTIADDGETREF | c i D n - D' -1 or D c' 0 | DICTADDGETREF, but withia signedn-bit integer. |  | 
| F43E | DICTUADDGET | x i D n - D' -1 or D y 0 | DICTADDGET, but withian unsignedn-bit integer. |  | 
| F43F | DICTUADDGETREF | c i D n - D' -1 or D c' 0 | DICTADDGETREF, but withian unsignedn-bit integer. |  | 
| F441 | DICTSETB | b k D n - D' |  | |
| F442 | DICTISETB | b i D n - D' |  | |
| F443 | DICTUSETB | b i D n - D' |  | |
| F445 | DICTSETGETB | b k D n - D' y -1 or D' 0 |  | |
| F446 | DICTISETGETB | b i D n - D' y -1 or D' 0 |  | |
| F447 | DICTUSETGETB | b i D n - D' y -1 or D' 0 |  | |
| F449 | DICTREPLACEB | b k D n - D' -1 or D 0 |  | |
| F44A | DICTIREPLACEB | b i D n - D' -1 or D 0 |  | |
| F44B | DICTUREPLACEB | b i D n - D' -1 or D 0 |  | |
| F44D | DICTREPLACEGETB | b k D n - D' y -1 or D 0 |  | |
| F44E | DICTIREPLACEGETB | b i D n - D' y -1 or D 0 |  | |
| F44F | DICTUREPLACEGETB | b i D n - D' y -1 or D 0 |  | |
| F451 | DICTADDB | b k D n - D' -1 or D 0 |  | |
| F452 | DICTIADDB | b i D n - D' -1 or D 0 |  | |
| F453 | DICTUADDB | b i D n - D' -1 or D 0 |  | |
| F455 | DICTADDGETB | b k D n - D' -1 or D y 0 |  | |
| F456 | DICTIADDGETB | b i D n - D' -1 or D y 0 |  | |
| F457 | DICTUADDGETB | b i D n - D' -1 or D y 0 |  | |
| F459 | DICTDEL | k D n - D' -1 or D 0 | Deletes n-bit key, represented by a Slicek, from dictionaryD. If the key is present, returns the modified dictionaryD'and the success flag-1. Otherwise, returns the original dictionaryDand0. |  | 
| F45A | DICTIDEL | i D n - D' ? | A version of DICTDELwith the key represented by a signedn-bit Integeri. Ifidoes not fit intonbits, simply returnsD0(''key not found, dictionary unmodified''). |  | 
| F45B | DICTUDEL | i D n - D' ? | Similar to DICTIDEL, but withian unsignedn-bit integer. |  | 
| F462 | DICTDELGET | k D n - D' x -1 or D 0 | Deletes n-bit key, represented by a Slicek, from dictionaryD. If the key is present, returns the modified dictionaryD', the original valuexassociated with the keyk(represented by a Slice), and the success flag-1. Otherwise, returns the original dictionaryDand0. |  | 
| F463 | DICTDELGETREF | k D n - D' c -1 or D 0 | Similar to DICTDELGET, but withLDREFENDSapplied toxon success, so that the value returnedcis a Cell. |  | 
| F464 | DICTIDELGET | i D n - D' x -1 or D 0 | DICTDELGET, but withia signedn-bit integer. |  | 
| F465 | DICTIDELGETREF | i D n - D' c -1 or D 0 | DICTDELGETREF, but withia signedn-bit integer. |  | 
| F466 | DICTUDELGET | i D n - D' x -1 or D 0 | DICTDELGET, but withian unsignedn-bit integer. |  | 
| F467 | DICTUDELGETREF | i D n - D' c -1 or D 0 | DICTDELGETREF, but withian unsignedn-bit integer. |  | 
| F469 | DICTGETOPTREF | k D n - c^? | A variant of DICTGETREFthat returns Null instead of the valuec^?if the keykis absent from dictionaryD. |  | 
| F46A | DICTIGETOPTREF | i D n - c^? | DICTGETOPTREF, but withia signedn-bit integer. If the keyiis out of range, also returns Null. |  | 
| F46B | DICTUGETOPTREF | i D n - c^? | DICTGETOPTREF, but withian unsignedn-bit integer. If the keyiis out of range, also returns Null. |  | 
| F46D | DICTSETGETOPTREF | c^? k D n - D' ~c^? | A variant of both DICTGETOPTREFandDICTSETGETREFthat sets the value corresponding to keykin dictionaryDtoc^?(ifc^?is Null, then the key is deleted instead), and returns the old value~c^?(if the keykwas absent before, returns Null instead). |  | 
| F46E | DICTISETGETOPTREF | c^? i D n - D' ~c^? | Similar to primitive DICTSETGETOPTREF, but using signedn-bit Integerias a key. Ifidoes not fit intonbits, throws a range checking exception. |  | 
| F46F | DICTUSETGETOPTREF | c^? i D n - D' ~c^? | Similar to primitive DICTSETGETOPTREF, but using unsignedn-bit Integerias a key. |  | 
| F470 | PFXDICTSET | x k D n - D' -1 or D 0 |  | |
| F471 | PFXDICTREPLACE | x k D n - D' -1 or D 0 |  | |
| F472 | PFXDICTADD | x k D n - D' -1 or D 0 |  | |
| F473 | PFXDICTDEL | k D n - D' -1 or D 0 |  | |
| F474 | DICTGETNEXT | k D n - x' k' -1 or 0 | Computes the minimal key k'in dictionaryDthat is lexicographically greater thank, and returnsk'(represented by a Slice) along with associated valuex'(also represented by a Slice). |  | 
| F475 | DICTGETNEXTEQ | k D n - x' k' -1 or 0 | Similar to DICTGETNEXT, but computes the minimal keyk'that is lexicographically greater than or equal tok. |  | 
| F476 | DICTGETPREV | k D n - x' k' -1 or 0 | Similar to DICTGETNEXT, but computes the maximal keyk'lexicographically smaller thank. |  | 
| F477 | DICTGETPREVEQ | k D n - x' k' -1 or 0 | Similar to DICTGETPREV, but computes the maximal keyk'lexicographically smaller than or equal tok. |  | 
| F478 | DICTIGETNEXT | i D n - x' i' -1 or 0 | Similar to DICTGETNEXT, but interprets all keys in dictionaryDas big-endian signedn-bit integers, and computes the minimal keyi'that is larger than Integeri(which does not necessarily fit intonbits). |  | 
| F479 | DICTIGETNEXTEQ | i D n - x' i' -1 or 0 | Similar to DICTGETNEXTEQ, but interprets keys as signedn-bit integers. |  | 
| F47A | DICTIGETPREV | i D n - x' i' -1 or 0 | Similar to DICTGETPREV, but interprets keys as signedn-bit integers. |  | 
| F47B | DICTIGETPREVEQ | i D n - x' i' -1 or 0 | Similar to DICTGETPREVEQ, but interprets keys as signedn-bit integers. |  | 
| F47C | DICTUGETNEXT | i D n - x' i' -1 or 0 | Similar to DICTGETNEXT, but interprets all keys in dictionaryDas big-endian unsignedn-bit integers, and computes the minimal keyi'that is larger than Integeri(which does not necessarily fit intonbits, and is not necessarily non-negative). |  | 
| F47D | DICTUGETNEXTEQ | i D n - x' i' -1 or 0 | Similar to DICTGETNEXTEQ, but interprets keys as unsignedn-bit integers. |  | 
| F47E | DICTUGETPREV | i D n - x' i' -1 or 0 | Similar to DICTGETPREV, but interprets keys as unsignedn-bit integers. |  | 
| F47F | DICTUGETPREVEQ | i D n - x' i' -1 or 0 | Similar to DICTGETPREVEQ, but interprets keys a unsignedn-bit integers. |  | 
| F482 | DICTMIN | D n - x k -1 or 0 | Computes the minimal key k(represented by a Slice withndata bits) in dictionaryD, and returnskalong with the associated valuex. |  | 
| F483 | DICTMINREF | D n - c k -1 or 0 | Similar to DICTMIN, but returns the only reference in the value as a Cellc. |  | 
| F484 | DICTIMIN | D n - x i -1 or 0 | Similar to DICTMIN, but computes the minimal keyiunder the assumption that all keys are big-endian signedn-bit integers. Notice that the key and value returned may differ from those computed byDICTMINandDICTUMIN. |  | 
| F485 | DICTIMINREF | D n - c i -1 or 0 | Similar to DICTIMIN, but returns the only reference in the value. |  | 
| F486 | DICTUMIN | D n - x i -1 or 0 | Similar to DICTMIN, but returns the key as an unsignedn-bit Integeri. |  | 
| F487 | DICTUMINREF | D n - c i -1 or 0 | Similar to DICTUMIN, but returns the only reference in the value. |  | 
| F48A | DICTMAX | D n - x k -1 or 0 | Computes the maximal key k(represented by a Slice withndata bits) in dictionaryD, and returnskalong with the associated valuex. |  | 
| F48B | DICTMAXREF | D n - c k -1 or 0 | Similar to DICTMAX, but returns the only reference in the value. |  | 
| F48C | DICTIMAX | D n - x i -1 or 0 | Similar to DICTMAX, but computes the maximal keyiunder the assumption that all keys are big-endian signedn-bit integers. Notice that the key and value returned may differ from those computed byDICTMAXandDICTUMAX. |  | 
| F48D | DICTIMAXREF | D n - c i -1 or 0 | Similar to DICTIMAX, but returns the only reference in the value. |  | 
| F48E | DICTUMAX | D n - x i -1 or 0 | Similar to DICTMAX, but returns the key as an unsignedn-bit Integeri. |  | 
| F48F | DICTUMAXREF | D n - c i -1 or 0 | Similar to DICTUMAX, but returns the only reference in the value. |  | 
| F492 | DICTREMMIN | D n - D' x k -1 or D 0 | Computes the minimal key k(represented by a Slice withndata bits) in dictionaryD, removeskfrom the dictionary, and returnskalong with the associated valuexand the modified dictionaryD'. |  | 
| F493 | DICTREMMINREF | D n - D' c k -1 or D 0 | Similar to DICTREMMIN, but returns the only reference in the value as a Cellc. |  | 
| F494 | DICTIREMMIN | D n - D' x i -1 or D 0 | Similar to DICTREMMIN, but computes the minimal keyiunder the assumption that all keys are big-endian signedn-bit integers. Notice that the key and value returned may differ from those computed byDICTREMMINandDICTUREMMIN. |  | 
| F495 | DICTIREMMINREF | D n - D' c i -1 or D 0 | Similar to DICTIREMMIN, but returns the only reference in the value. |  | 
| F496 | DICTUREMMIN | D n - D' x i -1 or D 0 | Similar to DICTREMMIN, but returns the key as an unsignedn-bit Integeri. |  | 
| F497 | DICTUREMMINREF | D n - D' c i -1 or D 0 | Similar to DICTUREMMIN, but returns the only reference in the value. |  | 
| F49A | DICTREMMAX | D n - D' x k -1 or D 0 | Computes the maximal key k(represented by a Slice withndata bits) in dictionaryD, removeskfrom the dictionary, and returnskalong with the associated valuexand the modified dictionaryD'. |  | 
| F49B | DICTREMMAXREF | D n - D' c k -1 or D 0 | Similar to DICTREMMAX, but returns the only reference in the value as a Cellc. |  | 
| F49C | DICTIREMMAX | D n - D' x i -1 or D 0 | Similar to DICTREMMAX, but computes the minimal keyiunder the assumption that all keys are big-endian signedn-bit integers. Notice that the key and value returned may differ from those computed byDICTREMMAXandDICTUREMMAX. |  | 
| F49D | DICTIREMMAXREF | D n - D' c i -1 or D 0 | Similar to DICTIREMMAX, but returns the only reference in the value. |  | 
| F49E | DICTUREMMAX | D n - D' x i -1 or D 0 | Similar to DICTREMMAX, but returns the key as an unsignedn-bit Integeri. |  | 
| F49F | DICTUREMMAXREF | D n - D' c i -1 or D 0 | Similar to DICTUREMMAX, but returns the only reference in the value. |  | 
| F4A0 | DICTIGETJMP | i D n -  | Similar to DICTIGET, but withxBLESSed into a continuation with a subsequentJMPXto it on success. On failure, does nothing. This is useful for implementingswitch/caseconstructions. |  | 
| F4A1 | DICTUGETJMP | i D n -  | Similar to DICTIGETJMP, but performsDICTUGETinstead ofDICTIGET. |  | 
| F4A2 | DICTIGETEXEC | i D n -  | Similar to DICTIGETJMP, but withEXECUTEinstead ofJMPX. |  | 
| F4A3 | DICTUGETEXEC | i D n -  | Similar to DICTUGETJMP, but withEXECUTEinstead ofJMPX. |  | 
| F4A6_n | [ref] [n] DICTPUSHCONST |  - D n | Pushes a non-empty constant dictionary D(as aCell^?) along with its key length0 <= n <= 1023, stored as a part of the instruction. The dictionary itself is created from the first of remaining references of the current continuation. In this way, the completeDICTPUSHCONSTinstruction can be obtained by first serializingxF4A4_, then the non-empty dictionary itself (one1bit and a cell reference), and then the unsigned 10-bit integern(as if by aSTU 10instruction). An empty dictionary can be pushed by aNEWDICTprimitive instead. | 34 | 
| F4A8 | PFXDICTGETQ | s D n - s' x s'' -1 or s 0 | Looks up the unique prefix of Slice spresent in the prefix code dictionary represented byCell^?Dand0 <= n <= 1023. If found, the prefix ofsis returned ass', and the corresponding value (also a Slice) asx. The remainder ofsis returned as a Slices''. If no prefix ofsis a key in prefix code dictionaryD, returns the unchangedsand a zero flag to indicate failure. |  | 
| F4A9 | PFXDICTGET | s D n - s' x s'' | Similar to PFXDICTGET, but throws a cell deserialization failure exception on failure. |  | 
| F4AA | PFXDICTGETJMP | s D n - s' s'' or s | Similar to PFXDICTGETQ, but on successBLESSes the valuexinto a Continuation and transfers control to it as if by aJMPX. On failure, returnssunchanged and continues execution. |  | 
| F4AB | PFXDICTGETEXEC | s D n - s' s'' | Similar to PFXDICTGETJMP, butEXECutes the continuation found instead of jumping to it. On failure, throws a cell deserialization exception. |  | 
| F4AE_n | [ref] [n] PFXDICTCONSTGETJMP
[ref] [n] PFXDICTSWITCH | s - s' s'' or s | Combines [n] DICTPUSHCONSTfor0 <= n <= 1023withPFXDICTGETJMP. |  | 
| F4BC | DICTIGETJMPZ | i D n - i or nothing | A variant of DICTIGETJMPthat returns indexion failure. |  | 
| F4BD | DICTUGETJMPZ | i D n - i or nothing | A variant of DICTUGETJMPthat returns indexion failure. |  | 
| F4BE | DICTIGETEXECZ | i D n - i or nothing | A variant of DICTIGETEXECthat returns indexion failure. |  | 
| F4BF | DICTUGETEXECZ | i D n - i or nothing | A variant of DICTUGETEXECthat returns indexion failure. |  | 
| F4B1 | SUBDICTGET | k l D n - D' | Constructs a subdictionary consisting of all keys beginning with prefix k(represented by a Slice, the first0 <= l <= n <= 1023data bits of which are used as a key) of lengthlin dictionaryDof typeHashmapE(n,X)withn-bit keys. On success, returns the new subdictionary of the same typeHashmapE(n,X)as a SliceD'. |  | 
| F4B2 | SUBDICTIGET | x l D n - D' | Variant of SUBDICTGETwith the prefix represented by a signed big-endianl-bit Integerx, where necessarilyl <= 257. |  | 
| F4B3 | SUBDICTUGET | x l D n - D' | Variant of SUBDICTGETwith the prefix represented by an unsigned big-endianl-bit Integerx, where necessarilyl <= 256. |  | 
| F4B5 | SUBDICTRPGET | k l D n - D' | Similar to SUBDICTGET, but removes the common prefixkfrom all keys of the new dictionaryD', which becomes of typeHashmapE(n-l,X). |  | 
| F4B6 | SUBDICTIRPGET | x l D n - D' | Variant of SUBDICTRPGETwith the prefix represented by a signed big-endianl-bit Integerx, where necessarilyl <= 257. |  | 
| F4B7 | SUBDICTURPGET | x l D n - D' | Variant of SUBDICTRPGETwith the prefix represented by an unsigned big-endianl-bit Integerx, where necessarilyl <= 256. |  | 
| F800 | ACCEPT | - | Sets current gas limit  | 26 | 
| F801 | SETGASLIMIT | g -  | Sets current gas limit g_lto the minimum ofgandg_m, and resets the gas creditg_cto zero. If the gas consumed so far (including the present instruction) exceeds the resulting value ofg_l, an (unhandled) out of gas exception is thrown before setting new gas limits. Notice thatSETGASLIMITwith an argumentg >= 2^63-1is equivalent toACCEPT. | 26 | 
| F807 | GASCONSUMED | - g_c | Returns gas consumed by VM so far (including this instruction). | 26 | 
| F80F | COMMIT | - | Commits the current state of registers c4(''persistent data'') andc5(''actions'') so that the current execution is considered ''successful'' with the saved values even if an exception is thrown later. | 26 | 
| F810 | RANDU256 | - x | Generates a new pseudo-random unsigned 256-bit Integer x. The algorithm is as follows: ifris the old value of the random seed, considered as a 32-byte array (by constructing the big-endian representation of an unsigned 256-bit integer), then itssha512(r)is computed; the first 32 bytes of this hash are stored as the new valuer'of the random seed, and the remaining 32 bytes are returned as the next random valuex. | 26+|c7|+|c1_1| | 
| F811 | RAND | y - z | Generates a new pseudo-random integer  | 26+|c7|+|c1_1| | 
| F814 | SETRAND | x -  | Sets the random seed to unsigned 256-bit Integer x. | 26+|c7|+|c1_1| | 
| F815 | ADDRAND
RANDOMIZE | x -  | Mixes unsigned 256-bit Integer xinto the random seedrby setting the random seed toShaof the concatenation of two 32-byte strings: the first with the big-endian representation of the old seedr, and the second with the big-endian representation ofx. | 26 | 
| F82i | [i] GETPARAM |  - x | Returns the  | 26 | 
| F830 | CONFIGDICT |  - D 32 | Returns the global configuration dictionary along with its key length (32).
Equivalent to  | 26 | 
| F832 | CONFIGPARAM | i - c -1 or 0 | Returns the value of the global configuration parameter with integer index  |  | 
| F833 | CONFIGOPTPARAM | i - c^? | Returns the value of the global configuration parameter with integer index  |  | 
| F83400 | PREVMCBLOCKS | - t | Retrives last_mc_blockspart of PrevBlocksInfo from c7 (parameter 13). |  | 
| F83401 | PREVKEYBLOCK | - t | Retrives prev_key_blockpart of PrevBlocksInfo from c7 (parameter 13). |  | 
| F835 | GLOBALID | - i | Retrieves global_idfrom 19 network config. |  | 
| F836 | GETGASFEE | gas_used is_mc - price | Calculates gas fee |  | 
| F837 | GETSTORAGEFEE | cells bits seconds is_mc - price | Calculates storage fees (only current StoragePrices entry is used). |  | 
| F838 | GETFORWARDFEE | cells bits is_mc - price | Calculates forward fee. |  | 
| F839 | GETPRECOMPILEDGAS | - x | Returns gas usage for the current contract if it is precompiled, nullotherwise. |  | 
| F83A | GETORIGINALFWDFEE | fwd_fee is_mc - orig_fwd_fee | Calculate fwd_fee * 2^16 / first_frac. Can be used to get the originalfwd_feeof the message. |  | 
| F83B | GETGASFEESIMPLE | gas_used is_mc - price | Same as GETGASFEE, but without flat price (just(gas_used * price) / 2^16). |  | 
| F83C | GETFORWARDFEESIMPLE | cells bits is_mc - price | Same as GETFORWARDFEE, but without lump price (just (bits*bit_price + cells*cell_price) / 2^16). |  | 
| F840 | GETGLOBVAR | k - x | Returns the  | 26 | 
| F85_k | [k] GETGLOB |  - x | Returns the  | 26 | 
| F860 | SETGLOBVAR | x k -  | Assigns  | 26+|c7'| | 
| F87_k | [k] SETGLOB | x -  | Assigns  | 26+|c7'| | 
| F900 | HASHCU | c - x | Computes the representation hash of a Cell cand returns it as a 256-bit unsigned integerx. Useful for signing and checking signatures of arbitrary entities represented by a tree of cells. | 26 | 
| F901 | HASHSU | s - x | Computes the hash of a Slice sand returns it as a 256-bit unsigned integerx. The result is the same as if an ordinary cell containing only data and references fromshad been created and its hash computed byHASHCU. | 526 | 
| F902 | SHA256U | s - x | Computes Shaof the data bits of Slices. If the bit length ofsis not divisible by eight, throws a cell underflow exception. The hash value is returned as a 256-bit unsigned integerx. | 26 | 
| F90400 | HASHEXT_SHA256 | s_1 ... s_n n - h | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/33 gas per byte | 
| F90401 | HASHEXT_SHA512 | s_1 ... s_n n - h1 h2 | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/16 gas per byte | 
| F90402 | HASHEXT_BLAKE2B | s_1 ... s_n n - h1 h2 | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/19 gas per byte | 
| F90403 | HASHEXT_KECCAK256 | s_1 ... s_n n - h | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/11 gas per byte | 
| F90404 | HASHEXT_KECCAK512 | s_1 ... s_n n - h1 h2 | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/19 gas per byte | 
| F90500 | HASHEXTR_SHA256 | s_n ... s_1 n - h | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/33 gas per byte | 
| F90501 | HASHEXTR_SHA512 | s_n ... s_1 n - h1 h2 | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/16 gas per byte | 
| F90502 | HASHEXTR_BLAKE2B | s_n ... s_1 n - h1 h2 | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/19 gas per byte | 
| F90503 | HASHEXTR_KECCAK256 | s_n ... s_1 n - h | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/11 gas per byte | 
| F90504 | HASHEXTR_KECCAK512 | s_n ... s_1 n - h1 h2 | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/19 gas per byte | 
| F90600 | HASHEXTA_SHA256 | b s_1 ... s_n n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/33 gas per byte | 
| F90601 | HASHEXTA_SHA512 | b s_1 ... s_n n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/16 gas per byte | 
| F90602 | HASHEXTA_BLAKE2B | b s_1 ... s_n n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/19 gas per byte | 
| F90603 | HASHEXTA_KECCAK256 | b s_1 ... s_n n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/11 gas per byte | 
| F90604 | HASHEXTA_KECCAK512 | b s_1 ... s_n n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/6 gas per byte | 
| F90700 | HASHEXTAR_SHA256 | b s_1 ... s_n n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/33 gas per byte | 
| F90701 | HASHEXTAR_SHA512 | b s_n ... s_1 n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/16 gas per byte | 
| F90702 | HASHEXTAR_BLAKE2B | b s_n ... s_1 n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/19 gas per byte | 
| F90703 | HASHEXTAR_KECCAK256 | b s_n ... s_1 n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/11 gas per byte | 
| F90704 | HASHEXTAR_KECCAK512 | b s_n ... s_1 n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/6 gas per byte | 
| F910 | CHKSIGNU | h s k - ? | Checks the Ed25519-signature  | 26 | 
| F911 | CHKSIGNS | d s k - ? | Checks whether sis a valid Ed25519-signature of the data portion of Slicedusing public keyk, similarly toCHKSIGNU. If the bit length of Slicedis not divisible by eight, throws a cell underflow exception. The verification of Ed25519 signatures is the standard one, withShaused to reducedto the 256-bit number that is actually signed. | 26 | 
| F912 | ECRECOVER | hash v r s - 0 or h x1 x2 -1 | Recovers public key from signature, identical to Bitcoin/Ethereum operations. Takes 32-byte hash as uint256 hash; 65-byte signature as uint8vand uint256r,s. Returns0on failure, public key and-1on success. 65-byte public key is returned as uint8h, uint256x1,x2. | 1526 | 
| F914 | P256_CHKSIGNU | h sig k - ? | Checks seck256r1-signature sigof a numberh(a 256-bit unsigned integer, usually computed as the hash of some data) and public keyk. Returns -1 on success, 0 on failure. Public key is a 33-byte slice (encoded according to Sec. 2.3.4 point 2 of SECG SEC 1). Signaturesigis a 64-byte slice (two 256-bit unsigned integersrands). | 3526 | 
| F915 | P256_CHKSIGNS | d sig k - ? | Checks seck256r1-signature sigof data portion of slicedand public keyk. Returns -1 on success, 0 on failure. Public key is a 33-byte slice (encoded according to Sec. 2.3.4 point 2 of SECG SEC 1). Signaturesigis a 64-byte slice (two 256-bit unsigned integersrands). | 3526 | 
| F920 | RIST255_FROMHASH | h1 h2 - x | Deterministically generates a valid point xfrom a 512-bit hash (given as two 256-bit integers). | 626 | 
| F921 | RIST255_VALIDATE | x - | Checks that integer xis a valid representation of some curve point. Throws range_chk on error. | 226 | 
| F922 | RIST255_ADD | x y - x+y | Addition of two points on a curve. | 626 | 
| F923 | RIST255_SUB | x y - x-y | Subtraction of two points on curve. | 626 | 
| F924 | RIST255_MUL | x n - x*n | Multiplies point xby a scalarn. Anynis valid, including negative. | 2026 | 
| F925 | RIST255_MULBASE | n - g*n | Multiplies the generator point gby a scalarn. Anynis valid, including negative. | 776 | 
| F926 | RIST255_PUSHL | - l | Pushes integer l=2^252+27742317777372353535851937790883648493, which is the order of the group. | 26 | 
| B7F921 | RIST255_QVALIDATE | x - 0 or -1 | Checks that integer xis a valid representation of some curve point. Returns -1 on success and 0 on failure. | 234 | 
| B7F922 | RIST255_QADD | x y - 0 or x+y -1 | Addition of two points on a curve. Returns -1 on success and 0 on failure. | 634 | 
| B7F923 | RIST255_QSUB | x y - 0 or x-y -1 | Subtraction of two points on curve. Returns -1 on success and 0 on failure. | 634 | 
| B7F924 | RIST255_QMUL | x n - 0 or x*n -1 | Multiplies point xby a scalarn. Anynis valid, including negative. Returns -1 on success and 0 on failure. | 2034 | 
| B7F925 | RIST255_QMULBASE | n - 0 or g*n -1 | Multiplies the generator point gby a scalarn. Anynis valid, including negative. | 784 | 
| F93000 | BLS_VERIFY | pk msg sgn - bool | Checks BLS signature, return true on success, false otherwise. | 61034 | 
| F93001 | BLS_AGGREGATE | sig_1 ... sig_n n - sig | Aggregates signatures. n>0. Throw exception ifn=0or if somesig_iis not a valid signature. | n*4350-2616 | 
| F93002 | BLS_FASTAGGREGATEVERIFY | pk_1 ... pk_n n msg sig - bool | Checks aggregated BLS signature for keys pk_1...pk_nand messagemsg. Return true on success, false otherwise. Return false ifn=0. | 58034+n*3000 | 
| F93003 | BLS_AGGREGATEVERIFY | pk_1 msg_1 ... pk_n msg_n n sgn - bool | Checks aggregated BLS signature for key-message pairs pk_1 msg_1...pk_n msg_n. Return true on success, false otherwise. Return false ifn=0. | 38534+n*22500 | 
| F93010 | BLS_G1_ADD | x y - x+y | Addition on G1. | 3934 | 
| F93011 | BLS_G1_SUB | x y - x-y | Subtraction on G1. | 3934 | 
| F93012 | BLS_G1_NEG | x - -x | Negation on G1. | 784 | 
| F93013 | BLS_G1_MUL | x s - x*s | Multiplies G1 point xby scalars. Anysis valid, including negative. | 5234 | 
| F93014 | BLS_G1_MULTIEXP | x_1 s_1 ... x_n s_n n - x_1*s_1+...+x_n*s_n | Calculates x_1*s_1+...+x_n*s_nfor G1 pointsx_iand scalarss_i. Returns zero point ifn=0. Anys_iis valid, including negative. | 11409+n*630+n/floor(max(log2(n),4))*8820 | 
| F93015 | BLS_G1_ZERO | - zero | Pushes zero point in G1. | 34 | 
| F93016 | BLS_MAP_TO_G1 | f - x | Converts FP element fto a G1 point. | 2384 | 
| F93017 | BLS_G1_INGROUP | x - bool | Checks that slice xrepresents a valid element of G1. | 2984 | 
| F93018 | BLS_G1_ISZERO | x - bool | Checks that G1 point xis equal to zero. | 34 | 
| F93020 | BLS_G2_ADD | x y - x+y | Addition on G2. | 6134 | 
| F93021 | BLS_G2_SUB | x y - x-y | Subtraction on G2. | 6134 | 
| F93022 | BLS_G2_NEG | x - -x | Negation on G2. | 1584 | 
| F93023 | BLS_G2_MUL | x s - x*s | Multiplies G2 point xby scalars. Anysis valid, including negative. | 10584 | 
| F93024 | BLS_G2_MULTIEXP | x_1 s_1 ... x_n s_n n - x_1*s_1+...+x_n*s_n | Calculates x_1*s_1+...+x_n*s_nfor G2 pointsx_iand scalarss_i. Returns zero point ifn=0. Anys_iis valid, including negative. | 30422+n*1280+n/floor(max(log2(n),4))*22840 | 
| F93025 | BLS_G2_ZERO | - zero | Pushes zero point in G2. | 34 | 
| F93026 | BLS_MAP_TO_G2 | f - x | Converts FP2 element fto a G2 point. | 7984 | 
| F93027 | BLS_G2_INGROUP | x - bool | Checks that slice xrepresents a valid element of G2. | 4284 | 
| F93028 | BLS_G2_ISZERO | x - bool | Checks that G2 point xis equal to zero. | 34 | 
| F93030 | BLS_PAIRING | x_1 y_1 ... x_n y_n n - bool | Given G1 points x_iand G2 pointsy_i, calculates and multiply pairings ofx_i,y_i. Returns true if the result is the multiplicative identity in FP12, false otherwise. Returns false ifn=0. | 20034+n*11800 | 
| F93031 | BLS_PUSHR | - r | Pushes the order of G1 and G2 (approx. 2^255). | 34 | 
| F940 | CDATASIZEQ | c n - x y z -1 or 0 | Recursively computes the count of distinct cells x, data bitsy, and cell referenceszin the dag rooted at Cellc, effectively returning the total storage used by this dag taking into account the identification of equal cells. The values ofx,y, andzare computed by a depth-first traversal of this dag, with a hash table of visited cell hashes used to prevent visits of already-visited cells. The total count of visited cellsxcannot exceed non-negative Integern; otherwise the computation is aborted before visiting the(n+1)-st cell and a zero is returned to indicate failure. Ifcis Null, returnsx=y=z=0. |  | 
| F941 | CDATASIZE | c n - x y z | A non-quiet version of CDATASIZEQthat throws a cell overflow exception (8) on failure. |  | 
| F942 | SDATASIZEQ | s n - x y z -1 or 0 | Similar to CDATASIZEQ, but accepting a Slicesinstead of a Cell. The returned value ofxdoes not take into account the cell that contains the slicesitself; however, the data bits and the cell references ofsare accounted for inyandz. |  | 
| F943 | SDATASIZE | s n - x y z | A non-quiet version of SDATASIZEQthat throws a cell overflow exception (8) on failure. |  | 
| FA00 | LDGRAMS
LDVARUINT16 | s - x s' | Loads (deserializes) a  | 26 | 
| FA01 | LDVARINT16 | s - x s' | Similar to  | 26 | 
| FA02 | STGRAMS
STVARUINT16 | b x - b' | Stores (serializes) an Integer xin the range0...2^120-1into Builderb, and returns the resulting Builderb'. The serialization ofxconsists of a 4-bit unsigned big-endian integerl, which is the smallest integerl>=0, such thatx<2^(8l), followed by an8l-bit unsigned big-endian representation ofx. Ifxdoes not belong to the supported range, a range check exception is thrown. | 26 | 
| FA03 | STVARINT16 | b x - b' | Similar to STVARUINT16, but serializes a signed Integerxin the range-2^119...2^119-1. | 26 | 
| FA04 | LDVARUINT32 | s - x s' | Loads (deserializes) a  | 26 | 
| FA05 | LDVARINT32 | s - x s' | Similar to  | 26 | 
| FA06 | STVARUINT32 | b x - b' | Stores (serializes) an Integer xin the range0...2^248-1into Builderb, and returns the resulting Builderb'. The serialization ofxconsists of a 5-bit unsigned big-endian integerl, which is the smallest integerl>=0, such thatx<2^(8l), followed by an8l-bit unsigned big-endian representation ofx. Ifxdoes not belong to the supported range, a range check exception is thrown. | 26 | 
| FA07 | STVARINT32 | b x - b' | Similar to STVARUINT32, but serializes a signed Integerxin the range-2^247...2^247-1. | 26 | 
| FA40 | LDMSGADDR | s - s' s'' | Loads from Slice sthe only prefix that is a validMsgAddress, and returns both this prefixs'and the remainders''ofsas slices. | 26 | 
| FA41 | LDMSGADDRQ | s - s' s'' -1 or s 0 | A quiet version of LDMSGADDR: on success, pushes an extra-1; on failure, pushes the originalsand a zero. | 26 | 
| FA42 | PARSEMSGADDR | s - t | Decomposes Slice scontaining a validMsgAddressinto a Tupletwith separate fields of thisMsgAddress. Ifsis not a validMsgAddress, a cell deserialization exception is thrown. | 26 | 
| FA43 | PARSEMSGADDRQ | s - t -1 or 0 | A quiet version of PARSEMSGADDR: returns a zero on error instead of throwing an exception. | 26 | 
| FA44 | REWRITESTDADDR | s - x y | Parses Slice scontaining a validMsgAddressInt(usually amsg_addr_std), applies rewriting from theanycast(if present) to the same-length prefix of the address, and returns both the workchainxand the 256-bit addressyas integers. If the address is not 256-bit, or ifsis not a valid serialization ofMsgAddressInt, throws a cell deserialization exception. | 26 | 
| FA45 | REWRITESTDADDRQ | s - x y -1 or 0 | A quiet version of primitive REWRITESTDADDR. | 26 | 
| FA46 | REWRITEVARADDR | s - x s' | A variant of REWRITESTDADDRthat returns the (rewritten) address as a Slices, even if it is not exactly 256 bit long (represented by amsg_addr_var). | 26 | 
| FA47 | REWRITEVARADDRQ | s - x s' -1 or 0 | A quiet version of primitive REWRITEVARADDR. | 26 | 
| FB00 | SENDRAWMSG | c x -  | Sends a raw message contained in Cell c, which should contain a correctly serialized objectMessage X, with the only exception that the source address is allowed to have dummy valueaddr_none(to be automatically replaced with the current smart-contract address), andihr_fee,fwd_fee,created_ltandcreated_atfields can have arbitrary values (to be rewritten with correct values during the action phase of the current transaction). Integer parameterxcontains the flags. Currentlyx=0is used for ordinary messages;x=128is used for messages that are to carry all the remaining balance of the current smart contract (instead of the value originally indicated in the message);x=64is used for messages that carry all the remaining value of the inbound message in addition to the value initially indicated in the new message (if bit 0 is not set, the gas fees are deducted from this amount);x'=x+1means that the sender wants to pay transfer fees separately;x'=x+2means that any errors arising while processing this message during the action phase should be ignored. Finally,x'=x+32means that the current account must be destroyed if its resulting balance is zero. This flag is usually employed together with+128. | 526 | 
| FB02 | RAWRESERVE | x y -  | Creates an output action which would reserve exactly xnanograms (ify=0), at mostxnanograms (ify=2), or all butxnanograms (ify=1ory=3), from the remaining balance of the account. It is roughly equivalent to creating an outbound message carryingxnanograms (orb-xnanograms, wherebis the remaining balance) to oneself, so that the subsequent output actions would not be able to spend more money than the remainder. Bit+2inymeans that the external action does not fail if the specified amount cannot be reserved; instead, all remaining balance is reserved. Bit+8inymeansx:=-xbefore performing any further actions. Bit+4inymeans thatxis increased by the original balance of the current account (before the compute phase), including all extra currencies, before performing any other checks and actions. Currentlyxmust be a non-negative integer, andymust be in the range0...15. | 526 | 
| FB03 | RAWRESERVEX | x D y -  | Similar to RAWRESERVE, but also accepts a dictionaryD(represented by a Cell or Null) with extra currencies. In this way currencies other than Grams can be reserved. | 526 | 
| FB04 | SETCODE | c -  | Creates an output action that would change this smart contract code to that given by Cell c. Notice that this change will take effect only after the successful termination of the current run of the smart contract. | 526 | 
| FB06 | SETLIBCODE | c x -  | Creates an output action that would modify the collection of this smart contract libraries by adding or removing library with code given in Cell c. Ifx=0, the library is actually removed if it was previously present in the collection (if not, this action does nothing). Ifx=1, the library is added as a private library, and ifx=2, the library is added as a public library (and becomes available to all smart contracts if the current smart contract resides in the masterchain); if the library was present in the collection before, its public/private status is changed according tox. Values ofxother than0...2are invalid. | 526 | 
| FB07 | CHANGELIB | h x -  | Creates an output action similarly to SETLIBCODE, but instead of the library code accepts its hash as an unsigned 256-bit integerh. Ifx!=0and the library with hashhis absent from the library collection of this smart contract, this output action will fail. | 526 | 
| FB08 | SENDMSG | c x - fee | Creates an output action and returns a fee for creating a message. Mode has the same effect as in the case of SENDRAWMSG. Additionally+1024means - do not create an action, only estimate fee. Other modes affect the fee calculation as follows:+64substitutes the entire balance of the incoming message as an outcoming value (slightly inaccurate, gas expenses that cannot be estimated before the computation is completed are not taken into account),+128substitutes the value of the entire balance of the contract before the start of the computation phase (slightly inaccurate, since gas expenses that cannot be estimated before the completion of the computation phase are not taken into account). | 526 | 
| FEij | {i*16+j} DEBUG | - | 26 | |
| FEFnssss | {string} DEBUGSTR
{string} {x} DEBUGSTRI | - | 
 | 26 | 
| FFnn | [nn] SETCP | - | Selects TVM codepage 0 <= nn < 240. If the codepage is not supported, throws an invalid opcode exception. | 26 | 
| FFFz | [z-16] SETCP | - | Selects TVM codepage z-16for1 <= z <= 15. Negative codepages-13...-1are reserved for restricted versions of TVM needed to validate runs of TVM in other codepages. Negative codepage-14is reserved for experimental codepages, not necessarily compatible between different TVM implementations, and should be disabled in the production versions of TVM. | 26 | 
| FFF0 | SETCPX | c -  | Selects codepage cwith-2^15 <= c < 2^15passed in the top of the stack. | 26 | 
| Opcode | Fift syntax | Stack | Description | Gas | 
|---|---|---|---|---|
| 00 | NOP | - | Does nothing. | 18 | 
| 0i | s[i] XCHG0 |  | Interchanges s0withs[i],1 <= i <= 15. | 18 | 
| 10ij | s[i] s[j] XCHG |  | Interchanges s[i]withs[j],1 <= i < j <= 15. | 26 | 
| 11ii | s0 [ii] s() XCHG |  | Interchanges s0withs[ii],0 <= ii <= 255. | 26 | 
| 1i | s1 s[i] XCHG |  | Interchanges s1withs[i],2 <= i <= 15. | 18 | 
| 2i | s[i] PUSH |  | Pushes a copy of the old s[i]into the stack. | 18 | 
| 3i | s[i] POP |  | Pops the old s0value into the olds[i]. | 18 | 
| 4ijk | s[i] s[j] s[k] XCHG3 |  | Equivalent to s2 s[i] XCHGs1 s[j] XCHGs[k] XCHG0. | 26 | 
| 50ij | s[i] s[j] XCHG2 |  | Equivalent to s1 s[i] XCHGs[j] XCHG0. | 26 | 
| 51ij | s[i] s[j] XCPU |  | Equivalent to s[i] XCHG0s[j] PUSH. | 26 | 
| 52ij | s[i] s[j-1] PUXC |  | Equivalent to s[i] PUSHSWAPs[j] XCHG0. | 26 | 
| 53ij | s[i] s[j] PUSH2 |  | Equivalent to s[i] PUSHs[j+1] PUSH. | 26 | 
| 540ijk | s[i] s[j] s[k] XCHG3_l |  | Long form of XCHG3. | 34 | 
| 541ijk | s[i] s[j] s[k] XC2PU |  | Equivalent to s[i] s[j] XCHG2s[k] PUSH. | 34 | 
| 542ijk | s[i] s[j] s[k-1] XCPUXC |  | Equivalent to s1 s[i] XCHGs[j] s[k-1] PUXC. | 34 | 
| 543ijk | s[i] s[j] s[k] XCPU2 |  | Equivalent to s[i] XCHG0s[j] s[k] PUSH2. | 34 | 
| 544ijk | s[i] s[j-1] s[k-1] PUXC2 |  | Equivalent to s[i] PUSHs2 XCHG0s[j] s[k] XCHG2. | 34 | 
| 545ijk | s[i] s[j-1] s[k-1] PUXCPU |  | Equivalent to s[i] s[j-1] PUXCs[k] PUSH. | 34 | 
| 546ijk | s[i] s[j-1] s[k-2] PU2XC |  | Equivalent to s[i] PUSHSWAPs[j] s[k-1] PUXC. | 34 | 
| 547ijk | s[i] s[j] s[k] PUSH3 |  | Equivalent to s[i] PUSHs[j+1] s[k+1] PUSH2. | 34 | 
| 55ij | [i+1] [j+1] BLKSWAP |  | Permutes two blocks  | 26 | 
| 56ii | [ii] s() PUSH |  | Pushes a copy of the old  | 26 | 
| 57ii | [ii] s() POP |  | Pops the old  | 26 | 
| 58 | ROT | a b c - b c a | Equivalent to 1 2 BLKSWAPor tos2 s1 XCHG2. | 18 | 
| 59 | ROTREV
-ROT | a b c - c a b | Equivalent to 2 1 BLKSWAPor tos2 s2 XCHG2. | 18 | 
| 5A | SWAP2
2SWAP | a b c d - c d a b | Equivalent to 2 2 BLKSWAPor tos3 s2 XCHG2. | 18 | 
| 5B | DROP2
2DROP | a b -  | Equivalent to DROPDROP. | 18 | 
| 5C | DUP2
2DUP | a b - a b a b | Equivalent to s1 s0 PUSH2. | 18 | 
| 5D | OVER2
2OVER | a b c d - a b c d a b | Equivalent to s3 s2 PUSH2. | 18 | 
| 5Eij | [i+2] [j] REVERSE |  | Reverses the order of s[j+i+1] ... s[j]. | 26 | 
| 5F0i | [i] BLKDROP |  | Equivalent to DROPperformeditimes. | 26 | 
| 5Fij | [i] [j] BLKPUSH |  | Equivalent to  | 26 | 
| 60 | PICK
PUSHX |  | Pops integer ifrom the stack, then performss[i] PUSH. | 18 | 
| 61 | ROLLX |  | Pops integer ifrom the stack, then performs1 [i] BLKSWAP. | 18 | 
| 62 | -ROLLX
ROLLREVX |  | Pops integer ifrom the stack, then performs[i] 1 BLKSWAP. | 18 | 
| 63 | BLKSWX |  | Pops integers i,jfrom the stack, then performs[i] [j] BLKSWAP. | 18 | 
| 64 | REVX |  | Pops integers i,jfrom the stack, then performs[i] [j] REVERSE. | 18 | 
| 65 | DROPX |  | Pops integer ifrom the stack, then performs[i] BLKDROP. | 18 | 
| 66 | TUCK | a b - b a b | Equivalent to SWAPOVERor tos1 s1 XCPU. | 18 | 
| 67 | XCHGX |  | Pops integer ifrom the stack, then performss[i] XCHG. | 18 | 
| 68 | DEPTH | - depth | Pushes the current depth of the stack. | 18 | 
| 69 | CHKDEPTH | i - | Pops integer ifrom the stack, then checks whether there are at leastielements, generating a stack underflow exception otherwise. | 18/58 | 
| 6A | ONLYTOPX |  | Pops integer ifrom the stack, then removes all but the topielements. | 18 | 
| 6B | ONLYX |  | Pops integer ifrom the stack, then leaves only the bottomielements. Approximately equivalent toDEPTHSWAPSUBDROPX. | 18 | 
| 6Cij | [i] [j] BLKDROP2 |  | Drops  | 26 | 
| Opcode | Fift syntax | Stack | Description | Gas | 
|---|---|---|---|---|
| 6D | NULL
PUSHNULL |  - null | Pushes the only value of type Null. | 18 | 
| 6E | ISNULL | x - ? | Checks whether xis a Null, and returns-1or0accordingly. | 18 | 
| 6F0n | [n] TUPLE | x_1 ... x_n - t | Creates a new Tuple  | 26+n | 
| 6F1k | [k] INDEX | t - x | Returns the  | 26 | 
| 6F2n | [n] UNTUPLE | t - x_1 ... x_n | Unpacks a Tuple  | 26+n | 
| 6F3k | [k] UNPACKFIRST | t - x_1 ... x_k | Unpacks first  | 26+k | 
| 6F4n | [n] EXPLODE | t - x_1 ... x_m m | Unpacks a Tuple t=(x_1,...,x_m)and returns its lengthm, but only ifm <= n <= 15. Otherwise throws a type check exception. | 26+m | 
| 6F5k | [k] SETINDEX | t x - t' | Computes Tuple  | 26+|t| | 
| 6F6k | [k] INDEXQ | t - x | Returns the k-th element of a Tuplet, where0 <= k <= 15. In other words, returnsx_{k+1}ift=(x_1,...,x_n). Ifk>=n, or iftis Null, returns a Null instead ofx. | 26 | 
| 6F7k | [k] SETINDEXQ | t x - t' | Sets the  | 26+|t'| | 
| 6F80 | TUPLEVAR | x_1 ... x_n n - t | Creates a new Tuple tof lengthnsimilarly toTUPLE, but with0 <= n <= 255taken from the stack. | 26+n | 
| 6F81 | INDEXVAR | t k - x | Similar to k INDEX, but with0 <= k <= 254taken from the stack. | 26 | 
| 6F82 | UNTUPLEVAR | t n - x_1 ... x_n | Similar to n UNTUPLE, but with0 <= n <= 255taken from the stack. | 26+n | 
| 6F83 | UNPACKFIRSTVAR | t n - x_1 ... x_n | Similar to n UNPACKFIRST, but with0 <= n <= 255taken from the stack. | 26+n | 
| 6F84 | EXPLODEVAR | t n - x_1 ... x_m m | Similar to n EXPLODE, but with0 <= n <= 255taken from the stack. | 26+m | 
| 6F85 | SETINDEXVAR | t x k - t' | Similar to k SETINDEX, but with0 <= k <= 254taken from the stack. | 26+|t'| | 
| 6F86 | INDEXVARQ | t k - x | Similar to n INDEXQ, but with0 <= k <= 254taken from the stack. | 26 | 
| 6F87 | SETINDEXVARQ | t x k - t' | Similar to k SETINDEXQ, but with0 <= k <= 254taken from the stack. | 26+|t'| | 
| 6F88 | TLEN | t - n | Returns the length of a Tuple. | 26 | 
| 6F89 | QTLEN | t - n or -1 | Similar to TLEN, but returns-1iftis not a Tuple. | 26 | 
| 6F8A | ISTUPLE | t - ? | Returns -1or0depending on whethertis a Tuple. | 26 | 
| 6F8B | LAST | t - x | Returns the last element of a non-empty Tuple t. | 26 | 
| 6F8C | TPUSH
COMMA | t x - t' | Appends a value xto a Tuplet=(x_1,...,x_n), but only if the resulting Tuplet'=(x_1,...,x_n,x)is of length at most 255. Otherwise throws a type check exception. | 26+|t'| | 
| 6F8D | TPOP | t - t' x | Detaches the last element x=x_nfrom a non-empty Tuplet=(x_1,...,x_n), and returns both the resulting Tuplet'=(x_1,...,x_{n-1})and the original last elementx. | 26+|t'| | 
| 6FA0 | NULLSWAPIF | x - x or null x | Pushes a Null under the topmost Integer x, but only ifx!=0. | 26 | 
| 6FA1 | NULLSWAPIFNOT | x - x or null x | Pushes a Null under the topmost Integer x, but only ifx=0. May be used for stack alignment after quiet primitives such asPLDUXQ. | 26 | 
| 6FA2 | NULLROTRIF | x y - x y or null x y | Pushes a Null under the second stack entry from the top, but only if the topmost Integer yis non-zero. | 26 | 
| 6FA3 | NULLROTRIFNOT | x y - x y or null x y | Pushes a Null under the second stack entry from the top, but only if the topmost Integer yis zero. May be used for stack alignment after quiet primitives such asLDUXQ. | 26 | 
| 6FA4 | NULLSWAPIF2 | x - x or null null x | Pushes two nulls under the topmost Integer  | 26 | 
| 6FA5 | NULLSWAPIFNOT2 | x - x or null null x | Pushes two nulls under the topmost Integer  | 26 | 
| 6FA6 | NULLROTRIF2 | x y - x y or null null x y | Pushes two nulls under the second stack entry from the top, but only if the topmost Integer  | 26 | 
| 6FA7 | NULLROTRIFNOT2 | x y - x y or null null x y | Pushes two nulls under the second stack entry from the top, but only if the topmost Integer  | 26 | 
| 6FBij | [i] [j] INDEX2 | t - x | Recovers  | 26 | 
| 6FE_ijk | [i] [j] [k] INDEX3 | t - x | Recovers  | 26 | 
| Opcode | Fift syntax | Stack | Description | Gas | 
|---|---|---|---|---|
| 7i | [x] PUSHINT
[x] INT | - x | Pushes integer  | 18 | 
| 80xx | [xx] PUSHINT
[xx] INT | - xx | Pushes integer xx.-128 <= xx <= 127. | 26 | 
| 81xxxx | [xxxx] PUSHINT
[xxxx] INT | - xxxx | Pushes integer xxxx.-2^15 <= xx < 2^15. | 34 | 
| 82lxxx | [xxx] PUSHINT
[xxx] INT | - xxx | Pushes integer  | 23 | 
| 83xx | [xx+1] PUSHPOW2 | - 2^(xx+1) | (Quietly) pushes  | 26 | 
| 83FF | PUSHNAN | - NaN | Pushes a NaN. | 26 | 
| 84xx | [xx+1] PUSHPOW2DEC | - 2^(xx+1)-1 | Pushes 2^(xx+1)-1for0 <= xx <= 255. | 26 | 
| 85xx | [xx+1] PUSHNEGPOW2 | - -2^(xx+1) | Pushes -2^(xx+1)for0 <= xx <= 255. | 26 | 
| 88 | [ref] PUSHREF | - c | Pushes the reference  | 18 | 
| 89 | [ref] PUSHREFSLICE | - s | Similar to PUSHREF, but converts the cell into a Slice. | 118/43 | 
| 8A | [ref] PUSHREFCONT | - cont | Similar to PUSHREFSLICE, but makes a simple ordinary Continuation out of the cell. | 118/43 | 
| 8Bxsss | [slice] PUSHSLICE
[slice] SLICE | - s | Pushes the slice  | 22 | 
| 8Crxxssss | [slice] PUSHSLICE
[slice] SLICE | - s | Pushes the slice  | 25 | 
| 8Drxxsssss | [slice] PUSHSLICE
[slice] SLICE | - s | Pushes the slice  | 28 | 
| 8F_rxxcccc | [builder] PUSHCONT
[builder] CONT | - c | Pushes a continuation made from  | 26 | 
| 9xccc | [builder] PUSHCONT
[builder] CONT | - c | Pushes a continuation made from  | 18 | 
| Opcode | Fift syntax | Stack | Description | Gas | 
|---|---|---|---|---|
| A0 | ADD | x y - x+y | 18 | |
| A1 | SUB | x y - x-y | 18 | |
| A2 | SUBR | x y - y-x | Equivalent to SWAPSUB. | 18 | 
| A3 | NEGATE | x - -x | Equivalent to  | 18 | 
| A4 | INC | x - x+1 | Equivalent to 1 ADDCONST. | 18 | 
| A5 | DEC | x - x-1 | Equivalent to -1 ADDCONST. | 18 | 
| A6cc | [cc] ADDCONST
[cc] ADDINT
[-cc] SUBCONST
[-cc] SUBINT | x - x+cc | -128 <= cc <= 127. | 26 | 
| A7cc | [cc] MULCONST
[cc] MULINT | x - x*cc | -128 <= cc <= 127. | 26 | 
| A8 | MUL | x y - x*y | 18 | |
| A900 | ADDDIVMOD | x w z - q=floor((x+w)/z) r=(x+w)-zq | 26 | |
| A901 | ADDDIVMODR | x w z - q=round((x+w)/z) r=(x+w)-zq | 26 | |
| A902 | ADDDIVMODC | x w y - q=ceil((x+w)/z) r=(x+w)-zq | 26 | |
| A904 | DIV | x y - q | q=floor(x/y),r=x-y*q | 26 | 
| A905 | DIVR | x y - q' | q'=round(x/y),r'=x-y*q' | 26 | 
| A906 | DIVC | x y - q'' | q''=ceil(x/y),r''=x-y*q'' | 26 | 
| A908 | MOD | x y - r | 26 | |
| A909 | MODR | x y - r | 26 | |
| A90A | MODC | x y - r | 26 | |
| A90C | DIVMOD | x y - q r | 26 | |
| A90D | DIVMODR | x y - q' r' | 26 | |
| A90E | DIVMODC | x y - q'' r'' | 26 | |
| A920 | ADDRSHIFTMOD | x w z - q=floor((x+w)/2^z) r=(x+w)-q*2^z | 26 | |
| A921 | ADDRSHIFTMODR | x w z - q=round((x+w)/2^z) r=(x+w)-q*2^z | 26 | |
| A922 | ADDRSHIFTMODC | x w z - q=ceil((x+w)/2^z) r=(x+w)-q*2^z | 26 | |
| A925 | RSHIFTR | x y - round(x/2^y) | 26 | |
| A926 | RSHIFTC | x y - ceil(x/2^y) | 26 | |
| A928 | MODPOW2 | x y - x mod 2^y | 26 | |
| A929 | MODPOW2R | x y - x mod 2^y | 26 | |
| A92A | MODPOW2C | x y - x mod 2^y | 26 | |
| A92C | RSHIFTMOD | x y - q=floor(x/2^y) r=x-q*2^y | 26 | |
| A92D | RSHIFTMODR | x y - q=round(x/2^y) r=x-q*2^y | 26 | |
| A92E | RSHIFTMODC | x y - q=ceil(x/2^y) r=x-q*2^y | 26 | |
| A930tt | [tt+1] ADDRSHIFT#MOD | x w - q=floor((x+w)/2^(tt+1)) r=(x+w)-q*2^(tt+1) | 34 | |
| A931tt | [tt+1] ADDRSHIFTR#MOD | x w - q=round((x+w)/2^(tt+1)) r=(x+w)-q*2^(tt+1) | 34 | |
| A932tt | [tt+1] ADDRSHIFTC#MOD | x w - q=round((x+w)/2^(tt+1)) r=(x+w)-q*2^(tt+1) | 34 | |
| A935tt | [tt+1] RSHIFTR# | x - round(x/2^(tt+1)) | 34 | |
| A936tt | [tt+1] RSHIFTC# | x - ceil(x/2^(tt+1)) | 34 | |
| A938tt | [tt+1] MODPOW2# | x - x mod 2^(tt+1) | 34 | |
| A939tt | [tt+1] MODPOW2R# | x - x mod 2^(tt+1) | 34 | |
| A93Att | [tt+1] MODPOW2C# | x - x mod 2^(tt+1) | 34 | |
| A93Ctt | [tt+1] RSHIFT#MOD | x - q=floor(x/2^(tt+1)) r=x-q*2^(tt+1) | 34 | |
| A93Dtt | [tt+1] RSHIFTR#MOD | x - q=round(x/2^(tt+1)) r=x-q*2^(tt+1) | 34 | |
| A93Ett | [tt+1] RSHIFTC#MOD | x - q=ceil(x/2^(tt+1)) r=x-q*2^(tt+1) | 34 | |
| A980 | MULADDDIVMOD | x y w z - q=floor((xy+w)/z) r=(xy+w)-zq | 26 | |
| A981 | MULADDDIVMODR | x y w z - q=round((xy+w)/z) r=(xy+w)-zq | 26 | |
| A982 | MULADDDIVMODC | x y w z - q=ceil((xy+w)/z) r=(xy+w)-zq | 26 | |
| A984 | MULDIV | x y z - q | q=floor(x*y/z) | 26 | 
| A985 | MULDIVR | x y z - q' | q'=round(x*y/z) | 26 | 
| A986 | MULDIVC | x y z - q' | q'=ceil(x*y/z) | 26 | 
| A988 | MULMOD | x y z - x*y mod z | 26 | |
| A989 | MULMODR | x y z - x*y mod z | 26 | |
| A98A | MULMODC | x y z - x*y mod z | 26 | |
| A98C | MULDIVMOD | x y z - q r | q=floor(x*y/z),r=x*y-z*q | 26 | 
| A98D | MULDIVMODR | x y z - q r | q=round(x*y/z),r=x*y-z*q | 26 | 
| A98E | MULDIVMODC | x y z - q r | q=ceil(x*y/z),r=x*y-z*q | 26 | 
| A9A0 | MULADDRSHIFTMOD | x y w z - q=floor((xy+w)/2^z) r=(xy+w)-q*2^z | 26 | |
| A9A1 | MULADDRSHIFTRMOD | x y w z - q=round((xy+w)/2^z) r=(xy+w)-q*2^z | 26 | |
| A9A2 | MULADDRSHIFTCMOD | x y w z - q=ceil((xy+w)/2^z) r=(xy+w)-q*2^z | 26 | |
| A9A4 | MULRSHIFT | x y z - floor(x*y/2^z) | 0 <= z <= 256 | 26 | 
| A9A5 | MULRSHIFTR | x y z - round(x*y/2^z) | 0 <= z <= 256 | 26 | 
| A9A6 | MULRSHIFTC | x y z - ceil(x*y/2^z) | 0 <= z <= 256 | 26 | 
| A9A8 | MULMODPOW2_VAR | x y z - x*y mod 2^z | 26 | |
| A9A9 | MULMODPOW2R_VAR | x y z - x*y mod 2^z | 26 | |
| A9AA | MULMODPOW2C_VAR | x y z - x*y mod 2^z | 26 | |
| A9AC | MULRSHIFTMOD_VAR | x y z - q=floor(x*y/2^z) r=xy-q*2^z | 26 | |
| A9AD | MULRSHIFTRMOD_VAR | x y z - q=round(x*y/2^z) r=xy-q*2^z | 26 | |
| A9AE | MULRSHIFTCMOD_VAR | x y z - q=ceil(x*y/2^z) r=xy-q*2^z | 26 | |
| A9B0tt | [tt+1] MULADDRSHIFT#MOD | x y w - q=floor((xy+w)/2^z) r=(xy+w)-q*2^z | 34 | |
| A9B1tt | [tt+1] MULADDRSHIFTR#MOD | x y w - q=round((xy+w)/2^z) r=(xy+w)-q*2^z | 34 | |
| A9B2tt | [tt+1] MULADDRSHIFTC#MOD | x y w - q=ceil((xy+w)/2^z) r=(xy+w)-q*2^z | 34 | |
| A9B4tt | [tt+1] MULRSHIFT# | x y - floor(x*y/2^(tt+1)) | 34 | |
| A9B5tt | [tt+1] MULRSHIFTR# | x y - round(x*y/2^(tt+1)) | 34 | |
| A9B6tt | [tt+1] MULRSHIFTC# | x y - ceil(x*y/2^(tt+1)) | 34 | |
| A9B8tt | [tt+1] MULMODPOW2# | x y - x*y mod 2^(tt+1) | 34 | |
| A9B9tt | [tt+1] MULMODPOW2R# | x y - x*y mod 2^(tt+1) | 34 | |
| A9BAtt | [tt+1] MULMODPOW2C# | x y - x*y mod 2^(tt+1) | 34 | |
| A9BC | MULRSHIFT#MOD | x y - q=floor(x*y/2^(tt+1)) r=xy-q*2^(tt+1) | 34 | |
| A9BD | MULRSHIFTR#MOD | x y - q=round(x*y/2^(tt+1)) r=xy-q*2^(tt+1) | 34 | |
| A9BE | MULRSHIFTC#MOD | x y - q=ceil(x*y/2^(tt+1)) r=xy-q*2^(tt+1) | 34 | |
| A9C0 | LSHIFTADDDIVMOD | x w z y - q=floor((x*2^y+w)/z) r=(x*2^y+w)-zq | 26 | |
| A9C1 | LSHIFTADDDIVMODR | x w z y - q=round((x*2^y+w)/z) r=(x*2^y+w)-zq | 26 | |
| A9C2 | LSHIFTADDDIVMODC | x w z y - q=round((x*2^y+w)/z) r=(x*2^y+w)-zq | 26 | |
| A9C4 | LSHIFTDIV | x y z - floor(2^z*x/y) | 0 <= z <= 256 | 26 | 
| A9C5 | LSHIFTDIVR | x y z - round(2^z*x/y) | 0 <= z <= 256 | 26 | 
| A9C6 | LSHIFTDIVC | x y z - ceil(2^z*x/y) | 0 <= z <= 256 | 26 | 
| A9C8 | LSHIFTMOD | x y z - 2^z*x mod y | 26 | |
| A9C9 | LSHIFTMODR | x y z - 2^z*x mod y | 26 | |
| A9CA | LSHIFTMODC | x y z - 2^z*x mod y | 26 | |
| A9CC | LSHIFTDIVMOD | x y z - q=floor(2^z*x/y) r=2^z*x-q*y | 26 | |
| A9CD | LSHIFTDIVMODR | x y z - q=round(2^z*x/y) r=2^z*x-q*y | 26 | |
| A9CE | LSHIFTDIVMODC | x y z - q=ceil(2^z*x/y) r=2^z*x-q*y | 26 | |
| A9D0tt | [tt+1] LSHIFT#ADDDIVMOD | x w z - q=floor((x*2^y+w)/z) r=(x*2^y+w)-zq | 34 | |
| A9D1tt | [tt+1] LSHIFT#ADDDIVMODR | x w z - q=round((x*2^y+w)/z) r=(x*2^y+w)-zq | 34 | |
| A9D2tt | [tt+1] LSHIFT#ADDDIVMODC | x w z - q=ceil((x*2^y+w)/z) r=(x*2^y+w)-zq | 34 | |
| A9D4tt | [tt+1] LSHIFT#DIV | x y - floor(2^(tt+1)*x/y) | 34 | |
| A9D5tt | [tt+1] LSHIFT#DIVR | x y - round(2^(tt+1)*x/y) | 34 | |
| A9D6tt | [tt+1] LSHIFT#DIVC | x y - ceil(2^(tt+1)*x/y) | 26 | |
| A9D8tt | [tt+1] LSHIFT#MOD | x y - 2^(tt+1)*x mod y | 34 | |
| A9D9tt | [tt+1] LSHIFT#MODR | x y - 2^(tt+1)*x mod y | 34 | |
| A9DAtt | [tt+1] LSHIFT#MODC | x y - 2^(tt+1)*x mod y | 34 | |
| A9DCtt | [tt+1] LSHIFT#DIVMOD | x y - q=floor(2^(tt+1)*x/y) r=2^(tt+1)*x-q*y | 34 | |
| A9DDtt | [tt+1] LSHIFT#DIVMODR | x y - q=round(2^(tt+1)*x/y) r=2^(tt+1)*x-q*y | 34 | |
| A9DEtt | [tt+1] LSHIFT#DIVMODC | x y - q=ceil(2^(tt+1)*x/y) r=2^(tt+1)*x-q*y | 34 | |
| AAcc | [cc+1] LSHIFT# | x - x*2^(cc+1) | 0 <= cc <= 255 | 26 | 
| ABcc | [cc+1] RSHIFT# | x - floor(x/2^(cc+1)) | 0 <= cc <= 255 | 18 | 
| AC | LSHIFT | x y - x*2^y | 0 <= y <= 1023 | 18 | 
| AD | RSHIFT | x y - floor(x/2^y) | 0 <= y <= 1023 | 18 | 
| AE | POW2 | y - 2^y | 
 | 18 | 
| B0 | AND | x y - x&y | Bitwise and of two signed integers xandy, sign-extended to infinity. | 18 | 
| B1 | OR | x y - x|y | Bitwise or of two integers. | 18 | 
| B2 | XOR | x y - x xor y | Bitwise xor of two integers. | 18 | 
| B3 | NOT | x - ~x | Bitwise not of an integer. | 26 | 
| B4cc | [cc+1] FITS | x - x | Checks whether  | 26/76 | 
| B5cc | [cc+1] UFITS | x - x | Checks whether xis acc+1-bit unsigned integer for0 <= cc <= 255(i.e., whether0 <= x < 2^(cc+1)). | 26/76 | 
| B600 | FITSX | x c - x | Checks whether xis ac-bit signed integer for0 <= c <= 1023. | 26/76 | 
| B601 | UFITSX | x c - x | Checks whether xis ac-bit unsigned integer for0 <= c <= 1023. | 26/76 | 
| B602 | BITSIZE | x - c | Computes smallest c >= 0such thatxfits into ac-bit signed integer (-2^(c-1) <= c < 2^(c-1)). | 26 | 
| B603 | UBITSIZE | x - c | Computes smallest c >= 0such thatxfits into ac-bit unsigned integer (0 <= x < 2^c), or throws a range check exception. | 26 | 
| B608 | MIN | x y - x or y | Computes the minimum of two integers xandy. | 26 | 
| B609 | MAX | x y - x or y | Computes the maximum of two integers xandy. | 26 | 
| B60A | MINMAX
INTSORT2 | x y - x y or y x | Sorts two integers. Quiet version of this operation returns two NaNs if any of the arguments areNaNs. | 26 | 
| B60B | ABS | x - |x| | Computes the absolute value of an integer x. | 26 | 
| B7A0 | QADD | x y - x+y | 26 | |
| B7A1 | QSUB | x y - x-y | 26 | |
| B7A2 | QSUBR | x y - y-x | 26 | |
| B7A3 | QNEGATE | x - -x | 26 | |
| B7A4 | QINC | x - x+1 | 26 | |
| B7A5 | QDEC | x - x-1 | 26 | |
| B7A8 | QMUL | x y - x*y | 26 | |
| B7A900 | QADDDIVMOD | x w z - q=floor((x+w)/z) r=(x+w)-zq | 34 | |
| B7A901 | QADDDIVMODR | x w z - q=round((x+w)/z) r=(x+w)-zq | 34 | |
| B7A902 | QADDDIVMODC | x w y - q=ceil((x+w)/z) r=(x+w)-zq | 34 | |
| B7A904 | QDIV | x y - q | Division returns NaNify=0. | 34 | 
| B7A905 | QDIVR | x y - q' | 34 | |
| B7A906 | QDIVC | x y - q'' | 34 | |
| B7A908 | QMOD | x y - r | 34 | |
| B7A909 | QMODR | x y - r | 34 | |
| B7A90A | QMODC | x y - r | 34 | |
| B7A90C | QDIVMOD | x y - q r | 34 | |
| B7A90D | QDIVMODR | x y - q' r' | 34 | |
| B7A90E | QDIVMODC | x y - q'' r'' | 34 | |
| B7A920 | QADDRSHIFTMOD | x w z - q=floor((x+w)/2^z) r=(x+w)-q*2^z | 34 | |
| B7A921 | QADDRSHIFTMODR | x w z - q=round((x+w)/2^z) r=(x+w)-q*2^z | 34 | |
| B7A922 | QADDRSHIFTMODC | x w z - q=ceil((x+w)/2^z) r=(x+w)-q*2^z | 34 | |
| B7A925 | QRSHIFTR | x y - round(x/2^y) | 34 | |
| B7A926 | QRSHIFTC | x y - ceil(x/2^y) | 34 | |
| B7A928 | QMODPOW2 | x y - x mod 2^y | 34 | |
| B7A929 | QMODPOW2R | x y - x mod 2^y | 34 | |
| B7A92A | QMODPOW2C | x y - x mod 2^y | 34 | |
| B7A92C | QRSHIFTMOD | x y - q=floor(x/2^y) r=x-q*2^y | 34 | |
| B7A92D | QRSHIFTMODR | x y - q=round(x/2^y) r=x-q*2^y | 34 | |
| B7A92E | QRSHIFTMODC | x y - q=ceil(x/2^y) r=x-q*2^y | 34 | |
| B7A930tt | [tt+1] QADDRSHIFT#MOD | x w - q=floor((x+w)/2^(tt+1)) r=(x+w)-q*2^(tt+1) | 42 | |
| B7A931tt | [tt+1] QADDRSHIFTR#MOD | x w - q=round((x+w)/2^(tt+1)) r=(x+w)-q*2^(tt+1) | 42 | |
| B7A932tt | [tt+1] QADDRSHIFTC#MOD | x w - q=round((x+w)/2^(tt+1)) r=(x+w)-q*2^(tt+1) | 42 | |
| B7A935tt | [tt+1] QRSHIFTR# | x - round(x/2^(tt+1)) | 42 | |
| B7A936tt | [tt+1] QRSHIFTC# | x - ceil(x/2^(tt+1)) | 42 | |
| B7A938tt | [tt+1] QMODPOW2# | x - x mod 2^(tt+1) | 42 | |
| B7A939tt | [tt+1] QMODPOW2R# | x - x mod 2^(tt+1) | 42 | |
| B7A93Att | [tt+1] QMODPOW2C# | x - x mod 2^(tt+1) | 42 | |
| A93Ctt | [tt+1] QRSHIFT#MOD | x - q=floor(x/2^(tt+1)) r=x-q*2^(tt+1) | 42 | |
| A93Dtt | [tt+1] QRSHIFTR#MOD | x - q=round(x/2^(tt+1)) r=x-q*2^(tt+1) | 42 | |
| B7A93Ett | [tt+1] QRSHIFTC#MOD | x - q=ceil(x/2^(tt+1)) r=x-q*2^(tt+1) | 42 | |
| B7A980 | QMULADDDIVMOD | x y w z - q=floor((xy+w)/z) r=(xy+w)-zq | 34 | |
| B7A981 | QMULADDDIVMODR | x y w z - q=round((xy+w)/z) r=(xy+w)-zq | 34 | |
| B7A982 | QMULADDDIVMODC | x y w z - q=ceil((xy+w)/z) r=(xy+w)-zq | 34 | |
| B7A984 | QMULDIV | x y z - q | q=floor(x*y/z) | 34 | 
| B7A985 | QMULDIVR | x y z - q' | 34 | |
| B7A986 | QMULDIVC | x y z - q' | q'=ceil(x*y/z) | 34 | 
| B7A988 | QMULMOD | x y z - x*y mod z | 34 | |
| B7A989 | QMULMODR | x y z - x*y mod z | 34 | |
| B7A98A | QMULMODC | x y z - x*y mod z | 34 | |
| B7A98C | QMULDIVMOD | x y z - q r | 34 | |
| B7A98D | QMULDIVMODR | x y z - q r | q=round(x*y/z),r=x*y-z*q | 34 | 
| B7A98E | QMULDIVMODC | x y z - q r | q=ceil(x*y/z),r=x*y-z*q | 34 | 
| B7A9A0 | QMULADDRSHIFTMOD | x y w z - q=floor((xy+w)/2^z) r=(xy+w)-q*2^z | 34 | |
| B7A9A1 | QMULADDRSHIFTRMOD | x y w z - q=round((xy+w)/2^z) r=(xy+w)-q*2^z | 34 | |
| B7A9A2 | QMULADDRSHIFTCMOD | x y w z - q=ceil((xy+w)/2^z) r=(xy+w)-q*2^z | 34 | |
| B7A9A4 | QMULRSHIFT | x y z - floor(x*y/2^z) | 0 <= z <= 256 | 34 | 
| B7A9A5 | QMULRSHIFTR | x y z - round(x*y/2^z) | 0 <= z <= 256 | 34 | 
| B7A9A6 | QMULRSHIFTC | x y z - ceil(x*y/2^z) | 0 <= z <= 256 | 34 | 
| B7A9A8 | QMULMODPOW2_VAR | x y z - x*y mod 2^z | 34 | |
| B7A9A9 | QMULMODPOW2R_VAR | x y z - x*y mod 2^z | 34 | |
| B7A9AA | QMULMODPOW2C_VAR | x y z - x*y mod 2^z | 34 | |
| B7A9AC | QMULRSHIFTMOD_VAR | x y z - q=floor(x*y/2^z) r=xy-q*2^z | 34 | |
| B7A9AD | QMULRSHIFTRMOD_VAR | x y z - q=round(x*y/2^z) r=xy-q*2^z | 34 | |
| B7A9AE | QMULRSHIFTCMOD_VAR | x y z - q=ceil(x*y/2^z) r=xy-q*2^z | 34 | |
| B7A9B0tt | [tt+1] QMULADDRSHIFT#MOD | x y w - q=floor((xy+w)/2^z) r=(xy+w)-q*2^z | 42 | |
| B7A9B1tt | [tt+1] QMULADDRSHIFTR#MOD | x y w - q=round((xy+w)/2^z) r=(xy+w)-q*2^z | 42 | |
| B7A9B2tt | [tt+1] QMULADDRSHIFTC#MOD | x y w - q=ceil((xy+w)/2^z) r=(xy+w)-q*2^z | 42 | |
| B7A9B4tt | [tt+1] QMULRSHIFT# | x y - floor(x*y/2^(tt+1)) | 42 | |
| B7A9B5tt | [tt+1] QMULRSHIFTR# | x y - round(x*y/2^(tt+1)) | 42 | |
| B7A9B6tt | [tt+1] QMULRSHIFTC# | x y - ceil(x*y/2^(tt+1)) | 42 | |
| B7A9B8tt | [tt+1] QMULMODPOW2# | x y - x*y mod 2^(tt+1) | 42 | |
| B7A9B9tt | [tt+1] QMULMODPOW2R# | x y - x*y mod 2^(tt+1) | 42 | |
| B7A9BAtt | [tt+1] QMULMODPOW2C# | x y - x*y mod 2^(tt+1) | 42 | |
| B7A9BC | QMULRSHIFT#MOD | x y - q=floor(x*y/2^(tt+1)) r=xy-q*2^(tt+1) | 42 | |
| B7A9BD | QMULRSHIFTR#MOD | x y - q=round(x*y/2^(tt+1)) r=xy-q*2^(tt+1) | 42 | |
| B7A9BE | QMULRSHIFTC#MOD | x y - q=ceil(x*y/2^(tt+1)) r=xy-q*2^(tt+1) | 42 | |
| B7A9C0 | QLSHIFTADDDIVMOD | x w z y - q=floor((x*2^y+w)/z) r=(x*2^y+w)-zq | 34 | |
| B7A9C1 | QLSHIFTADDDIVMODR | x w z y - q=round((x*2^y+w)/z) r=(x*2^y+w)-zq | 34 | |
| B7A9C2 | QLSHIFTADDDIVMODC | x w z y - q=round((x*2^y+w)/z) r=(x*2^y+w)-zq | 34 | |
| B7A9C4 | QLSHIFTDIV | x y z - floor(2^z*x/y) | 0 <= z <= 256 | 34 | 
| B7A9C5 | QLSHIFTDIVR | x y z - round(2^z*x/y) | 0 <= z <= 256 | 34 | 
| B7A9C6 | QLSHIFTDIVC | x y z - ceil(2^z*x/y) | 0 <= z <= 256 | 34 | 
| B7A9C8 | QLSHIFTMOD | x y z - 2^z*x mod y | 34 | |
| B7A9C9 | QLSHIFTMODR | x y z - 2^z*x mod y | 34 | |
| B7A9CA | QLSHIFTMODC | x y z - 2^z*x mod y | 34 | |
| B7A9CC | QLSHIFTDIVMOD | x y z - q=floor(2^z*x/y) r=2^z*x-q*y | 34 | |
| B7A9CD | QLSHIFTDIVMODR | x y z - q=round(2^z*x/y) r=2^z*x-q*y | 34 | |
| B7A9CE | QLSHIFTDIVMODC | x y z - q=ceil(2^z*x/y) r=2^z*x-q*y | 34 | |
| B7A9D0tt | [tt+1] QLSHIFT#ADDDIVMOD | x w z - q=floor((x*2^(tt+1)+w)/z) r=(x*2^(tt+1)+w)-zq | 42 | |
| B7A9D1tt | [tt+1] QLSHIFT#ADDDIVMODR | x w z - q=round((x*2^(tt+1)+w)/z) r=(x*2^(tt+1)+w)-zq | 42 | |
| B7A9D2tt | [tt+1] QLSHIFT#ADDDIVMODC | x w z - q=ceil((x*2^(tt+1)+w)/z) r=(x*2^(tt+1)+w)-zq | 42 | |
| B7A9D4tt | [tt+1] QLSHIFT#DIV | x y - floor(2^(tt+1)*x/y) | 42 | |
| B7A9D5tt | [tt+1] QLSHIFT#DIVR | x y - round(2^(tt+1)*x/y) | 42 | |
| B7A9D6tt | [tt+1] QLSHIFT#DIVC | x y - ceil(2^(tt+1)*x/y) | 34 | |
| B7A9D8tt | [tt+1] QLSHIFT#MOD | x y - 2^(tt+1)*x mod y | 42 | |
| B7A9D9tt | [tt+1] LSHIFT#MODR | x y - 2^(tt+1)*x mod y | 42 | |
| B7A9DAtt | [tt+1] QLSHIFT#MODC | x y - 2^(tt+1)*x mod y | 42 | |
| B7A9DCtt | [tt+1] QLSHIFT#DIVMOD | x y - q=floor(2^(tt+1)*x/y) r=2^(tt+1)*x-q*y | 42 | |
| B7A9DDtt | [tt+1] QLSHIFT#DIVMODR | x y - q=round(2^(tt+1)*x/y) r=2^(tt+1)*x-q*y | 42 | |
| B7A9DEtt | [tt+1] QLSHIFT#DIVMODC | x y - q=ceil(2^(tt+1)*x/y) r=2^(tt+1)*x-q*y | 42 | |
| B7AAcc | [cc+1] QLSHIFT# | x - x*2^(cc+1) | 0 <= cc <= 255 | 34 | 
| B7ABcc | [cc+1] RSHIFT# | x - floor(x/2^(cc+1)) | 0 <= cc <= 255 | 26 | 
| B7AC | QLSHIFT | x y - x*2^y | 26 | |
| B7AD | QRSHIFT | x y - floor(x/2^y) | 26 | |
| B7AE | QPOW2 | y - 2^y | 26 | |
| B7B0 | QAND | x y - x&y | 26 | |
| B7B1 | QOR | x y - x|y | 26 | |
| B7B2 | QXOR | x y - x xor y | 26 | |
| B7B3 | QNOT | x - ~x | 26 | |
| B7B4cc | [cc+1] QFITS | x - x | Replaces xwith aNaNif x is not acc+1-bit signed integer, leaves it intact otherwise. | 34 | 
| B7B5cc | [cc+1] QUFITS | x - x | Replaces xwith aNaNif x is not acc+1-bit unsigned integer, leaves it intact otherwise. | 34 | 
| B7B600 | QFITSX | x c - x | Replaces xwith aNaNif x is not a c-bit signed integer, leaves it intact otherwise. | 34 | 
| B7B601 | QUFITSX | x c - x | Replaces xwith aNaNif x is not a c-bit unsigned integer, leaves it intact otherwise. | 34 | 
| Opcode | Fift syntax | Stack | Description | Gas | 
|---|---|---|---|---|
| B8 | SGN | x - sgn(x) | Computes the sign of an integer  | 18 | 
| B9 | LESS | x y - x<y | Returns -1ifx<y,0otherwise. | 18 | 
| BA | EQUAL | x y - x=y | Returns -1ifx=y,0otherwise. | 18 | 
| BB | LEQ | x y - x<=y | 18 | |
| BC | GREATER | x y - x>y | 18 | |
| BD | NEQ | x y - x!=y | Equivalent to EQUALNOT. | 18 | 
| BE | GEQ | x y - x>=y | Equivalent to LESSNOT. | 18 | 
| BF | CMP | x y - sgn(x-y) | Computes the sign of  | 18 | 
| C0yy | [yy] EQINT | x - x=yy | Returns  | 26 | 
| C1yy | [yy] LESSINT
[yy-1] LEQINT | x - x<yy | Returns  | 26 | 
| C2yy | [yy] GTINT
[yy+1] GEQINT | x - x>yy | Returns  | 26 | 
| C3yy | [yy] NEQINT | x - x!=yy | Returns  | 26 | 
| C4 | ISNAN | x - x=NaN | Checks whether xis aNaN. | 18 | 
| C5 | CHKNAN | x - x | Throws an arithmetic overflow exception if xis aNaN. | 18/68 | 
| C700 | SEMPTY | s - ? | Checks whether a Slice sis empty (i.e., contains no bits of data and no cell references). | 26 | 
| C701 | SDEMPTY | s - ? | Checks whether Slice shas no bits of data. | 26 | 
| C702 | SREMPTY | s - ? | Checks whether Slice shas no references. | 26 | 
| C703 | SDFIRST | s - ? | Checks whether the first bit of Slice sis a one. | 26 | 
| C704 | SDLEXCMP | s s' - x | Compares the data of slexicographically with the data ofs', returning-1, 0, or 1 depending on the result. | 26 | 
| C705 | SDEQ | s s' - ? | Checks whether the data parts of sands'coincide, equivalent toSDLEXCMPISZERO. | 26 | 
| C708 | SDPFX | s s' - ? | Checks whether sis a prefix ofs'. | 26 | 
| C709 | SDPFXREV | s s' - ? | Checks whether s'is a prefix ofs, equivalent toSWAPSDPFX. | 26 | 
| C70A | SDPPFX | s s' - ? | Checks whether sis a proper prefix ofs'(i.e., a prefix distinct froms'). | 26 | 
| C70B | SDPPFXREV | s s' - ? | Checks whether s'is a proper prefix ofs. | 26 | 
| C70C | SDSFX | s s' - ? | Checks whether sis a suffix ofs'. | 26 | 
| C70D | SDSFXREV | s s' - ? | Checks whether s'is a suffix ofs. | 26 | 
| C70E | SDPSFX | s s' - ? | Checks whether sis a proper suffix ofs'. | 26 | 
| C70F | SDPSFXREV | s s' - ? | Checks whether s'is a proper suffix ofs. | 26 | 
| C710 | SDCNTLEAD0 | s - n | Returns the number of leading zeroes in s. | 26 | 
| C711 | SDCNTLEAD1 | s - n | Returns the number of leading ones in s. | 26 | 
| C712 | SDCNTTRAIL0 | s - n | Returns the number of trailing zeroes in s. | 26 | 
| C713 | SDCNTTRAIL1 | s - n | Returns the number of trailing ones in s. | 26 | 
| Opcode | Fift syntax | Stack | Description | Gas | 
|---|---|---|---|---|
| C8 | NEWC | - b | Creates a new empty Builder. | 18 | 
| C9 | ENDC | b - c | Converts a Builder into an ordinary Cell. | 518 | 
| CAcc | [cc+1] STI | x b - b' | Stores a signed cc+1-bit integerxinto Builderbfor0 <= cc <= 255, throws a range check exception ifxdoes not fit intocc+1bits. | 26 | 
| CBcc | [cc+1] STU | x b - b' | Stores an unsigned cc+1-bit integerxinto Builderb. In all other respects it is similar toSTI. | 26 | 
| CC | STREF | c b - b' | Stores a reference to Cell cinto Builderb. | 18 | 
| CD | STBREFR
ENDCST | b b'' - b | Equivalent to ENDCSWAPSTREF. | 518 | 
| CE | STSLICE | s b - b' | Stores Slice sinto Builderb. | 18 | 
| CF00 | STIX | x b l - b' | Stores a signed l-bit integerxintobfor0 <= l <= 257. | 26 | 
| CF01 | STUX | x b l - b' | Stores an unsigned l-bit integerxintobfor0 <= l <= 256. | 26 | 
| CF02 | STIXR | b x l - b' | Similar to STIX, but with arguments in a different order. | 26 | 
| CF03 | STUXR | b x l - b' | Similar to STUX, but with arguments in a different order. | 26 | 
| CF04 | STIXQ | x b l - x b f or b' 0 | A quiet version of  | 26 | 
| CF05 | STUXQ | x b l - x b f or b' 0 | A quiet version of STUX. | 26 | 
| CF06 | STIXRQ | b x l - b x f or b' 0 | A quiet version of STIXR. | 26 | 
| CF07 | STUXRQ | b x l - b x f or b' 0 | A quiet version of STUXR. | 26 | 
| CF08cc | [cc+1] STI_l | x b - b' | A longer version of [cc+1] STI. | 34 | 
| CF09cc | [cc+1] STU_l | x b - b' | A longer version of [cc+1] STU. | 34 | 
| CF0Acc | [cc+1] STIR | b x - b' | Equivalent to SWAP[cc+1] STI. | 34 | 
| CF0Bcc | [cc+1] STUR | b x - b' | Equivalent to SWAP[cc+1] STU. | 34 | 
| CF0Ccc | [cc+1] STIQ | x b - x b f or b' 0 | A quiet version of STI. | 34 | 
| CF0Dcc | [cc+1] STUQ | x b - x b f or b' 0 | A quiet version of STU. | 34 | 
| CF0Ecc | [cc+1] STIRQ | b x - b x f or b' 0 | A quiet version of STIR. | 34 | 
| CF0Fcc | [cc+1] STURQ | b x - b x f or b' 0 | A quiet version of STUR. | 34 | 
| CF10 | STREF_l | c b - b' | A longer version of STREF. | 26 | 
| CF11 | STBREF | b' b - b'' | Equivalent to SWAPSTBREFR. | 526 | 
| CF12 | STSLICE_l | s b - b' | A longer version of STSLICE. | 26 | 
| CF13 | STB | b' b - b'' | Appends all data from Builder b'to Builderb. | 26 | 
| CF14 | STREFR | b c - b' | Equivalent to SWAPSTREF. | 26 | 
| CF15 | STBREFR_l | b b' - b'' | A longer encoding of STBREFR. | 526 | 
| CF16 | STSLICER | b s - b' | Equivalent to SWAPSTSLICE. | 26 | 
| CF17 | STBR
BCONCAT | b b' - b'' | Concatenates two builders.
Equivalent to  | 26 | 
| CF18 | STREFQ | c b - c b -1 or b' 0 | Quiet version of STREF. | 26 | 
| CF19 | STBREFQ | b' b - b' b -1 or b'' 0 | Quiet version of STBREF. | 526 | 
| CF1A | STSLICEQ | s b - s b -1 or b' 0 | Quiet version of STSLICE. | 26 | 
| CF1B | STBQ | b' b - b' b -1 or b'' 0 | Quiet version of STB. | 26 | 
| CF1C | STREFRQ | b c - b c -1 or b' 0 | Quiet version of STREFR. | 26 | 
| CF1D | STBREFRQ | b b' - b b' -1 or b'' 0 | Quiet version of STBREFR. | 526 | 
| CF1E | STSLICERQ | b s - b s -1 or b'' 0 | Quiet version of STSLICER. | 26 | 
| CF1F | STBRQ
BCONCATQ | b b' - b b' -1 or b'' 0 | Quiet version of STBR. | 26 | 
| CF20 | [ref] STREFCONST | b - b' | Equivalent to PUSHREFSTREFR. | 26 | 
| CF21 | [ref] [ref] STREF2CONST | b - b' | Equivalent to STREFCONSTSTREFCONST. | 26 | 
| CF23 | ENDXC | b x - c | If  | 526 | 
| CF28 | STILE4 | x b - b' | Stores a little-endian signed 32-bit integer. | 26 | 
| CF29 | STULE4 | x b - b' | Stores a little-endian unsigned 32-bit integer. | 26 | 
| CF2A | STILE8 | x b - b' | Stores a little-endian signed 64-bit integer. | 26 | 
| CF2B | STULE8 | x b - b' | Stores a little-endian unsigned 64-bit integer. | 26 | 
| CF30 | BDEPTH | b - x | Returns the depth of Builder b. If no cell references are stored inb, thenx=0; otherwisexis one plus the maximum of depths of cells referred to fromb. | 26 | 
| CF31 | BBITS | b - x | Returns the number of data bits already stored in Builder b. | 26 | 
| CF32 | BREFS | b - y | Returns the number of cell references already stored in b. | 26 | 
| CF33 | BBITREFS | b - x y | Returns the numbers of both data bits and cell references in b. | 26 | 
| CF35 | BREMBITS | b - x' | Returns the number of data bits that can still be stored in b. | 26 | 
| CF36 | BREMREFS | b - y' | Returns the number of references that can still be stored in b. | 26 | 
| CF37 | BREMBITREFS | b - x' y' | Returns the numbers of both data bits and references that can still be stored in b. | 26 | 
| CF38cc | [cc+1] BCHKBITS# | b - | Checks whether cc+1bits can be stored intob, where0 <= cc <= 255. | 34/84 | 
| CF39 | BCHKBITS | b x -  | Checks whether xbits can be stored intob,0 <= x <= 1023. If there is no space forxmore bits inb, or ifxis not within the range0...1023, throws an exception. | 26/76 | 
| CF3A | BCHKREFS | b y -  | Checks whether yreferences can be stored intob,0 <= y <= 7. | 26/76 | 
| CF3B | BCHKBITREFS | b x y -  | Checks whether xbits andyreferences can be stored intob,0 <= x <= 1023,0 <= y <= 7. | 26/76 | 
| CF3Ccc | [cc+1] BCHKBITSQ# | b - ? | Checks whether cc+1bits can be stored intob, where0 <= cc <= 255. | 34 | 
| CF3D | BCHKBITSQ | b x - ? | Checks whether xbits can be stored intob,0 <= x <= 1023. | 26 | 
| CF3E | BCHKREFSQ | b y - ? | Checks whether yreferences can be stored intob,0 <= y <= 7. | 26 | 
| CF3F | BCHKBITREFSQ | b x y - ? | Checks whether xbits andyreferences can be stored intob,0 <= x <= 1023,0 <= y <= 7. | 26 | 
| CF40 | STZEROES | b n - b' | Stores nbinary zeroes into Builderb. | 26 | 
| CF41 | STONES | b n - b' | Stores nbinary ones into Builderb. | 26 | 
| CF42 | STSAME | b n x - b' | Stores nbinaryxes (0 <= x <= 1) into Builderb. | 26 | 
| CFC0_xysss | [slice] STSLICECONST | b - b' | Stores a constant subslice  | 24 | 
| D0 | CTOS | c - s | Converts a Cell into a Slice. Notice that cmust be either an ordinary cell, or an exotic cell which is automatically loaded to yield an ordinary cellc', converted into a Slice afterwards. | 118/43 | 
| D1 | ENDS | s -  | Removes a Slice sfrom the stack, and throws an exception if it is not empty. | 18/68 | 
| D2cc | [cc+1] LDI | s - x s' | Loads (i.e., parses) a signed cc+1-bit integerxfrom Slices, and returns the remainder ofsass'. | 26 | 
| D3cc | [cc+1] LDU | s - x s' | Loads an unsigned cc+1-bit integerxfrom Slices. | 26 | 
| D4 | LDREF | s - c s' | Loads a cell reference cfroms. | 18 | 
| D5 | LDREFRTOS | s - s' s'' | Equivalent to LDREFSWAPCTOS. | 118/43 | 
| D6cc | [cc+1] LDSLICE | s - s'' s' | Cuts the next cc+1bits ofsinto a separate Slices''. | 26 | 
| D700 | LDIX | s l - x s' | Loads a signed l-bit (0 <= l <= 257) integerxfrom Slices, and returns the remainder ofsass'. | 26 | 
| D701 | LDUX | s l - x s' | Loads an unsigned l-bit integerxfrom (the firstlbits of)s, with0 <= l <= 256. | 26 | 
| D702 | PLDIX | s l - x | Preloads a signed l-bit integer from Slices, for0 <= l <= 257. | 26 | 
| D703 | PLDUX | s l - x | Preloads an unsigned l-bit integer froms, for0 <= l <= 256. | 26 | 
| D704 | LDIXQ | s l - x s' -1 or s 0 | Quiet version of LDIX: loads a signedl-bit integer fromssimilarly toLDIX, but returns a success flag, equal to-1on success or to0on failure (ifsdoes not havelbits), instead of throwing a cell underflow exception. | 26 | 
| D705 | LDUXQ | s l - x s' -1 or s 0 | Quiet version of LDUX. | 26 | 
| D706 | PLDIXQ | s l - x -1 or 0 | Quiet version of PLDIX. | 26 | 
| D707 | PLDUXQ | s l - x -1 or 0 | Quiet version of PLDUX. | 26 | 
| D708cc | [cc+1] LDI_l | s - x s' | A longer encoding for LDI. | 34 | 
| D709cc | [cc+1] LDU_l | s - x s' | A longer encoding for LDU. | 34 | 
| D70Acc | [cc+1] PLDI | s - x | Preloads a signed cc+1-bit integer from Slices. | 34 | 
| D70Bcc | [cc+1] PLDU | s - x | Preloads an unsigned cc+1-bit integer froms. | 34 | 
| D70Ccc | [cc+1] LDIQ | s - x s' -1 or s 0 | A quiet version of LDI. | 34 | 
| D70Dcc | [cc+1] LDUQ | s - x s' -1 or s 0 | A quiet version of LDU. | 34 | 
| D70Ecc | [cc+1] PLDIQ | s - x -1 or 0 | A quiet version of PLDI. | 34 | 
| D70Fcc | [cc+1] PLDUQ | s - x -1 or 0 | A quiet version of PLDU. | 34 | 
| D714_c | [32(c+1)] PLDUZ | s - s x | Preloads the first 32(c+1)bits of Slicesinto an unsigned integerx, for0 <= c <= 7. Ifsis shorter than necessary, missing bits are assumed to be zero. This operation is intended to be used along withIFBITJMPand similar instructions. | 26 | 
| D718 | LDSLICEX | s l - s'' s' | Loads the first 0 <= l <= 1023bits from Slicesinto a separate Slices'', returning the remainder ofsass'. | 26 | 
| D719 | PLDSLICEX | s l - s'' | Returns the first 0 <= l <= 1023bits ofsass''. | 26 | 
| D71A | LDSLICEXQ | s l - s'' s' -1 or s 0 | A quiet version of LDSLICEX. | 26 | 
| D71B | PLDSLICEXQ | s l - s' -1 or 0 | A quiet version of LDSLICEXQ. | 26 | 
| D71Ccc | [cc+1] LDSLICE_l | s - s'' s' | A longer encoding for LDSLICE. | 34 | 
| D71Dcc | [cc+1] PLDSLICE | s - s'' | Returns the first 0 < cc+1 <= 256bits ofsass''. | 34 | 
| D71Ecc | [cc+1] LDSLICEQ | s - s'' s' -1 or s 0 | A quiet version of LDSLICE. | 34 | 
| D71Fcc | [cc+1] PLDSLICEQ | s - s'' -1 or 0 | A quiet version of PLDSLICE. | 34 | 
| D720 | SDCUTFIRST | s l - s' | Returns the first 0 <= l <= 1023bits ofs. It is equivalent toPLDSLICEX. | 26 | 
| D721 | SDSKIPFIRST | s l - s' | Returns all but the first 0 <= l <= 1023bits ofs. It is equivalent toLDSLICEXNIP. | 26 | 
| D722 | SDCUTLAST | s l - s' | Returns the last 0 <= l <= 1023bits ofs. | 26 | 
| D723 | SDSKIPLAST | s l - s' | Returns all but the last 0 <= l <= 1023bits ofs. | 26 | 
| D724 | SDSUBSTR | s l l' - s' | Returns 0 <= l' <= 1023bits ofsstarting from offset0 <= l <= 1023, thus extracting a bit substring out of the data ofs. | 26 | 
| D726 | SDBEGINSX | s s' - s'' | Checks whether sbegins with (the data bits of)s', and removess'fromson success. On failure throws a cell deserialization exception. PrimitiveSDPFXREVcan be considered a quiet version ofSDBEGINSX. | 26 | 
| D727 | SDBEGINSXQ | s s' - s'' -1 or s 0 | A quiet version of SDBEGINSX. | 26 | 
| D72A_xsss | [slice] SDBEGINS | s - s'' | Checks whether sbegins with constant bitstringsssof length8x+3(with continuation bit assumed), where0 <= x <= 127, and removessssfromson success. | 31 | 
| D72E_xsss | [slice] SDBEGINSQ | s - s'' -1 or s 0 | A quiet version of SDBEGINS. | 31 | 
| D730 | SCUTFIRST | s l r - s' | Returns the first 0 <= l <= 1023bits and first0 <= r <= 4references ofs. | 26 | 
| D731 | SSKIPFIRST | s l r - s' | Returns all but the first lbits ofsandrreferences ofs. | 26 | 
| D732 | SCUTLAST | s l r - s' | Returns the last 0 <= l <= 1023data bits and last0 <= r <= 4references ofs. | 26 | 
| D733 | SSKIPLAST | s l r - s' | Returns all but the last lbits ofsandrreferences ofs. | 26 | 
| D734 | SUBSLICE | s l r l' r' - s' | Returns 0 <= l' <= 1023bits and0 <= r' <= 4references from Slices, after skipping the first0 <= l <= 1023bits and first0 <= r <= 4references. | 26 | 
| D736 | SPLIT | s l r - s' s'' | Splits the first 0 <= l <= 1023data bits and first0 <= r <= 4references fromsintos', returning the remainder ofsass''. | 26 | 
| D737 | SPLITQ | s l r - s' s'' -1 or s 0 | A quiet version of SPLIT. | 26 | 
| D739 | XCTOS | c - s ? | Transforms an ordinary or exotic cell into a Slice, as if it were an ordinary cell. A flag is returned indicating whether cis exotic. If that be the case, its type can later be deserialized from the first eight bits ofs. |  | 
| D73A | XLOAD | c - c' | Loads an exotic cell cand returns an ordinary cellc'. Ifcis already ordinary, does nothing. Ifccannot be loaded, throws an exception. |  | 
| D73B | XLOADQ | c - c' -1 or c 0 | Loads an exotic cell cand returns an ordinary cellc'. Ifcis already ordinary, does nothing. Ifccannot be loaded, returns 0. |  | 
| D741 | SCHKBITS | s l -  | Checks whether there are at least ldata bits in Slices. If this is not the case, throws a cell deserialisation (i.e., cell underflow) exception. | 26/76 | 
| D742 | SCHKREFS | s r -  | Checks whether there are at least rreferences in Slices. | 26/76 | 
| D743 | SCHKBITREFS | s l r -  | Checks whether there are at least ldata bits andrreferences in Slices. | 26/76 | 
| D745 | SCHKBITSQ | s l - ? | Checks whether there are at least ldata bits in Slices. | 26 | 
| D746 | SCHKREFSQ | s r - ? | Checks whether there are at least rreferences in Slices. | 26 | 
| D747 | SCHKBITREFSQ | s l r - ? | Checks whether there are at least ldata bits andrreferences in Slices. | 26 | 
| D748 | PLDREFVAR | s n - c | Returns the n-th cell reference of Slicesfor0 <= n <= 3. | 26 | 
| D749 | SBITS | s - l | Returns the number of data bits in Slice s. | 26 | 
| D74A | SREFS | s - r | Returns the number of references in Slice s. | 26 | 
| D74B | SBITREFS | s - l r | Returns both the number of data bits and the number of references in s. | 26 | 
| D74E_n | [n] PLDREFIDX | s - c | Returns the n-th cell reference of Slices, where0 <= n <= 3. | 26 | 
| D750 | LDILE4 | s - x s' | Loads a little-endian signed 32-bit integer. | 26 | 
| D751 | LDULE4 | s - x s' | Loads a little-endian unsigned 32-bit integer. | 26 | 
| D752 | LDILE8 | s - x s' | Loads a little-endian signed 64-bit integer. | 26 | 
| D753 | LDULE8 | s - x s' | Loads a little-endian unsigned 64-bit integer. | 26 | 
| D754 | PLDILE4 | s - x | Preloads a little-endian signed 32-bit integer. | 26 | 
| D755 | PLDULE4 | s - x | Preloads a little-endian unsigned 32-bit integer. | 26 | 
| D756 | PLDILE8 | s - x | Preloads a little-endian signed 64-bit integer. | 26 | 
| D757 | PLDULE8 | s - x | Preloads a little-endian unsigned 64-bit integer. | 26 | 
| D758 | LDILE4Q | s - x s' -1 or s 0 | Quietly loads a little-endian signed 32-bit integer. | 26 | 
| D759 | LDULE4Q | s - x s' -1 or s 0 | Quietly loads a little-endian unsigned 32-bit integer. | 26 | 
| D75A | LDILE8Q | s - x s' -1 or s 0 | Quietly loads a little-endian signed 64-bit integer. | 26 | 
| D75B | LDULE8Q | s - x s' -1 or s 0 | Quietly loads a little-endian unsigned 64-bit integer. | 26 | 
| D75C | PLDILE4Q | s - x -1 or 0 | Quietly preloads a little-endian signed 32-bit integer. | 26 | 
| D75D | PLDULE4Q | s - x -1 or 0 | Quietly preloads a little-endian unsigned 32-bit integer. | 26 | 
| D75E | PLDILE8Q | s - x -1 or 0 | Quietly preloads a little-endian signed 64-bit integer. | 26 | 
| D75F | PLDULE8Q | s - x -1 or 0 | Quietly preloads a little-endian unsigned 64-bit integer. | 26 | 
| D760 | LDZEROES | s - n s' | Returns the count nof leading zero bits ins, and removes these bits froms. | 26 | 
| D761 | LDONES | s - n s' | Returns the count nof leading one bits ins, and removes these bits froms. | 26 | 
| D762 | LDSAME | s x - n s' | Returns the count nof leading bits equal to0 <= x <= 1ins, and removes these bits froms. | 26 | 
| D764 | SDEPTH | s - x | Returns the depth of Slice s. Ifshas no references, thenx=0; otherwisexis one plus the maximum of depths of cells referred to froms. | 26 | 
| D765 | CDEPTH | c - x | Returns the depth of Cell c. Ifchas no references, thenx=0; otherwisexis one plus the maximum of depths of cells referred to fromc. Ifcis a Null instead of a Cell, returns zero. | 26 | 
| D766 | CLEVEL | cell - level | Returns level of the cell. | 26 | 
| D767 | CLEVELMASK | cell - level_mask | Returns level mask of the cell. | 26 | 
| D76A_ | [i] CHASHI | cell - hash | Returns ith hash of the cell. | 26 | 
| D76E_ | [i] CDEPTHI | cell - depth | Returns ith depth of the cell. | 26 | 
| D770 | CHASHIX | cell i - hash | Returns ith hash of the cell. | 26 | 
| D771 | CDEPTHIX | cell i - depth | Returns ith depth of the cell. | 26 | 
| Opcode | Fift syntax | Stack | Description | Gas | 
|---|---|---|---|---|
| D8 | EXECUTE
CALLX | c -  | Calls, or executes, continuation c. | 18 | 
| D9 | JMPX | c -  | Jumps, or transfers control, to continuation  | 18 | 
| DApr | [p] [r] CALLXARGS | c -  | Calls continuation  | 26 | 
| DB0p | [p] -1 CALLXARGS | c -  | Calls continuation cwith0 <= p <= 15parameters, expecting an arbitrary number of return values. | 26 | 
| DB1p | [p] JMPXARGS | c -  | Jumps to continuation c, passing only the top0 <= p <= 15values from the current stack to it (the remainder of the current stack is discarded). | 26 | 
| DB2r | [r] RETARGS |  | Returns to c0, with0 <= r <= 15return values taken from the current stack. | 26 | 
| DB30 | RET
RETTRUE |  | Returns to the continuation at  | 26 | 
| DB31 | RETALT
RETFALSE |  | Returns to the continuation at  | 26 | 
| DB32 | BRANCH
RETBOOL | f -  | Performs RETTRUEif integerf!=0, orRETFALSEiff=0. | 26 | 
| DB34 | CALLCC | c -  | Call with current continuation, transfers control to c, pushing the old value ofccintoc's stack (instead of discarding it or writing it into newc0). | 26 | 
| DB35 | JMPXDATA | c -  | Similar to CALLCC, but the remainder of the current continuation (the old value ofcc) is converted into a Slice before pushing it into the stack ofc. | 26 | 
| DB36pr | [p] [r] CALLCCARGS | c -  | Similar to CALLXARGS, but pushes the old value ofcc(along with the top0 <= p <= 15values from the original stack) into the stack of newly-invoked continuationc, settingcc.nargsto-1 <= r <= 14. | 34 | 
| DB38 | CALLXVARARGS | c p r -  | Similar to CALLXARGS, but takes-1 <= p,r <= 254from the stack. The next three operations also takepandrfrom the stack, both in the range-1...254. | 26 | 
| DB39 | RETVARARGS | p r -  | Similar to RETARGS. | 26 | 
| DB3A | JMPXVARARGS | c p r -  | Similar to JMPXARGS. | 26 | 
| DB3B | CALLCCVARARGS | c p r -  | Similar to CALLCCARGS. | 26 | 
| DB3C | [ref] CALLREF |  | Equivalent to PUSHREFCONTCALLX. | 126/51 | 
| DB3D | [ref] JMPREF |  | Equivalent to PUSHREFCONTJMPX. | 126/51 | 
| DB3E | [ref] JMPREFDATA |  | Equivalent to PUSHREFCONTJMPXDATA. | 126/51 | 
| DB3F | RETDATA |  | Equivalent to c0 PUSHCTRJMPXDATA. In this way, the remainder of the current continuation is converted into a Slice and returned to the caller. | 26 | 
| DB4fff | flags RUNVM | x_1 ... x_n n code [r] [c4] [c7] [g_l] [g_m] - x'_1 ... x'_m exitcode [data'] [c4'] [c5] [g_c] | Runs child VM with code codeand stackx_1...x_n. Returns the resulting stackx'_1...x'_mand exitcode. Other arguments and return values are enabled by flags. |  | 
| DB50 | RUNVMX | x_1 ... x_n n code [r] [c4] [c7] [g_l] [g_m] flags - x'_1 ... x'_m exitcode [data'] [c4'] [c5] [g_c] | Runs child VM with code codeand stackx_1...x_n. Returns the resulting stackx'_1...x'_mand exitcode. Other arguments and return values are enabled by flags. |  | 
| DC | IFRET
IFNOT: | f -  | Performs a RET, but only if integerfis non-zero. Iffis aNaN, throws an integer overflow exception. | 18 | 
| DD | IFNOTRET
IF: | f -  | Performs a RET, but only if integerfis zero. | 18 | 
| DE | IF | f c -  | Performs EXECUTEforc(i.e., executesc), but only if integerfis non-zero. Otherwise simply discards both values. | 18 | 
| DF | IFNOT | f c -  | Executes continuation c, but only if integerfis zero. Otherwise simply discards both values. | 18 | 
| E0 | IFJMP | f c -  | Jumps to c(similarly toJMPX), but only iffis non-zero. | 18 | 
| E1 | IFNOTJMP | f c -  | Jumps to c(similarly toJMPX), but only iffis zero. | 18 | 
| E2 | IFELSE | f c c' -  | If integer fis non-zero, executesc, otherwise executesc'. Equivalent toCONDSELCHKEXECUTE. | 18 | 
| E300 | [ref] IFREF | f -  | Equivalent to  | 26/126/51 | 
| E301 | [ref] IFNOTREF | f -  | Equivalent to PUSHREFCONTIFNOT. | 26/126/51 | 
| E302 | [ref] IFJMPREF | f -  | Equivalent to PUSHREFCONTIFJMP. | 26/126/51 | 
| E303 | [ref] IFNOTJMPREF | f -  | Equivalent to PUSHREFCONTIFNOTJMP. | 26/126/51 | 
| E304 | CONDSEL | f x y - x or y | If integer fis non-zero, returnsx, otherwise returnsy. Notice that no type checks are performed onxandy; as such, it is more like a conditional stack operation. Roughly equivalent toROTISZEROINCROLLXNIP. | 26 | 
| E305 | CONDSELCHK | f x y - x or y | Same as CONDSEL, but first checks whetherxandyhave the same type. | 26 | 
| E308 | IFRETALT | f - | Performs RETALTif integerf!=0. | 26 | 
| E309 | IFNOTRETALT | f - | Performs RETALTif integerf=0. | 26 | 
| E30D | [ref] IFREFELSE | f c - | Equivalent to PUSHREFCONTSWAPIFELSE, with the optimization that the cell reference is not actually loaded into a Slice and then converted into an ordinary Continuation iff=0. Similar remarks apply to the next two primitives: cells are converted into continuations only when necessary. | 26/126/51 | 
| E30E | [ref] IFELSEREF | f c - | Equivalent to PUSHREFCONTIFELSE. | 26/126/51 | 
| E30F | [ref] [ref] IFREFELSEREF | f - | Equivalent to PUSHREFCONTPUSHREFCONTIFELSE. | 126/51 | 
| E39_n | [n] IFBITJMP | x c - x | Checks whether bit 0 <= n <= 31is set in integerx, and if so, performsJMPXto continuationc. Valuexis left in the stack. | 26 | 
| E3B_n | [n] IFNBITJMP | x c - x | Jumps to cif bit0 <= n <= 31is not set in integerx. | 26 | 
| E3D_n | [ref] [n] IFBITJMPREF | x - x | Performs a JMPREFif bit0 <= n <= 31is set in integerx. | 126/51 | 
| E3F_n | [ref] [n] IFNBITJMPREF | x - x | Performs a JMPREFif bit0 <= n <= 31is not set in integerx. | 126/51 | 
| E4 | REPEAT | n c -  | Executes continuation  | 18 | 
| E5 | REPEATEND
REPEAT: | n -  | Similar to REPEAT, but it is applied to the current continuationcc. | 18 | 
| E6 | UNTIL | c -  | Executes continuation c, then pops an integerxfrom the resulting stack. Ifxis zero, performs another iteration of this loop. The actual implementation of this primitive involves an extraordinary continuationec_untilwith its arguments set to the body of the loop (continuationc) and the original current continuationcc. This extraordinary continuation is then saved into the savelist ofcasc.c0and the modifiedcis then executed. The other loop primitives are implemented similarly with the aid of suitable extraordinary continuations. | 18 | 
| E7 | UNTILEND
UNTIL: | - | Similar to UNTIL, but executes the current continuationccin a loop. When the loop exit condition is satisfied, performs aRET. | 18 | 
| E8 | WHILE | c' c -  | Executes c'and pops an integerxfrom the resulting stack. Ifxis zero, exists the loop and transfers control to the originalcc. Ifxis non-zero, executesc, and then begins a new iteration. | 18 | 
| E9 | WHILEEND | c' -  | Similar to WHILE, but uses the current continuationccas the loop body. | 18 | 
| EA | AGAIN | c -  | Similar to REPEAT, but executescinfinitely many times. ARETonly begins a new iteration of the infinite loop, which can be exited only by an exception, or aRETALT(or an explicitJMPX). | 18 | 
| EB | AGAINEND
AGAIN: | - | Similar to AGAIN, but performed with respect to the current continuationcc. | 18 | 
| E314 | REPEATBRK | n c - | Similar to REPEAT, but also setsc1to the originalccafter saving the old value ofc1into the savelist of the originalcc. In this wayRETALTcould be used to break out of the loop body. | 26 | 
| E315 | REPEATENDBRK | n - | Similar to REPEATEND, but also setsc1to the originalc0after saving the old value ofc1into the savelist of the originalc0. Equivalent toSAMEALTSAVEREPEATEND. | 26 | 
| E316 | UNTILBRK | c - | Similar to UNTIL, but also modifiesc1in the same way asREPEATBRK. | 26 | 
| E317 | UNTILENDBRK
UNTILBRK: | - | Equivalent to SAMEALTSAVEUNTILEND. | 26 | 
| E318 | WHILEBRK | c' c - | Similar to WHILE, but also modifiesc1in the same way asREPEATBRK. | 26 | 
| E319 | WHILEENDBRK | c - | Equivalent to SAMEALTSAVEWHILEEND. | 26 | 
| E31A | AGAINBRK | c - | Similar to AGAIN, but also modifiesc1in the same way asREPEATBRK. | 26 | 
| E31B | AGAINENDBRK
AGAINBRK: | - | Equivalent to SAMEALTSAVEAGAINEND. | 26 | 
| ECrn | [r] [n] SETCONTARGS | x_1 x_2...x_r c - c' | Pushes 0 <= r <= 15valuesx_1...x_rinto the stack of (a copy of) the continuationc, starting withx_1. Whennis 15 (-1 in Fift notation), does nothing withc.nargs. For0 <= n <= 14, setsc.nargsto the final size of the stack ofc'plusn. In other words, transformscinto a closure or a partially applied function, with0 <= n <= 14arguments missing. | 26+s'' | 
| ED0p | [p] RETURNARGS | - | Leaves only the top 0 <= p <= 15values in the current stack (somewhat similarly toONLYTOPX), with all the unused bottom values not discarded, but saved into continuationc0in the same way asSETCONTARGSdoes. | 26+s'' | 
| ED10 | RETURNVARARGS | p - | Similar to RETURNARGS, but with Integer0 <= p <= 255taken from the stack. | 26+s'' | 
| ED11 | SETCONTVARARGS | x_1 x_2...x_r c r n - c' | Similar to SETCONTARGS, but with0 <= r <= 255and-1 <= n <= 255taken from the stack. | 26+s'' | 
| ED12 | SETNUMVARARGS | c n - c' | 
 | 26 | 
| ED1E | BLESS | s - c | Transforms a Slice sinto a simple ordinary continuationc, withc.code=sand an empty stack and savelist. | 26 | 
| ED1F | BLESSVARARGS | x_1...x_r s r n - c | Equivalent to ROTBLESSROTREVSETCONTVARARGS. | 26+s'' | 
| EErn | [r] [n] BLESSARGS | x_1...x_r s - c | 
 | 26 | 
| ED4i | c[i] PUSHCTR
c[i] PUSH | - x | Pushes the current value of control register c(i). If the control register is not supported in the current codepage, or if it does not have a value, an exception is triggered. | 26 | 
| ED5i | c[i] POPCTR
c[i] POP | x -  | Pops a value xfrom the stack and stores it into control registerc(i), if supported in the current codepage. Notice that if a control register accepts only values of a specific type, a type-checking exception may occur. | 26 | 
| ED6i | c[i] SETCONT
c[i] SETCONTCTR | x c - c' | Stores xinto the savelist of continuationcasc(i), and returns the resulting continuationc'. Almost all operations with continuations may be expressed in terms ofSETCONTCTR,POPCTR, andPUSHCTR. | 26 | 
| ED7i | c[i] SETRETCTR | x -  | Equivalent to c0 PUSHCTRc[i] SETCONTCTRc0 POPCTR. | 26 | 
| ED8i | c[i] SETALTCTR | x -  | Equivalent to c1 PUSHCTRc[i] SETCONTCTRc1 POPCTR. | 26 | 
| ED9i | c[i] POPSAVE
c[i] POPCTRSAVE | x - | Similar to  | 26 | 
| EDAi | c[i] SAVE
c[i] SAVECTR |  | Saves the current value of c(i)into the savelist of continuationc0. If an entry forc[i]is already present in the savelist ofc0, nothing is done. Equivalent toc[i] PUSHCTRc[i] SETRETCTR. | 26 | 
| EDBi | c[i] SAVEALT
c[i] SAVEALTCTR |  | Similar to c[i] SAVE, but saves the current value ofc[i]into the savelist ofc1, notc0. | 26 | 
| EDCi | c[i] SAVEBOTH
c[i] SAVEBOTHCTR |  | Equivalent to c[i] SAVEc[i] SAVEALT. | 26 | 
| EDE0 | PUSHCTRX | i - x | Similar to  | 26 | 
| EDE1 | POPCTRX | x i -  | Similar to c[i] POPCTR, but with0 <= i <= 255from the stack. | 26 | 
| EDE2 | SETCONTCTRX | x c i - c' | Similar to c[i] SETCONTCTR, but with0 <= i <= 255from the stack. | 26 | 
| EDF0 | COMPOS
BOOLAND | c c' - c'' | Computes the composition compose0(c, c'), which has the meaning of ''performc, and, if successful, performc''' (ifcis a boolean circuit) or simply ''performc, thenc'''. Equivalent toSWAPc0 SETCONT. | 26 | 
| EDF1 | COMPOSALT
BOOLOR | c c' - c'' | Computes the alternative composition compose1(c, c'), which has the meaning of ''performc, and, if not successful, performc''' (ifcis a boolean circuit). Equivalent toSWAPc1 SETCONT. | 26 | 
| EDF2 | COMPOSBOTH | c c' - c'' | Computes composition compose1(compose0(c, c'), c'), which has the meaning of ''compute boolean circuitc, then computec', regardless of the result ofc''. | 26 | 
| EDF3 | ATEXIT | c -  | Sets c0tocompose0(c, c0). In other words,cwill be executed before exiting current subroutine. | 26 | 
| EDF4 | ATEXITALT | c -  | Sets c1tocompose1(c, c1). In other words,cwill be executed before exiting current subroutine by its alternative return path. | 26 | 
| EDF5 | SETEXITALT | c -  | Sets  | 26 | 
| EDF6 | THENRET | c - c' | Computes compose0(c, c0). | 26 | 
| EDF7 | THENRETALT | c - c' | Computes compose0(c, c1) | 26 | 
| EDF8 | INVERT | - | Interchanges c0andc1. | 26 | 
| EDF9 | BOOLEVAL | c - ? | Performs cc:=compose1(compose0(c, compose0(-1 PUSHINT, cc)), compose0(0 PUSHINT, cc)). Ifcrepresents a boolean circuit, the net effect is to evaluate it and push either-1or0into the stack before continuing. | 26 | 
| EDFA | SAMEALT | - | Sets c1toc0. Equivalent toc0 PUSHCTRc1 POPCTR. | 26 | 
| EDFB | SAMEALTSAVE | - | Sets  | 26 | 
| F0nn | [nn] CALL
[nn] CALLDICT | - nn | Calls the continuation in  |  | 
| F12_n | [n] CALL
[n] CALLDICT | - n | For 0 <= n < 2^14, an encoding of[n] CALLfor larger values ofn. |  | 
| F16_n | [n] JMP |  - n | Jumps to the continuation in  |  | 
| F1A_n | [n] PREPARE
[n] PREPAREDICT |  - n c | Equivalent to  |  | 
| Opcode | Fift syntax | Stack | Description | Gas | 
|---|---|---|---|---|
| F22_n | [n] THROW |  - 0 n | Throws exception  | 76 | 
| F26_n | [n] THROWIF | f -  | Throws exception 0 <= n <= 63with  parameter zero only if integerf!=0. | 26/76 | 
| F2A_n | [n] THROWIFNOT | f -  | Throws exception 0 <= n <= 63with parameter zero only if integerf=0. | 26/76 | 
| F2C4_n | [n] THROW | - 0 nn | For 0 <= n < 2^11, an encoding of[n] THROWfor larger values ofn. | 84 | 
| F2CC_n | [n] THROWARG | x - x nn | Throws exception 0 <= n <  2^11with parameterx, by copyingxandninto the stack ofc2and transferring control toc2. | 84 | 
| F2D4_n | [n] THROWIF | f -  | For 0 <= n < 2^11, an encoding of[n] THROWIFfor larger values ofn. | 34/84 | 
| F2DC_n | [n] THROWARGIF | x f -  | Throws exception 0 <= nn < 2^11with parameterxonly if integerf!=0. | 34/84 | 
| F2E4_n | [n] THROWIFNOT | f -  | For 0 <= n < 2^11, an encoding of[n] THROWIFNOTfor larger values ofn. | 34/84 | 
| F2EC_n | [n] THROWARGIFNOT | x f -  | Throws exception 0 <= n < 2^11with parameterxonly if integerf=0. | 34/84 | 
| F2F0 | THROWANY | n - 0 n | Throws exception  | 76 | 
| F2F1 | THROWARGANY | x n - x n | Throws exception  | 76 | 
| F2F2 | THROWANYIF | n f -  | Throws exception 0 <= n < 2^16with parameter zero only iff!=0. | 26/76 | 
| F2F3 | THROWARGANYIF | x n f -  | Throws exception 0 <= n<2^16with parameterxonly iff!=0. | 26/76 | 
| F2F4 | THROWANYIFNOT | n f -  | Throws exception 0 <= n<2^16with parameter zero only iff=0. | 26/76 | 
| F2F5 | THROWARGANYIFNOT | x n f -  | Throws exception 0 <= n<2^16with parameterxonly iff=0. | 26/76 | 
| F2FF | TRY | c c' -  | Sets c2toc', first saving the old value ofc2both into the savelist ofc'and into the savelist of the current continuation, which is stored intoc.c0andc'.c0. Then runscsimilarly toEXECUTE. Ifcdoes not throw any exceptions, the original value ofc2is automatically restored on return fromc. If an exception occurs, the execution is transferred toc', but the original value ofc2is restored in the process, so thatc'can re-throw the exception byTHROWANYif it cannot handle it by itself. | 26 | 
| F3pr | [p] [r] TRYARGS | c c' -  | Similar to  | 26 | 
| Opcode | Fift syntax | Stack | Description | Gas | 
|---|---|---|---|---|
| F400 | STDICT
STOPTREF | D b - b' | Stores dictionary  | 26 | 
| F401 | SKIPDICT
SKIPOPTREF | s - s' | Equivalent to LDDICTNIP. | 26 | 
| F402 | LDDICTS | s - s' s'' | Loads (parses) a (Slice-represented) dictionary  | 26 | 
| F403 | PLDDICTS | s - s' | Preloads a (Slice-represented) dictionary  | 26 | 
| F404 | LDDICT
LDOPTREF | s - D s' | Loads (parses) a dictionary Dfrom Slices, and returns the remainder ofsass'. May be applied to dictionaries or to values of arbitrary(^Y)?types. | 26 | 
| F405 | PLDDICT
PLDOPTREF | s - D | Preloads a dictionary  | 26 | 
| F406 | LDDICTQ | s - D s' -1 or s 0 | A quiet version of LDDICT. | 26 | 
| F407 | PLDDICTQ | s - D -1 or 0 | A quiet version of PLDDICT. | 26 | 
| F40A | DICTGET | k D n - x -1 or 0 | Looks up key  |  | 
| F40B | DICTGETREF | k D n - c -1 or 0 | Similar to  |  | 
| F40C | DICTIGET | i D n - x -1 or 0 | Similar to DICTGET, but with a signed (big-endian)n-bit Integerias a key. Ifidoes not fit intonbits, returns0. Ifiis aNaN, throws an integer overflow exception. |  | 
| F40D | DICTIGETREF | i D n - c -1 or 0 | Combines DICTIGETwithDICTGETREF: it uses signedn-bit Integerias a key and returns a Cell instead of a Slice on success. |  | 
| F40E | DICTUGET | i D n - x -1 or 0 | Similar to DICTIGET, but with unsigned (big-endian)n-bit Integeriused as a key. |  | 
| F40F | DICTUGETREF | i D n - c -1 or 0 | Similar to DICTIGETREF, but with an unsignedn-bit Integer keyi. |  | 
| F412 | DICTSET | x k D n - D' | Sets the value associated with n-bit keyk(represented by a Slice as inDICTGET) in dictionaryD(also represented by a Slice) to valuex(again a Slice), and returns the resulting dictionary asD'. |  | 
| F413 | DICTSETREF | c k D n - D' | Similar to DICTSET, but with the value set to a reference to Cellc. |  | 
| F414 | DICTISET | x i D n - D' | Similar to DICTSET, but with the key represented by a (big-endian) signedn-bit integeri. Ifidoes not fit intonbits, a range check exception is generated. |  | 
| F415 | DICTISETREF | c i D n - D' | Similar to DICTSETREF, but with the key a signedn-bit integer as inDICTISET. |  | 
| F416 | DICTUSET | x i D n - D' | Similar to DICTISET, but withian unsignedn-bit integer. |  | 
| F417 | DICTUSETREF | c i D n - D' | Similar to DICTISETREF, but withiunsigned. |  | 
| F41A | DICTSETGET | x k D n - D' y -1 or D' 0 | Combines DICTSETwithDICTGET: it sets the value corresponding to keyktox, but also returns the old valueyassociated with the key in question, if present. |  | 
| F41B | DICTSETGETREF | c k D n - D' c' -1 or D' 0 | Combines DICTSETREFwithDICTGETREFsimilarly toDICTSETGET. |  | 
| F41C | DICTISETGET | x i D n - D' y -1 or D' 0 | DICTISETGET, but withia signedn-bit integer. |  | 
| F41D | DICTISETGETREF | c i D n - D' c' -1 or D' 0 | DICTISETGETREF, but withia signedn-bit integer. |  | 
| F41E | DICTUSETGET | x i D n - D' y -1 or D' 0 | DICTISETGET, but withian unsignedn-bit integer. |  | 
| F41F | DICTUSETGETREF | c i D n - D' c' -1 or D' 0 | DICTISETGETREF, but withian unsignedn-bit integer. |  | 
| F422 | DICTREPLACE | x k D n - D' -1 or D 0 | A Replace operation, which is similar to DICTSET, but sets the value of keykin dictionaryDtoxonly if the keykwas already present inD. |  | 
| F423 | DICTREPLACEREF | c k D n - D' -1 or D 0 | A Replace counterpart of DICTSETREF. |  | 
| F424 | DICTIREPLACE | x i D n - D' -1 or D 0 | DICTREPLACE, but withia signedn-bit integer. |  | 
| F425 | DICTIREPLACEREF | c i D n - D' -1 or D 0 | DICTREPLACEREF, but withia signedn-bit integer. |  | 
| F426 | DICTUREPLACE | x i D n - D' -1 or D 0 | DICTREPLACE, but withian unsignedn-bit integer. |  | 
| F427 | DICTUREPLACEREF | c i D n - D' -1 or D 0 | DICTREPLACEREF, but withian unsignedn-bit integer. |  | 
| F42A | DICTREPLACEGET | x k D n - D' y -1 or D 0 | A Replace counterpart of DICTSETGET: on success, also returns the old value associated with the key in question. |  | 
| F42B | DICTREPLACEGETREF | c k D n - D' c' -1 or D 0 | A Replace counterpart of DICTSETGETREF. |  | 
| F42C | DICTIREPLACEGET | x i D n - D' y -1 or D 0 | DICTREPLACEGET, but withia signedn-bit integer. |  | 
| F42D | DICTIREPLACEGETREF | c i D n - D' c' -1 or D 0 | DICTREPLACEGETREF, but withia signedn-bit integer. |  | 
| F42E | DICTUREPLACEGET | x i D n - D' y -1 or D 0 | DICTREPLACEGET, but withian unsignedn-bit integer. |  | 
| F42F | DICTUREPLACEGETREF | c i D n - D' c' -1 or D 0 | DICTREPLACEGETREF, but withian unsignedn-bit integer. |  | 
| F432 | DICTADD | x k D n - D' -1 or D 0 | An Add counterpart of DICTSET: sets the value associated with keykin dictionaryDtox, but only if it is not already present inD. |  | 
| F433 | DICTADDREF | c k D n - D' -1 or D 0 | An Add counterpart of DICTSETREF. |  | 
| F434 | DICTIADD | x i D n - D' -1 or D 0 | DICTADD, but withia signedn-bit integer. |  | 
| F435 | DICTIADDREF | c i D n - D' -1 or D 0 | DICTADDREF, but withia signedn-bit integer. |  | 
| F436 | DICTUADD | x i D n - D' -1 or D 0 | DICTADD, but withian unsignedn-bit integer. |  | 
| F437 | DICTUADDREF | c i D n - D' -1 or D 0 | DICTADDREF, but withian unsignedn-bit integer. |  | 
| F43A | DICTADDGET | x k D n - D' -1 or D y 0 | An Add counterpart of DICTSETGET: sets the value associated with keykin dictionaryDtox, but only if keykis not already present inD. Otherwise, just returns the old valueywithout changing the dictionary. |  | 
| F43B | DICTADDGETREF | c k D n - D' -1 or D c' 0 | An Add counterpart of DICTSETGETREF. |  | 
| F43C | DICTIADDGET | x i D n - D' -1 or D y 0 | DICTADDGET, but withia signedn-bit integer. |  | 
| F43D | DICTIADDGETREF | c i D n - D' -1 or D c' 0 | DICTADDGETREF, but withia signedn-bit integer. |  | 
| F43E | DICTUADDGET | x i D n - D' -1 or D y 0 | DICTADDGET, but withian unsignedn-bit integer. |  | 
| F43F | DICTUADDGETREF | c i D n - D' -1 or D c' 0 | DICTADDGETREF, but withian unsignedn-bit integer. |  | 
| F441 | DICTSETB | b k D n - D' |  | |
| F442 | DICTISETB | b i D n - D' |  | |
| F443 | DICTUSETB | b i D n - D' |  | |
| F445 | DICTSETGETB | b k D n - D' y -1 or D' 0 |  | |
| F446 | DICTISETGETB | b i D n - D' y -1 or D' 0 |  | |
| F447 | DICTUSETGETB | b i D n - D' y -1 or D' 0 |  | |
| F449 | DICTREPLACEB | b k D n - D' -1 or D 0 |  | |
| F44A | DICTIREPLACEB | b i D n - D' -1 or D 0 |  | |
| F44B | DICTUREPLACEB | b i D n - D' -1 or D 0 |  | |
| F44D | DICTREPLACEGETB | b k D n - D' y -1 or D 0 |  | |
| F44E | DICTIREPLACEGETB | b i D n - D' y -1 or D 0 |  | |
| F44F | DICTUREPLACEGETB | b i D n - D' y -1 or D 0 |  | |
| F451 | DICTADDB | b k D n - D' -1 or D 0 |  | |
| F452 | DICTIADDB | b i D n - D' -1 or D 0 |  | |
| F453 | DICTUADDB | b i D n - D' -1 or D 0 |  | |
| F455 | DICTADDGETB | b k D n - D' -1 or D y 0 |  | |
| F456 | DICTIADDGETB | b i D n - D' -1 or D y 0 |  | |
| F457 | DICTUADDGETB | b i D n - D' -1 or D y 0 |  | |
| F459 | DICTDEL | k D n - D' -1 or D 0 | Deletes n-bit key, represented by a Slicek, from dictionaryD. If the key is present, returns the modified dictionaryD'and the success flag-1. Otherwise, returns the original dictionaryDand0. |  | 
| F45A | DICTIDEL | i D n - D' ? | A version of DICTDELwith the key represented by a signedn-bit Integeri. Ifidoes not fit intonbits, simply returnsD0(''key not found, dictionary unmodified''). |  | 
| F45B | DICTUDEL | i D n - D' ? | Similar to DICTIDEL, but withian unsignedn-bit integer. |  | 
| F462 | DICTDELGET | k D n - D' x -1 or D 0 | Deletes n-bit key, represented by a Slicek, from dictionaryD. If the key is present, returns the modified dictionaryD', the original valuexassociated with the keyk(represented by a Slice), and the success flag-1. Otherwise, returns the original dictionaryDand0. |  | 
| F463 | DICTDELGETREF | k D n - D' c -1 or D 0 | Similar to DICTDELGET, but withLDREFENDSapplied toxon success, so that the value returnedcis a Cell. |  | 
| F464 | DICTIDELGET | i D n - D' x -1 or D 0 | DICTDELGET, but withia signedn-bit integer. |  | 
| F465 | DICTIDELGETREF | i D n - D' c -1 or D 0 | DICTDELGETREF, but withia signedn-bit integer. |  | 
| F466 | DICTUDELGET | i D n - D' x -1 or D 0 | DICTDELGET, but withian unsignedn-bit integer. |  | 
| F467 | DICTUDELGETREF | i D n - D' c -1 or D 0 | DICTDELGETREF, but withian unsignedn-bit integer. |  | 
| F469 | DICTGETOPTREF | k D n - c^? | A variant of DICTGETREFthat returns Null instead of the valuec^?if the keykis absent from dictionaryD. |  | 
| F46A | DICTIGETOPTREF | i D n - c^? | DICTGETOPTREF, but withia signedn-bit integer. If the keyiis out of range, also returns Null. |  | 
| F46B | DICTUGETOPTREF | i D n - c^? | DICTGETOPTREF, but withian unsignedn-bit integer. If the keyiis out of range, also returns Null. |  | 
| F46D | DICTSETGETOPTREF | c^? k D n - D' ~c^? | A variant of both DICTGETOPTREFandDICTSETGETREFthat sets the value corresponding to keykin dictionaryDtoc^?(ifc^?is Null, then the key is deleted instead), and returns the old value~c^?(if the keykwas absent before, returns Null instead). |  | 
| F46E | DICTISETGETOPTREF | c^? i D n - D' ~c^? | Similar to primitive DICTSETGETOPTREF, but using signedn-bit Integerias a key. Ifidoes not fit intonbits, throws a range checking exception. |  | 
| F46F | DICTUSETGETOPTREF | c^? i D n - D' ~c^? | Similar to primitive DICTSETGETOPTREF, but using unsignedn-bit Integerias a key. |  | 
| F470 | PFXDICTSET | x k D n - D' -1 or D 0 |  | |
| F471 | PFXDICTREPLACE | x k D n - D' -1 or D 0 |  | |
| F472 | PFXDICTADD | x k D n - D' -1 or D 0 |  | |
| F473 | PFXDICTDEL | k D n - D' -1 or D 0 |  | |
| F474 | DICTGETNEXT | k D n - x' k' -1 or 0 | Computes the minimal key k'in dictionaryDthat is lexicographically greater thank, and returnsk'(represented by a Slice) along with associated valuex'(also represented by a Slice). |  | 
| F475 | DICTGETNEXTEQ | k D n - x' k' -1 or 0 | Similar to DICTGETNEXT, but computes the minimal keyk'that is lexicographically greater than or equal tok. |  | 
| F476 | DICTGETPREV | k D n - x' k' -1 or 0 | Similar to DICTGETNEXT, but computes the maximal keyk'lexicographically smaller thank. |  | 
| F477 | DICTGETPREVEQ | k D n - x' k' -1 or 0 | Similar to DICTGETPREV, but computes the maximal keyk'lexicographically smaller than or equal tok. |  | 
| F478 | DICTIGETNEXT | i D n - x' i' -1 or 0 | Similar to DICTGETNEXT, but interprets all keys in dictionaryDas big-endian signedn-bit integers, and computes the minimal keyi'that is larger than Integeri(which does not necessarily fit intonbits). |  | 
| F479 | DICTIGETNEXTEQ | i D n - x' i' -1 or 0 | Similar to DICTGETNEXTEQ, but interprets keys as signedn-bit integers. |  | 
| F47A | DICTIGETPREV | i D n - x' i' -1 or 0 | Similar to DICTGETPREV, but interprets keys as signedn-bit integers. |  | 
| F47B | DICTIGETPREVEQ | i D n - x' i' -1 or 0 | Similar to DICTGETPREVEQ, but interprets keys as signedn-bit integers. |  | 
| F47C | DICTUGETNEXT | i D n - x' i' -1 or 0 | Similar to DICTGETNEXT, but interprets all keys in dictionaryDas big-endian unsignedn-bit integers, and computes the minimal keyi'that is larger than Integeri(which does not necessarily fit intonbits, and is not necessarily non-negative). |  | 
| F47D | DICTUGETNEXTEQ | i D n - x' i' -1 or 0 | Similar to DICTGETNEXTEQ, but interprets keys as unsignedn-bit integers. |  | 
| F47E | DICTUGETPREV | i D n - x' i' -1 or 0 | Similar to DICTGETPREV, but interprets keys as unsignedn-bit integers. |  | 
| F47F | DICTUGETPREVEQ | i D n - x' i' -1 or 0 | Similar to DICTGETPREVEQ, but interprets keys a unsignedn-bit integers. |  | 
| F482 | DICTMIN | D n - x k -1 or 0 | Computes the minimal key k(represented by a Slice withndata bits) in dictionaryD, and returnskalong with the associated valuex. |  | 
| F483 | DICTMINREF | D n - c k -1 or 0 | Similar to DICTMIN, but returns the only reference in the value as a Cellc. |  | 
| F484 | DICTIMIN | D n - x i -1 or 0 | Similar to DICTMIN, but computes the minimal keyiunder the assumption that all keys are big-endian signedn-bit integers. Notice that the key and value returned may differ from those computed byDICTMINandDICTUMIN. |  | 
| F485 | DICTIMINREF | D n - c i -1 or 0 | Similar to DICTIMIN, but returns the only reference in the value. |  | 
| F486 | DICTUMIN | D n - x i -1 or 0 | Similar to DICTMIN, but returns the key as an unsignedn-bit Integeri. |  | 
| F487 | DICTUMINREF | D n - c i -1 or 0 | Similar to DICTUMIN, but returns the only reference in the value. |  | 
| F48A | DICTMAX | D n - x k -1 or 0 | Computes the maximal key k(represented by a Slice withndata bits) in dictionaryD, and returnskalong with the associated valuex. |  | 
| F48B | DICTMAXREF | D n - c k -1 or 0 | Similar to DICTMAX, but returns the only reference in the value. |  | 
| F48C | DICTIMAX | D n - x i -1 or 0 | Similar to DICTMAX, but computes the maximal keyiunder the assumption that all keys are big-endian signedn-bit integers. Notice that the key and value returned may differ from those computed byDICTMAXandDICTUMAX. |  | 
| F48D | DICTIMAXREF | D n - c i -1 or 0 | Similar to DICTIMAX, but returns the only reference in the value. |  | 
| F48E | DICTUMAX | D n - x i -1 or 0 | Similar to DICTMAX, but returns the key as an unsignedn-bit Integeri. |  | 
| F48F | DICTUMAXREF | D n - c i -1 or 0 | Similar to DICTUMAX, but returns the only reference in the value. |  | 
| F492 | DICTREMMIN | D n - D' x k -1 or D 0 | Computes the minimal key k(represented by a Slice withndata bits) in dictionaryD, removeskfrom the dictionary, and returnskalong with the associated valuexand the modified dictionaryD'. |  | 
| F493 | DICTREMMINREF | D n - D' c k -1 or D 0 | Similar to DICTREMMIN, but returns the only reference in the value as a Cellc. |  | 
| F494 | DICTIREMMIN | D n - D' x i -1 or D 0 | Similar to DICTREMMIN, but computes the minimal keyiunder the assumption that all keys are big-endian signedn-bit integers. Notice that the key and value returned may differ from those computed byDICTREMMINandDICTUREMMIN. |  | 
| F495 | DICTIREMMINREF | D n - D' c i -1 or D 0 | Similar to DICTIREMMIN, but returns the only reference in the value. |  | 
| F496 | DICTUREMMIN | D n - D' x i -1 or D 0 | Similar to DICTREMMIN, but returns the key as an unsignedn-bit Integeri. |  | 
| F497 | DICTUREMMINREF | D n - D' c i -1 or D 0 | Similar to DICTUREMMIN, but returns the only reference in the value. |  | 
| F49A | DICTREMMAX | D n - D' x k -1 or D 0 | Computes the maximal key k(represented by a Slice withndata bits) in dictionaryD, removeskfrom the dictionary, and returnskalong with the associated valuexand the modified dictionaryD'. |  | 
| F49B | DICTREMMAXREF | D n - D' c k -1 or D 0 | Similar to DICTREMMAX, but returns the only reference in the value as a Cellc. |  | 
| F49C | DICTIREMMAX | D n - D' x i -1 or D 0 | Similar to DICTREMMAX, but computes the minimal keyiunder the assumption that all keys are big-endian signedn-bit integers. Notice that the key and value returned may differ from those computed byDICTREMMAXandDICTUREMMAX. |  | 
| F49D | DICTIREMMAXREF | D n - D' c i -1 or D 0 | Similar to DICTIREMMAX, but returns the only reference in the value. |  | 
| F49E | DICTUREMMAX | D n - D' x i -1 or D 0 | Similar to DICTREMMAX, but returns the key as an unsignedn-bit Integeri. |  | 
| F49F | DICTUREMMAXREF | D n - D' c i -1 or D 0 | Similar to DICTUREMMAX, but returns the only reference in the value. |  | 
| F4A0 | DICTIGETJMP | i D n -  | Similar to DICTIGET, but withxBLESSed into a continuation with a subsequentJMPXto it on success. On failure, does nothing. This is useful for implementingswitch/caseconstructions. |  | 
| F4A1 | DICTUGETJMP | i D n -  | Similar to DICTIGETJMP, but performsDICTUGETinstead ofDICTIGET. |  | 
| F4A2 | DICTIGETEXEC | i D n -  | Similar to DICTIGETJMP, but withEXECUTEinstead ofJMPX. |  | 
| F4A3 | DICTUGETEXEC | i D n -  | Similar to DICTUGETJMP, but withEXECUTEinstead ofJMPX. |  | 
| F4A6_n | [ref] [n] DICTPUSHCONST |  - D n | Pushes a non-empty constant dictionary D(as aCell^?) along with its key length0 <= n <= 1023, stored as a part of the instruction. The dictionary itself is created from the first of remaining references of the current continuation. In this way, the completeDICTPUSHCONSTinstruction can be obtained by first serializingxF4A4_, then the non-empty dictionary itself (one1bit and a cell reference), and then the unsigned 10-bit integern(as if by aSTU 10instruction). An empty dictionary can be pushed by aNEWDICTprimitive instead. | 34 | 
| F4A8 | PFXDICTGETQ | s D n - s' x s'' -1 or s 0 | Looks up the unique prefix of Slice spresent in the prefix code dictionary represented byCell^?Dand0 <= n <= 1023. If found, the prefix ofsis returned ass', and the corresponding value (also a Slice) asx. The remainder ofsis returned as a Slices''. If no prefix ofsis a key in prefix code dictionaryD, returns the unchangedsand a zero flag to indicate failure. |  | 
| F4A9 | PFXDICTGET | s D n - s' x s'' | Similar to PFXDICTGET, but throws a cell deserialization failure exception on failure. |  | 
| F4AA | PFXDICTGETJMP | s D n - s' s'' or s | Similar to PFXDICTGETQ, but on successBLESSes the valuexinto a Continuation and transfers control to it as if by aJMPX. On failure, returnssunchanged and continues execution. |  | 
| F4AB | PFXDICTGETEXEC | s D n - s' s'' | Similar to PFXDICTGETJMP, butEXECutes the continuation found instead of jumping to it. On failure, throws a cell deserialization exception. |  | 
| F4AE_n | [ref] [n] PFXDICTCONSTGETJMP
[ref] [n] PFXDICTSWITCH | s - s' s'' or s | Combines [n] DICTPUSHCONSTfor0 <= n <= 1023withPFXDICTGETJMP. |  | 
| F4BC | DICTIGETJMPZ | i D n - i or nothing | A variant of DICTIGETJMPthat returns indexion failure. |  | 
| F4BD | DICTUGETJMPZ | i D n - i or nothing | A variant of DICTUGETJMPthat returns indexion failure. |  | 
| F4BE | DICTIGETEXECZ | i D n - i or nothing | A variant of DICTIGETEXECthat returns indexion failure. |  | 
| F4BF | DICTUGETEXECZ | i D n - i or nothing | A variant of DICTUGETEXECthat returns indexion failure. |  | 
| F4B1 | SUBDICTGET | k l D n - D' | Constructs a subdictionary consisting of all keys beginning with prefix k(represented by a Slice, the first0 <= l <= n <= 1023data bits of which are used as a key) of lengthlin dictionaryDof typeHashmapE(n,X)withn-bit keys. On success, returns the new subdictionary of the same typeHashmapE(n,X)as a SliceD'. |  | 
| F4B2 | SUBDICTIGET | x l D n - D' | Variant of SUBDICTGETwith the prefix represented by a signed big-endianl-bit Integerx, where necessarilyl <= 257. |  | 
| F4B3 | SUBDICTUGET | x l D n - D' | Variant of SUBDICTGETwith the prefix represented by an unsigned big-endianl-bit Integerx, where necessarilyl <= 256. |  | 
| F4B5 | SUBDICTRPGET | k l D n - D' | Similar to SUBDICTGET, but removes the common prefixkfrom all keys of the new dictionaryD', which becomes of typeHashmapE(n-l,X). |  | 
| F4B6 | SUBDICTIRPGET | x l D n - D' | Variant of SUBDICTRPGETwith the prefix represented by a signed big-endianl-bit Integerx, where necessarilyl <= 257. |  | 
| F4B7 | SUBDICTURPGET | x l D n - D' | Variant of SUBDICTRPGETwith the prefix represented by an unsigned big-endianl-bit Integerx, where necessarilyl <= 256. |  | 
| Opcode | Fift syntax | Stack | Description | Gas | 
|---|---|---|---|---|
| F800 | ACCEPT | - | Sets current gas limit  | 26 | 
| F801 | SETGASLIMIT | g -  | Sets current gas limit g_lto the minimum ofgandg_m, and resets the gas creditg_cto zero. If the gas consumed so far (including the present instruction) exceeds the resulting value ofg_l, an (unhandled) out of gas exception is thrown before setting new gas limits. Notice thatSETGASLIMITwith an argumentg >= 2^63-1is equivalent toACCEPT. | 26 | 
| F807 | GASCONSUMED | - g_c | Returns gas consumed by VM so far (including this instruction). | 26 | 
| F80F | COMMIT | - | Commits the current state of registers c4(''persistent data'') andc5(''actions'') so that the current execution is considered ''successful'' with the saved values even if an exception is thrown later. | 26 | 
| F810 | RANDU256 | - x | Generates a new pseudo-random unsigned 256-bit Integer x. The algorithm is as follows: ifris the old value of the random seed, considered as a 32-byte array (by constructing the big-endian representation of an unsigned 256-bit integer), then itssha512(r)is computed; the first 32 bytes of this hash are stored as the new valuer'of the random seed, and the remaining 32 bytes are returned as the next random valuex. | 26+|c7|+|c1_1| | 
| F811 | RAND | y - z | Generates a new pseudo-random integer  | 26+|c7|+|c1_1| | 
| F814 | SETRAND | x -  | Sets the random seed to unsigned 256-bit Integer x. | 26+|c7|+|c1_1| | 
| F815 | ADDRAND
RANDOMIZE | x -  | Mixes unsigned 256-bit Integer xinto the random seedrby setting the random seed toShaof the concatenation of two 32-byte strings: the first with the big-endian representation of the old seedr, and the second with the big-endian representation ofx. | 26 | 
| F82i | [i] GETPARAM |  - x | Returns the  | 26 | 
| F830 | CONFIGDICT |  - D 32 | Returns the global configuration dictionary along with its key length (32).
Equivalent to  | 26 | 
| F832 | CONFIGPARAM | i - c -1 or 0 | Returns the value of the global configuration parameter with integer index  |  | 
| F833 | CONFIGOPTPARAM | i - c^? | Returns the value of the global configuration parameter with integer index  |  | 
| F83400 | PREVMCBLOCKS | - t | Retrives last_mc_blockspart of PrevBlocksInfo from c7 (parameter 13). |  | 
| F83401 | PREVKEYBLOCK | - t | Retrives prev_key_blockpart of PrevBlocksInfo from c7 (parameter 13). |  | 
| F835 | GLOBALID | - i | Retrieves global_idfrom 19 network config. |  | 
| F836 | GETGASFEE | gas_used is_mc - price | Calculates gas fee |  | 
| F837 | GETSTORAGEFEE | cells bits seconds is_mc - price | Calculates storage fees (only current StoragePrices entry is used). |  | 
| F838 | GETFORWARDFEE | cells bits is_mc - price | Calculates forward fee. |  | 
| F839 | GETPRECOMPILEDGAS | - x | Returns gas usage for the current contract if it is precompiled, nullotherwise. |  | 
| F83A | GETORIGINALFWDFEE | fwd_fee is_mc - orig_fwd_fee | Calculate fwd_fee * 2^16 / first_frac. Can be used to get the originalfwd_feeof the message. |  | 
| F83B | GETGASFEESIMPLE | gas_used is_mc - price | Same as GETGASFEE, but without flat price (just(gas_used * price) / 2^16). |  | 
| F83C | GETFORWARDFEESIMPLE | cells bits is_mc - price | Same as GETFORWARDFEE, but without lump price (just (bits*bit_price + cells*cell_price) / 2^16). |  | 
| F840 | GETGLOBVAR | k - x | Returns the  | 26 | 
| F85_k | [k] GETGLOB |  - x | Returns the  | 26 | 
| F860 | SETGLOBVAR | x k -  | Assigns  | 26+|c7'| | 
| F87_k | [k] SETGLOB | x -  | Assigns  | 26+|c7'| | 
| F900 | HASHCU | c - x | Computes the representation hash of a Cell cand returns it as a 256-bit unsigned integerx. Useful for signing and checking signatures of arbitrary entities represented by a tree of cells. | 26 | 
| F901 | HASHSU | s - x | Computes the hash of a Slice sand returns it as a 256-bit unsigned integerx. The result is the same as if an ordinary cell containing only data and references fromshad been created and its hash computed byHASHCU. | 526 | 
| F902 | SHA256U | s - x | Computes Shaof the data bits of Slices. If the bit length ofsis not divisible by eight, throws a cell underflow exception. The hash value is returned as a 256-bit unsigned integerx. | 26 | 
| F90400 | HASHEXT_SHA256 | s_1 ... s_n n - h | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/33 gas per byte | 
| F90401 | HASHEXT_SHA512 | s_1 ... s_n n - h1 h2 | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/16 gas per byte | 
| F90402 | HASHEXT_BLAKE2B | s_1 ... s_n n - h1 h2 | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/19 gas per byte | 
| F90403 | HASHEXT_KECCAK256 | s_1 ... s_n n - h | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/11 gas per byte | 
| F90404 | HASHEXT_KECCAK512 | s_1 ... s_n n - h1 h2 | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/19 gas per byte | 
| F90500 | HASHEXTR_SHA256 | s_n ... s_1 n - h | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/33 gas per byte | 
| F90501 | HASHEXTR_SHA512 | s_n ... s_1 n - h1 h2 | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/16 gas per byte | 
| F90502 | HASHEXTR_BLAKE2B | s_n ... s_1 n - h1 h2 | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/19 gas per byte | 
| F90503 | HASHEXTR_KECCAK256 | s_n ... s_1 n - h | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/11 gas per byte | 
| F90504 | HASHEXTR_KECCAK512 | s_n ... s_1 n - h1 h2 | Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n. | 1/19 gas per byte | 
| F90600 | HASHEXTA_SHA256 | b s_1 ... s_n n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/33 gas per byte | 
| F90601 | HASHEXTA_SHA512 | b s_1 ... s_n n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/16 gas per byte | 
| F90602 | HASHEXTA_BLAKE2B | b s_1 ... s_n n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/19 gas per byte | 
| F90603 | HASHEXTA_KECCAK256 | b s_1 ... s_n n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/11 gas per byte | 
| F90604 | HASHEXTA_KECCAK512 | b s_1 ... s_n n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/6 gas per byte | 
| F90700 | HASHEXTAR_SHA256 | b s_1 ... s_n n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/33 gas per byte | 
| F90701 | HASHEXTAR_SHA512 | b s_n ... s_1 n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/16 gas per byte | 
| F90702 | HASHEXTAR_BLAKE2B | b s_n ... s_1 n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/19 gas per byte | 
| F90703 | HASHEXTAR_KECCAK256 | b s_n ... s_1 n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/11 gas per byte | 
| F90704 | HASHEXTAR_KECCAK512 | b s_n ... s_1 n - b' | Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builderb. | 1/6 gas per byte | 
| F910 | CHKSIGNU | h s k - ? | Checks the Ed25519-signature  | 26 | 
| F911 | CHKSIGNS | d s k - ? | Checks whether sis a valid Ed25519-signature of the data portion of Slicedusing public keyk, similarly toCHKSIGNU. If the bit length of Slicedis not divisible by eight, throws a cell underflow exception. The verification of Ed25519 signatures is the standard one, withShaused to reducedto the 256-bit number that is actually signed. | 26 | 
| F912 | ECRECOVER | hash v r s - 0 or h x1 x2 -1 | Recovers public key from signature, identical to Bitcoin/Ethereum operations. Takes 32-byte hash as uint256 hash; 65-byte signature as uint8vand uint256r,s. Returns0on failure, public key and-1on success. 65-byte public key is returned as uint8h, uint256x1,x2. | 1526 | 
| F914 | P256_CHKSIGNU | h sig k - ? | Checks seck256r1-signature sigof a numberh(a 256-bit unsigned integer, usually computed as the hash of some data) and public keyk. Returns -1 on success, 0 on failure. Public key is a 33-byte slice (encoded according to Sec. 2.3.4 point 2 of SECG SEC 1). Signaturesigis a 64-byte slice (two 256-bit unsigned integersrands). | 3526 | 
| F915 | P256_CHKSIGNS | d sig k - ? | Checks seck256r1-signature sigof data portion of slicedand public keyk. Returns -1 on success, 0 on failure. Public key is a 33-byte slice (encoded according to Sec. 2.3.4 point 2 of SECG SEC 1). Signaturesigis a 64-byte slice (two 256-bit unsigned integersrands). | 3526 | 
| F920 | RIST255_FROMHASH | h1 h2 - x | Deterministically generates a valid point xfrom a 512-bit hash (given as two 256-bit integers). | 626 | 
| F921 | RIST255_VALIDATE | x - | Checks that integer xis a valid representation of some curve point. Throws range_chk on error. | 226 | 
| F922 | RIST255_ADD | x y - x+y | Addition of two points on a curve. | 626 | 
| F923 | RIST255_SUB | x y - x-y | Subtraction of two points on curve. | 626 | 
| F924 | RIST255_MUL | x n - x*n | Multiplies point xby a scalarn. Anynis valid, including negative. | 2026 | 
| F925 | RIST255_MULBASE | n - g*n | Multiplies the generator point gby a scalarn. Anynis valid, including negative. | 776 | 
| F926 | RIST255_PUSHL | - l | Pushes integer l=2^252+27742317777372353535851937790883648493, which is the order of the group. | 26 | 
| B7F921 | RIST255_QVALIDATE | x - 0 or -1 | Checks that integer xis a valid representation of some curve point. Returns -1 on success and 0 on failure. | 234 | 
| B7F922 | RIST255_QADD | x y - 0 or x+y -1 | Addition of two points on a curve. Returns -1 on success and 0 on failure. | 634 | 
| B7F923 | RIST255_QSUB | x y - 0 or x-y -1 | Subtraction of two points on curve. Returns -1 on success and 0 on failure. | 634 | 
| B7F924 | RIST255_QMUL | x n - 0 or x*n -1 | Multiplies point xby a scalarn. Anynis valid, including negative. Returns -1 on success and 0 on failure. | 2034 | 
| B7F925 | RIST255_QMULBASE | n - 0 or g*n -1 | Multiplies the generator point gby a scalarn. Anynis valid, including negative. | 784 | 
| F93000 | BLS_VERIFY | pk msg sgn - bool | Checks BLS signature, return true on success, false otherwise. | 61034 | 
| F93001 | BLS_AGGREGATE | sig_1 ... sig_n n - sig | Aggregates signatures. n>0. Throw exception ifn=0or if somesig_iis not a valid signature. | n*4350-2616 | 
| F93002 | BLS_FASTAGGREGATEVERIFY | pk_1 ... pk_n n msg sig - bool | Checks aggregated BLS signature for keys pk_1...pk_nand messagemsg. Return true on success, false otherwise. Return false ifn=0. | 58034+n*3000 | 
| F93003 | BLS_AGGREGATEVERIFY | pk_1 msg_1 ... pk_n msg_n n sgn - bool | Checks aggregated BLS signature for key-message pairs pk_1 msg_1...pk_n msg_n. Return true on success, false otherwise. Return false ifn=0. | 38534+n*22500 | 
| F93010 | BLS_G1_ADD | x y - x+y | Addition on G1. | 3934 | 
| F93011 | BLS_G1_SUB | x y - x-y | Subtraction on G1. | 3934 | 
| F93012 | BLS_G1_NEG | x - -x | Negation on G1. | 784 | 
| F93013 | BLS_G1_MUL | x s - x*s | Multiplies G1 point xby scalars. Anysis valid, including negative. | 5234 | 
| F93014 | BLS_G1_MULTIEXP | x_1 s_1 ... x_n s_n n - x_1*s_1+...+x_n*s_n | Calculates x_1*s_1+...+x_n*s_nfor G1 pointsx_iand scalarss_i. Returns zero point ifn=0. Anys_iis valid, including negative. | 11409+n*630+n/floor(max(log2(n),4))*8820 | 
| F93015 | BLS_G1_ZERO | - zero | Pushes zero point in G1. | 34 | 
| F93016 | BLS_MAP_TO_G1 | f - x | Converts FP element fto a G1 point. | 2384 | 
| F93017 | BLS_G1_INGROUP | x - bool | Checks that slice xrepresents a valid element of G1. | 2984 | 
| F93018 | BLS_G1_ISZERO | x - bool | Checks that G1 point xis equal to zero. | 34 | 
| F93020 | BLS_G2_ADD | x y - x+y | Addition on G2. | 6134 | 
| F93021 | BLS_G2_SUB | x y - x-y | Subtraction on G2. | 6134 | 
| F93022 | BLS_G2_NEG | x - -x | Negation on G2. | 1584 | 
| F93023 | BLS_G2_MUL | x s - x*s | Multiplies G2 point xby scalars. Anysis valid, including negative. | 10584 | 
| F93024 | BLS_G2_MULTIEXP | x_1 s_1 ... x_n s_n n - x_1*s_1+...+x_n*s_n | Calculates x_1*s_1+...+x_n*s_nfor G2 pointsx_iand scalarss_i. Returns zero point ifn=0. Anys_iis valid, including negative. | 30422+n*1280+n/floor(max(log2(n),4))*22840 | 
| F93025 | BLS_G2_ZERO | - zero | Pushes zero point in G2. | 34 | 
| F93026 | BLS_MAP_TO_G2 | f - x | Converts FP2 element fto a G2 point. | 7984 | 
| F93027 | BLS_G2_INGROUP | x - bool | Checks that slice xrepresents a valid element of G2. | 4284 | 
| F93028 | BLS_G2_ISZERO | x - bool | Checks that G2 point xis equal to zero. | 34 | 
| F93030 | BLS_PAIRING | x_1 y_1 ... x_n y_n n - bool | Given G1 points x_iand G2 pointsy_i, calculates and multiply pairings ofx_i,y_i. Returns true if the result is the multiplicative identity in FP12, false otherwise. Returns false ifn=0. | 20034+n*11800 | 
| F93031 | BLS_PUSHR | - r | Pushes the order of G1 and G2 (approx. 2^255). | 34 | 
| F940 | CDATASIZEQ | c n - x y z -1 or 0 | Recursively computes the count of distinct cells x, data bitsy, and cell referenceszin the dag rooted at Cellc, effectively returning the total storage used by this dag taking into account the identification of equal cells. The values ofx,y, andzare computed by a depth-first traversal of this dag, with a hash table of visited cell hashes used to prevent visits of already-visited cells. The total count of visited cellsxcannot exceed non-negative Integern; otherwise the computation is aborted before visiting the(n+1)-st cell and a zero is returned to indicate failure. Ifcis Null, returnsx=y=z=0. |  | 
| F941 | CDATASIZE | c n - x y z | A non-quiet version of CDATASIZEQthat throws a cell overflow exception (8) on failure. |  | 
| F942 | SDATASIZEQ | s n - x y z -1 or 0 | Similar to CDATASIZEQ, but accepting a Slicesinstead of a Cell. The returned value ofxdoes not take into account the cell that contains the slicesitself; however, the data bits and the cell references ofsare accounted for inyandz. |  | 
| F943 | SDATASIZE | s n - x y z | A non-quiet version of SDATASIZEQthat throws a cell overflow exception (8) on failure. |  | 
| FA00 | LDGRAMS
LDVARUINT16 | s - x s' | Loads (deserializes) a  | 26 | 
| FA01 | LDVARINT16 | s - x s' | Similar to  | 26 | 
| FA02 | STGRAMS
STVARUINT16 | b x - b' | Stores (serializes) an Integer xin the range0...2^120-1into Builderb, and returns the resulting Builderb'. The serialization ofxconsists of a 4-bit unsigned big-endian integerl, which is the smallest integerl>=0, such thatx<2^(8l), followed by an8l-bit unsigned big-endian representation ofx. Ifxdoes not belong to the supported range, a range check exception is thrown. | 26 | 
| FA03 | STVARINT16 | b x - b' | Similar to STVARUINT16, but serializes a signed Integerxin the range-2^119...2^119-1. | 26 | 
| FA04 | LDVARUINT32 | s - x s' | Loads (deserializes) a  | 26 | 
| FA05 | LDVARINT32 | s - x s' | Similar to  | 26 | 
| FA06 | STVARUINT32 | b x - b' | Stores (serializes) an Integer xin the range0...2^248-1into Builderb, and returns the resulting Builderb'. The serialization ofxconsists of a 5-bit unsigned big-endian integerl, which is the smallest integerl>=0, such thatx<2^(8l), followed by an8l-bit unsigned big-endian representation ofx. Ifxdoes not belong to the supported range, a range check exception is thrown. | 26 | 
| FA07 | STVARINT32 | b x - b' | Similar to STVARUINT32, but serializes a signed Integerxin the range-2^247...2^247-1. | 26 | 
| FA40 | LDMSGADDR | s - s' s'' | Loads from Slice sthe only prefix that is a validMsgAddress, and returns both this prefixs'and the remainders''ofsas slices. | 26 | 
| FA41 | LDMSGADDRQ | s - s' s'' -1 or s 0 | A quiet version of LDMSGADDR: on success, pushes an extra-1; on failure, pushes the originalsand a zero. | 26 | 
| FA42 | PARSEMSGADDR | s - t | Decomposes Slice scontaining a validMsgAddressinto a Tupletwith separate fields of thisMsgAddress. Ifsis not a validMsgAddress, a cell deserialization exception is thrown. | 26 | 
| FA43 | PARSEMSGADDRQ | s - t -1 or 0 | A quiet version of PARSEMSGADDR: returns a zero on error instead of throwing an exception. | 26 | 
| FA44 | REWRITESTDADDR | s - x y | Parses Slice scontaining a validMsgAddressInt(usually amsg_addr_std), applies rewriting from theanycast(if present) to the same-length prefix of the address, and returns both the workchainxand the 256-bit addressyas integers. If the address is not 256-bit, or ifsis not a valid serialization ofMsgAddressInt, throws a cell deserialization exception. | 26 | 
| FA45 | REWRITESTDADDRQ | s - x y -1 or 0 | A quiet version of primitive REWRITESTDADDR. | 26 | 
| FA46 | REWRITEVARADDR | s - x s' | A variant of REWRITESTDADDRthat returns the (rewritten) address as a Slices, even if it is not exactly 256 bit long (represented by amsg_addr_var). | 26 | 
| FA47 | REWRITEVARADDRQ | s - x s' -1 or 0 | A quiet version of primitive REWRITEVARADDR. | 26 | 
| FB00 | SENDRAWMSG | c x -  | Sends a raw message contained in Cell c, which should contain a correctly serialized objectMessage X, with the only exception that the source address is allowed to have dummy valueaddr_none(to be automatically replaced with the current smart-contract address), andihr_fee,fwd_fee,created_ltandcreated_atfields can have arbitrary values (to be rewritten with correct values during the action phase of the current transaction). Integer parameterxcontains the flags. Currentlyx=0is used for ordinary messages;x=128is used for messages that are to carry all the remaining balance of the current smart contract (instead of the value originally indicated in the message);x=64is used for messages that carry all the remaining value of the inbound message in addition to the value initially indicated in the new message (if bit 0 is not set, the gas fees are deducted from this amount);x'=x+1means that the sender wants to pay transfer fees separately;x'=x+2means that any errors arising while processing this message during the action phase should be ignored. Finally,x'=x+32means that the current account must be destroyed if its resulting balance is zero. This flag is usually employed together with+128. | 526 | 
| FB02 | RAWRESERVE | x y -  | Creates an output action which would reserve exactly xnanograms (ify=0), at mostxnanograms (ify=2), or all butxnanograms (ify=1ory=3), from the remaining balance of the account. It is roughly equivalent to creating an outbound message carryingxnanograms (orb-xnanograms, wherebis the remaining balance) to oneself, so that the subsequent output actions would not be able to spend more money than the remainder. Bit+2inymeans that the external action does not fail if the specified amount cannot be reserved; instead, all remaining balance is reserved. Bit+8inymeansx:=-xbefore performing any further actions. Bit+4inymeans thatxis increased by the original balance of the current account (before the compute phase), including all extra currencies, before performing any other checks and actions. Currentlyxmust be a non-negative integer, andymust be in the range0...15. | 526 | 
| FB03 | RAWRESERVEX | x D y -  | Similar to RAWRESERVE, but also accepts a dictionaryD(represented by a Cell or Null) with extra currencies. In this way currencies other than Grams can be reserved. | 526 | 
| FB04 | SETCODE | c -  | Creates an output action that would change this smart contract code to that given by Cell c. Notice that this change will take effect only after the successful termination of the current run of the smart contract. | 526 | 
| FB06 | SETLIBCODE | c x -  | Creates an output action that would modify the collection of this smart contract libraries by adding or removing library with code given in Cell c. Ifx=0, the library is actually removed if it was previously present in the collection (if not, this action does nothing). Ifx=1, the library is added as a private library, and ifx=2, the library is added as a public library (and becomes available to all smart contracts if the current smart contract resides in the masterchain); if the library was present in the collection before, its public/private status is changed according tox. Values ofxother than0...2are invalid. | 526 | 
| FB07 | CHANGELIB | h x -  | Creates an output action similarly to SETLIBCODE, but instead of the library code accepts its hash as an unsigned 256-bit integerh. Ifx!=0and the library with hashhis absent from the library collection of this smart contract, this output action will fail. | 526 | 
| FB08 | SENDMSG | c x - fee | Creates an output action and returns a fee for creating a message. Mode has the same effect as in the case of SENDRAWMSG. Additionally+1024means - do not create an action, only estimate fee. Other modes affect the fee calculation as follows:+64substitutes the entire balance of the incoming message as an outcoming value (slightly inaccurate, gas expenses that cannot be estimated before the computation is completed are not taken into account),+128substitutes the value of the entire balance of the contract before the start of the computation phase (slightly inaccurate, since gas expenses that cannot be estimated before the completion of the computation phase are not taken into account). | 526 | 
| Opcode | Fift syntax | Stack | Description | Gas | 
|---|---|---|---|---|
| FEij | {i*16+j} DEBUG | - | 26 | |
| FEFnssss | {string} DEBUGSTR
{string} {x} DEBUGSTRI | - | 
 | 26 | 
| FFnn | [nn] SETCP | - | Selects TVM codepage 0 <= nn < 240. If the codepage is not supported, throws an invalid opcode exception. | 26 | 
| FFFz | [z-16] SETCP | - | Selects TVM codepage z-16for1 <= z <= 15. Negative codepages-13...-1are reserved for restricted versions of TVM needed to validate runs of TVM in other codepages. Negative codepage-14is reserved for experimental codepages, not necessarily compatible between different TVM implementations, and should be disabled in the production versions of TVM. | 26 | 
| FFF0 | SETCPX | c -  | Selects codepage cwith-2^15 <= c < 2^15passed in the top of the stack. | 26 | 
| Opcode | Fift syntax | Stack | Description | Gas | 
|---|---|---|---|---|
| 0i | SWAP | x y - y x | Same as s1 XCHG0. | 18 | 
| 2i | DUP | x - x x | Same as s0 PUSH. | 18 | 
| 2i | OVER | x y - x y x | Same as s1 PUSH. | 18 | 
| 3i | DROP | x - | Same as s0 POP, discards the top-of-stack value. | 18 | 
| 3i | NIP | x y - y | Same as s1 POP. | 18 | 
| 55ij | ROT2
2ROT | a b c d e f - c d e f a b | Rotates the three topmost pairs of stack entries. | 26 | 
| 55ij | [i+1] ROLL |  | Rotates the top  | 26 | 
| 55ij | [i+1] -ROLL
[i+1] ROLLREV |  | Rotates the top  | 26 | 
| 6F0n | NIL | - t | Pushes the only Tuple t=()of length zero. | 26+n | 
| 6F0n | SINGLE | x - t | Creates a singleton t:=(x), i.e., a Tuple of length one. | 26+n | 
| 6F0n | PAIR
CONS | x y - t | Creates pair t:=(x,y). | 26+n | 
| 6F0n | TRIPLE | x y z - t | Creates triple t:=(x,y,z). | 26+n | 
| 6F1k | FIRST
CAR | t - x | Returns the first element of a Tuple. | 26 | 
| 6F1k | SECOND
CDR | t - y | Returns the second element of a Tuple. | 26 | 
| 6F1k | THIRD | t - z | Returns the third element of a Tuple. | 26 | 
| 6F2n | UNSINGLE | t - x | Unpacks a singleton t=(x). | 26+n | 
| 6F2n | UNPAIR
UNCONS | t - x y | Unpacks a pair t=(x,y). | 26+n | 
| 6F2n | UNTRIPLE | t - x y z | Unpacks a triple t=(x,y,z). | 26+n | 
| 6F3k | CHKTUPLE | t - | Checks whether tis a Tuple. If not, throws a type check exception. | 26+k | 
| 6F5k | SETFIRST | t x - t' | Sets the first component of Tuple ttoxand returns the resulting Tuplet'. | 26+|t| | 
| 6F5k | SETSECOND | t x - t' | Sets the second component of Tuple ttoxand returns the resulting Tuplet'. | 26+|t| | 
| 6F5k | SETTHIRD | t x - t' | Sets the third component of Tuple ttoxand returns the resulting Tuplet'. | 26+|t| | 
| 6F6k | FIRSTQ
CARQ | t - x | Returns the first element of a Tuple. | 26 | 
| 6F6k | SECONDQ
CDRQ | t - y | Returns the second element of a Tuple. | 26 | 
| 6F6k | THIRDQ | t - z | Returns the third element of a Tuple. | 26 | 
| 6F7k | SETFIRSTQ | t x - t' | Sets the first component of Tuple ttoxand returns the resulting Tuplet'. | 26+|t'| | 
| 6F7k | SETSECONDQ | t x - t' | Sets the second component of Tuple ttoxand returns the resulting Tuplet'. | 26+|t'| | 
| 6F7k | SETTHIRDQ | t x - t' | Sets the third component of Tuple ttoxand returns the resulting Tuplet'. | 26+|t'| | 
| 6FBij | CADR | t - x | Recovers x=(t_2)_1. | 26 | 
| 6FBij | CDDR | t - x | Recovers x=(t_2)_2. | 26 | 
| 6FE_ijk | CADDR | t - x | Recovers x=t_2_2_1. | 26 | 
| 6FE_ijk | CDDDR | t - x | Recovers x=t_2_2_2. | 26 | 
| 7i | ZERO
FALSE | - 0 | 18 | |
| 7i | ONE | - 1 | 18 | |
| 7i | TWO | - 2 | 18 | |
| 7i | TEN | - 10 | 18 | |
| 7i | TRUE | - -1 | 18 | |
| B4cc | CHKBOOL | x - x | Checks whether xis a ''boolean value'' (i.e., either 0 or -1). | 26/76 | 
| B5cc | CHKBIT | x - x | Checks whether xis a binary digit (i.e., zero or one). | 26/76 | 
| C0yy | ISZERO | x - x=0 | Checks whether an integer is zero. Corresponds to Forth's 0=. | 26 | 
| C1yy | ISNEG | x - x<0 | Checks whether an integer is negative. Corresponds to Forth's 0<. | 26 | 
| C1yy | ISNPOS | x - x<=0 | Checks whether an integer is non-positive. | 26 | 
| C2yy | ISPOS | x - x>0 | Checks whether an integer is positive. Corresponds to Forth's 0>. | 26 | 
| C2yy | ISNNEG | x - x >=0 | Checks whether an integer is non-negative. | 26 | 
| CFC0_xysss | STZERO | b - b' | Stores one binary zero. | 24 | 
| CFC0_xysss | STONE | b - b' | Stores one binary one. | 24 | 
| D74E_n | PLDREF | s - c | Preloads the first cell reference of a Slice. | 26 | 
| ECrn | [n] SETNUMARGS | c - c' | Sets c.nargstonplus the current depth ofc's stack, where0 <= n <= 14. Ifc.nargsis already set to a non-negative value, does nothing. | 26+s'' | 
| ECrn | [r] -1 SETCONTARGS | x_1 x_2...x_r c - c' | Pushes 0 <= r <= 15valuesx_1...x_rinto the stack of (a copy of) the continuationc, starting withx_1. If the final depth ofc's stack turns out to be greater thanc.nargs, a stack overflow exception is generated. | 26+s'' | 
| EErn | [n] BLESSNUMARGS | s - c | Also transforms a Slice sinto a Continuationc, but setsc.nargsto0 <= n <= 14. | 26 | 
| ED4i | c4 PUSHCTR
c4 PUSH | - x | Pushes the ''global data root'' cell reference, thus enabling access to persistent smart-contract data. | 26 | 
| ED5i | c4 POPCTR
c4 POP | x - | Sets the ''global data root'' cell reference, thus allowing modification of persistent smart-contract data. | 26 | 
| 6D | NEWDICT |  - D | Returns a new empty dictionary.
It is an alternative mnemonics for  | 18 | 
| 6E | DICTEMPTY | D - ? | Checks whether dictionary  | 18 | 
| CE | STDICTS
 | s b - b' | Stores a Slice-represented dictionary  | 18 | 
| F82i | NOW |  - x | Returns the current Unix time as an Integer. If it is impossible to recover the requested value starting from  | 26 | 
| F82i | BLOCKLT |  - x | Returns the starting logical time of the current block.
Equivalent to  | 26 | 
| F82i | LTIME |  - x | Returns the logical time of the current transaction.
Equivalent to  | 26 | 
| F82i | RANDSEED |  - x | Returns the current random seed as an unsigned 256-bit Integer.
Equivalent to  | 26 | 
| F82i | BALANCE |  - t | Returns the remaining balance of the smart contract as a Tuple consisting of an Integer (the remaining Gram balance in nanograms) and a Maybe Cell (a dictionary with 32-bit keys representing the balance of ''extra currencies'').
Equivalent to  | 26 | 
| F82i | MYADDR |  - s | Returns the internal address of the current smart contract as a Slice with a  | 26 | 
| F82i | CONFIGROOT |  - D | Returns the Maybe Cell Dwith the current global configuration dictionary. Equivalent to9 GETPARAM. | 26 | 
| F82i | MYCODE |  - c | Retrieves code of smart-contract from c7. Equivalent to 10 GETPARAM. | 26 | 
| F82i | INCOMINGVALUE |  - t | Retrieves value of incoming message from c7. Equivalent to 11 GETPARAM. | 26 | 
| F82i | STORAGEFEES |  - i | Retrieves value of storage phase fees from c7. Equivalent to 12 GETPARAM. | 26 | 
| F82i | PREVBLOCKSINFOTUPLE |  - t | Retrives PrevBlocksInfo: [last_mc_blocks, prev_key_block]from c7. Equivalent to13 GETPARAM. | 26 | 
| FEij | DUMPSTK | - | Dumps the stack (at most the top 255 values) and shows the total stack depth. Does nothing on production versions of TVM. | 26 | 
| FEij | STRDUMP | - | Dumps slice with length divisible by 8 from top of stack as a string. Does nothing on production versions of TVM. | 26 | 
| FEij | s[j] DUMP | - | Dumps slice with length divisible by 8 from top of stack as a string. Does nothing on production versions of TVM. | 26 | 
| FFnn | SETCP0 | - | Selects TVM (test) codepage zero as described in this document. | 26 |