Instructions
Interactive reference for TVM instructions
00 NOP
Does nothing.
Category: Stack Basic (stack_basic)
NOP0i XCHG_0I
Interchanges s0 with s[i], 1 <= i <= 15.
Category: Stack Basic (stack_basic)
s[i] XCHG0Aliases:
SWAP
Same ass1 XCHG0.
10ij XCHG_IJ
Interchanges s[i] with s[j], 1 <= i < j <= 15.
Category: Stack Basic (stack_basic)
s[i] s[j] XCHG11ii XCHG_0I_LONG
Interchanges s0 with s[ii], 0 <= ii <= 255.
Category: Stack Basic (stack_basic)
s0 [ii] s() XCHG1i XCHG_1I
Interchanges s1 with s[i], 2 <= i <= 15.
Category: Stack Basic (stack_basic)
s1 s[i] XCHG2i PUSH
Pushes a copy of the old s[i] into the stack.
Category: Stack Basic (stack_basic)
s[i] PUSHAliases:
DUP
Same ass0 PUSH.OVER
Same ass1 PUSH.
3i POP
Pops the old s0 value into the old s[i].
Category: Stack Basic (stack_basic)
s[i] POPAliases:
DROP
Same ass0 POP, discards the top-of-stack value.NIP
Same ass1 POP.
4ijk XCHG3
Equivalent to s2 s[i] XCHG s1 s[j] XCHG s[k] XCHG0.
Category: Stack Complex (stack_complex)
s[i] s[j] s[k] XCHG350ij XCHG2
Equivalent to s1 s[i] XCHG s[j] XCHG0.
Category: Stack Complex (stack_complex)
s[i] s[j] XCHG251ij XCPU
Equivalent to s[i] XCHG0 s[j] PUSH.
Category: Stack Complex (stack_complex)
s[i] s[j] XCPU52ij PUXC
Equivalent to s[i] PUSH SWAP s[j] XCHG0.
Category: Stack Complex (stack_complex)
s[i] s[j-1] PUXC53ij PUSH2
Equivalent to s[i] PUSH s[j+1] PUSH.
Category: Stack Complex (stack_complex)
s[i] s[j] PUSH2540ijk XCHG3_ALT
Long form of XCHG3.
Category: Stack Complex (stack_complex)
s[i] s[j] s[k] XCHG3_l541ijk XC2PU
Equivalent to s[i] s[j] XCHG2 s[k] PUSH.
Category: Stack Complex (stack_complex)
s[i] s[j] s[k] XC2PU542ijk XCPUXC
Equivalent to s1 s[i] XCHG s[j] s[k-1] PUXC.
Category: Stack Complex (stack_complex)
s[i] s[j] s[k-1] XCPUXC543ijk XCPU2
Equivalent to s[i] XCHG0 s[j] s[k] PUSH2.
Category: Stack Complex (stack_complex)
s[i] s[j] s[k] XCPU2544ijk PUXC2
Equivalent to s[i] PUSH s2 XCHG0 s[j] s[k] XCHG2.
Category: Stack Complex (stack_complex)
s[i] s[j-1] s[k-1] PUXC2545ijk PUXCPU
Equivalent to s[i] s[j-1] PUXC s[k] PUSH.
Category: Stack Complex (stack_complex)
s[i] s[j-1] s[k-1] PUXCPU546ijk PU2XC
Equivalent to s[i] PUSH SWAP s[j] s[k-1] PUXC.
Category: Stack Complex (stack_complex)
s[i] s[j-1] s[k-2] PU2XC547ijk PUSH3
Equivalent to s[i] PUSH s[j+1] s[k+1] PUSH2.
Category: Stack Complex (stack_complex)
s[i] s[j] s[k] PUSH355ij BLKSWAP
Permutes two blocks s[j+i+1] ... s[j+1] and s[j] ... s0.0 <= i,j <= 15
Equivalent to [i+1] [j+1] REVERSE [j+1] 0 REVERSE [i+j+2] 0 REVERSE.
Category: Stack Complex (stack_complex)
[i+1] [j+1] BLKSWAPAliases:
ROT2
Rotates the three topmost pairs of stack entries.ROLL
Rotates the topi+1stack entries.
Equivalent to1 [i+1] BLKSWAP.ROLLREV
Rotates the topi+1stack entries in the other direction.
Equivalent to[i+1] 1 BLKSWAP.
56ii PUSH_LONG
Pushes a copy of the old s[ii] into the stack.0 <= ii <= 255
Category: Stack Complex (stack_complex)
[ii] s() PUSH57ii POP_LONG
Pops the old s0 value into the old s[ii].0 <= ii <= 255
Category: Stack Complex (stack_complex)
[ii] s() POP58 ROT
Equivalent to 1 2 BLKSWAP or to s2 s1 XCHG2.
Category: Stack Complex (stack_complex)
ROT59 ROTREV
Equivalent to 2 1 BLKSWAP or to s2 s2 XCHG2.
Category: Stack Complex (stack_complex)
ROTREV
-ROT5A SWAP2
Equivalent to 2 2 BLKSWAP or to s3 s2 XCHG2.
Category: Stack Complex (stack_complex)
SWAP2
2SWAP5B DROP2
Equivalent to DROP DROP.
Category: Stack Complex (stack_complex)
DROP2
2DROP5C DUP2
Equivalent to s1 s0 PUSH2.
Category: Stack Complex (stack_complex)
DUP2
2DUP5D OVER2
Equivalent to s3 s2 PUSH2.
Category: Stack Complex (stack_complex)
OVER2
2OVER5Eij REVERSE
Reverses the order of s[j+i+1] ... s[j].
Category: Stack Complex (stack_complex)
[i+2] [j] REVERSE5F0i BLKDROP
Equivalent to DROP performed i times.
Category: Stack Complex (stack_complex)
[i] BLKDROP5Fij BLKPUSH
Equivalent to PUSH s(j) performed i times.1 <= i <= 15, 0 <= j <= 15.
Category: Stack Complex (stack_complex)
[i] [j] BLKPUSH60 PICK
Pops integer i from the stack, then performs s[i] PUSH.
Category: Stack Complex (stack_complex)
PICK
PUSHX61 ROLLX
Pops integer i from the stack, then performs 1 [i] BLKSWAP.
Category: Stack Complex (stack_complex)
ROLLX62 -ROLLX
Pops integer i from the stack, then performs [i] 1 BLKSWAP.
Category: Stack Complex (stack_complex)
-ROLLX
ROLLREVX63 BLKSWX
Pops integers i,j from the stack, then performs [i] [j] BLKSWAP.
Category: Stack Complex (stack_complex)
BLKSWX64 REVX
Pops integers i,j from the stack, then performs [i] [j] REVERSE.
Category: Stack Complex (stack_complex)
REVX65 DROPX
Pops integer i from the stack, then performs [i] BLKDROP.
Category: Stack Complex (stack_complex)
DROPX66 TUCK
Equivalent to SWAP OVER or to s1 s1 XCPU.
Category: Stack Complex (stack_complex)
TUCK67 XCHGX
Pops integer i from the stack, then performs s[i] XCHG.
Category: Stack Complex (stack_complex)
XCHGX68 DEPTH
Pushes the current depth of the stack.
Category: Stack Complex (stack_complex)
DEPTH69 CHKDEPTH
Pops integer i from the stack, then checks whether there are at least i elements, generating a stack underflow exception otherwise.
Category: Stack Complex (stack_complex)
CHKDEPTH6A ONLYTOPX
Pops integer i from the stack, then removes all but the top i elements.
Category: Stack Complex (stack_complex)
ONLYTOPX6B ONLYX
Pops integer i from the stack, then leaves only the bottom i elements. Approximately equivalent to DEPTH SWAP SUB DROPX.
Category: Stack Complex (stack_complex)
ONLYX6Cij BLKDROP2
Drops i stack elements under the top j elements.1 <= i <= 15, 0 <= j <= 15
Equivalent to [i+j] 0 REVERSE [i] BLKDROP [j] 0 REVERSE.
Category: Stack Complex (stack_complex)
[i] [j] BLKDROP26D NULL
Pushes the only value of type Null.
Category: Tuple (tuple)
NULL
PUSHNULLAliases:
NEWDICT
Returns a new empty dictionary.
It is an alternative mnemonics forPUSHNULL.
6E ISNULL
Checks whether x is a Null, and returns -1 or 0 accordingly.
Category: Tuple (tuple)
ISNULLAliases:
DICTEMPTY
Checks whether dictionaryDis empty, and returns-1or0accordingly.
It is an alternative mnemonics forISNULL.
6F0n TUPLE
Creates a new Tuple t=(x_1, ... ,x_n) containing n values x_1,..., x_n.0 <= n <= 15
Category: Tuple (tuple)
[n] TUPLEAliases:
NIL
Pushes the only Tuplet=()of length zero.SINGLE
Creates a singletont:=(x), i.e., a Tuple of length one.PAIR
Creates pairt:=(x,y).TRIPLE
Creates triplet:=(x,y,z).
6F1k INDEX
Returns the k-th element of a Tuple t.0 <= k <= 15.
Category: Tuple (tuple)
[k] INDEXAliases:
FIRST
Returns the first element of a Tuple.SECOND
Returns the second element of a Tuple.THIRD
Returns the third element of a Tuple.
6F2n UNTUPLE
Unpacks a Tuple t=(x_1,...,x_n) of length equal to 0 <= n <= 15.
If t is not a Tuple, or if |t| != n, a type check exception is thrown.
Category: Tuple (tuple)
[n] UNTUPLEAliases:
UNSINGLE
Unpacks a singletont=(x).UNPAIR
Unpacks a pairt=(x,y).UNTRIPLE
Unpacks a triplet=(x,y,z).
6F3k UNPACKFIRST
Unpacks first 0 <= k <= 15 elements of a Tuple t.
If |t|<k, throws a type check exception.
Category: Tuple (tuple)
[k] UNPACKFIRSTAliases:
CHKTUPLE
Checks whethertis a Tuple. If not, throws a type check exception.
6F4n EXPLODE
Unpacks a Tuple t=(x_1,...,x_m) and returns its length m, but only if m <= n <= 15. Otherwise throws a type check exception.
Category: Tuple (tuple)
[n] EXPLODE6F5k SETINDEX
Computes Tuple t' that differs from t only at position t'_{k+1}, which is set to x.0 <= k <= 15
If k >= |t|, throws a range check exception.
Category: Tuple (tuple)
[k] SETINDEXAliases:
SETFIRST
Sets the first component of Tuplettoxand returns the resulting Tuplet'.SETSECOND
Sets the second component of Tuplettoxand returns the resulting Tuplet'.SETTHIRD
Sets the third component of Tuplettoxand returns the resulting Tuplet'.
6F6k INDEXQ
Returns the k-th element of a Tuple t, where 0 <= k <= 15. In other words, returns x_{k+1} if t=(x_1,...,x_n). If k>=n, or if t is Null, returns a Null instead of x.
Category: Tuple (tuple)
[k] INDEXQAliases:
FIRSTQ
Returns the first element of a Tuple.SECONDQ
Returns the second element of a Tuple.THIRDQ
Returns the third element of a Tuple.
6F7k SETINDEXQ
Sets the k-th component of Tuple t to x, where 0 <= k < 16, and returns the resulting Tuple t'.
If |t| <= k, first extends the original Tuple to length n'=k+1 by setting all new components to Null. If the original value of t is Null, treats it as an empty Tuple. If t is not Null or Tuple, throws an exception. If x is Null and either |t| <= k or t is Null, then always returns t'=t (and does not consume tuple creation gas).
Category: Tuple (tuple)
[k] SETINDEXQAliases:
SETFIRSTQ
Sets the first component of Tuplettoxand returns the resulting Tuplet'.SETSECONDQ
Sets the second component of Tuplettoxand returns the resulting Tuplet'.SETTHIRDQ
Sets the third component of Tuplettoxand returns the resulting Tuplet'.
6F80 TUPLEVAR
Creates a new Tuple t of length n similarly to TUPLE, but with 0 <= n <= 255 taken from the stack.
Category: Tuple (tuple)
TUPLEVAR6F81 INDEXVAR
Similar to k INDEX, but with 0 <= k <= 254 taken from the stack.
Category: Tuple (tuple)
INDEXVAR6F82 UNTUPLEVAR
Similar to n UNTUPLE, but with 0 <= n <= 255 taken from the stack.
Category: Tuple (tuple)
UNTUPLEVAR6F83 UNPACKFIRSTVAR
Similar to n UNPACKFIRST, but with 0 <= n <= 255 taken from the stack.
Category: Tuple (tuple)
UNPACKFIRSTVAR6F84 EXPLODEVAR
Similar to n EXPLODE, but with 0 <= n <= 255 taken from the stack.
Category: Tuple (tuple)
EXPLODEVAR6F85 SETINDEXVAR
Similar to k SETINDEX, but with 0 <= k <= 254 taken from the stack.
Category: Tuple (tuple)
SETINDEXVAR6F86 INDEXVARQ
Similar to n INDEXQ, but with 0 <= k <= 254 taken from the stack.
Category: Tuple (tuple)
INDEXVARQ6F87 SETINDEXVARQ
Similar to k SETINDEXQ, but with 0 <= k <= 254 taken from the stack.
Category: Tuple (tuple)
SETINDEXVARQ6F88 TLEN
Returns the length of a Tuple.
Category: Tuple (tuple)
TLEN6F89 QTLEN
Similar to TLEN, but returns -1 if t is not a Tuple.
Category: Tuple (tuple)
QTLEN6F8A ISTUPLE
Returns -1 or 0 depending on whether t is a Tuple.
Category: Tuple (tuple)
ISTUPLE6F8B LAST
Returns the last element of a non-empty Tuple t.
Category: Tuple (tuple)
LAST6F8C TPUSH
Appends a value x to a Tuple t=(x_1,...,x_n), but only if the resulting Tuple t'=(x_1,...,x_n,x) is of length at most 255. Otherwise throws a type check exception.
Category: Tuple (tuple)
TPUSH
COMMA6F8D TPOP
Detaches the last element x=x_n from a non-empty Tuple t=(x_1,...,x_n), and returns both the resulting Tuple t'=(x_1,...,x_{n-1}) and the original last element x.
Category: Tuple (tuple)
TPOP6FA0 NULLSWAPIF
Pushes a Null under the topmost Integer x, but only if x!=0.
Category: Tuple (tuple)
NULLSWAPIF6FA1 NULLSWAPIFNOT
Pushes a Null under the topmost Integer x, but only if x=0. May be used for stack alignment after quiet primitives such as PLDUXQ.
Category: Tuple (tuple)
NULLSWAPIFNOT6FA2 NULLROTRIF
Pushes a Null under the second stack entry from the top, but only if the topmost Integer y is non-zero.
Category: Tuple (tuple)
NULLROTRIF6FA3 NULLROTRIFNOT
Pushes a Null under the second stack entry from the top, but only if the topmost Integer y is zero. May be used for stack alignment after quiet primitives such as LDUXQ.
Category: Tuple (tuple)
NULLROTRIFNOT6FA4 NULLSWAPIF2
Pushes two nulls under the topmost Integer x, but only if x!=0.
Equivalent to NULLSWAPIF NULLSWAPIF.
Category: Tuple (tuple)
NULLSWAPIF26FA5 NULLSWAPIFNOT2
Pushes two nulls under the topmost Integer x, but only if x=0.
Equivalent to NULLSWAPIFNOT NULLSWAPIFNOT.
Category: Tuple (tuple)
NULLSWAPIFNOT26FA6 NULLROTRIF2
Pushes two nulls under the second stack entry from the top, but only if the topmost Integer y is non-zero.
Equivalent to NULLROTRIF NULLROTRIF.
Category: Tuple (tuple)
NULLROTRIF26FA7 NULLROTRIFNOT2
Pushes two nulls under the second stack entry from the top, but only if the topmost Integer y is zero.
Equivalent to NULLROTRIFNOT NULLROTRIFNOT.
Category: Tuple (tuple)
NULLROTRIFNOT26FBij INDEX2
Recovers x=(t_{i+1})_{j+1} for 0 <= i,j <= 3.
Equivalent to [i] INDEX [j] INDEX.
Category: Tuple (tuple)
[i] [j] INDEX2Aliases:
CADR
Recoversx=(t_2)_1.CDDR
Recoversx=(t_2)_2.
6FE_ijk INDEX3
Recovers x=t_{i+1}_{j+1}_{k+1}.0 <= i,j,k <= 3
Equivalent to [i] [j] INDEX2 [k] INDEX.
Category: Tuple (tuple)
[i] [j] [k] INDEX3Aliases:
CADDR
Recoversx=t_2_2_1.CDDDR
Recoversx=t_2_2_2.
7i PUSHINT_4
Pushes integer x into the stack. -5 <= x <= 10.
Here i equals four lower-order bits of x (i=x mod 16).
Category: Const Int (const_int)
[x] PUSHINT
[x] INTAliases:
ZEROONETWOTENTRUE
80xx PUSHINT_8
Pushes integer xx. -128 <= xx <= 127.
Category: Const Int (const_int)
[xx] PUSHINT
[xx] INT81xxxx PUSHINT_16
Pushes integer xxxx. -2^15 <= xx < 2^15.
Category: Const Int (const_int)
[xxxx] PUSHINT
[xxxx] INT82lxxx PUSHINT_LONG
Pushes integer xxx.
Details: 5-bit 0 <= l <= 30 determines the length n=8l+19 of signed big-endian integer xxx.
The total length of this instruction is l+4 bytes or n+13=8l+32 bits.
Category: Const Int (const_int)
[xxx] PUSHINT
[xxx] INT83xx PUSHPOW2
(Quietly) pushes 2^(xx+1) for 0 <= xx <= 255.2^256 is a NaN.
Category: Const Int (const_int)
[xx+1] PUSHPOW283FF PUSHNAN
Pushes a NaN.
Category: Const Int (const_int)
PUSHNAN84xx PUSHPOW2DEC
Pushes 2^(xx+1)-1 for 0 <= xx <= 255.
Category: Const Int (const_int)
[xx+1] PUSHPOW2DEC85xx PUSHNEGPOW2
Pushes -2^(xx+1) for 0 <= xx <= 255.
Category: Const Int (const_int)
[xx+1] PUSHNEGPOW288 PUSHREF
Pushes the reference ref into the stack.
Details: Pushes the first reference of cc.code into the stack as a Cell (and removes this reference from the current continuation).
Category: Const Data (const_data)
[ref] PUSHREF89 PUSHREFSLICE
Similar to PUSHREF, but converts the cell into a Slice.
Category: Const Data (const_data)
[ref] PUSHREFSLICE8A PUSHREFCONT
Similar to PUSHREFSLICE, but makes a simple ordinary Continuation out of the cell.
Category: Const Data (const_data)
[ref] PUSHREFCONT8Bxsss PUSHSLICE
Pushes the slice slice into the stack.
Details: Pushes the (prefix) subslice of cc.code consisting of its first 8x+4 bits and no references (i.e., essentially a bitstring), where 0 <= x <= 15.
A completion tag is assumed, meaning that all trailing zeroes and the last binary one (if present) are removed from this bitstring.
If the original bitstring consists only of zeroes, an empty slice will be pushed.
Category: Const Data (const_data)
[slice] PUSHSLICE
[slice] SLICE8Crxxssss PUSHSLICE_REFS
Pushes the slice slice into the stack.
Details: Pushes the (prefix) subslice of cc.code consisting of its first 1 <= r+1 <= 4 references and up to first 8xx+1 bits of data, with 0 <= xx <= 31.
A completion tag is also assumed.
Category: Const Data (const_data)
[slice] PUSHSLICE
[slice] SLICE8Drxxsssss PUSHSLICE_LONG
Pushes the slice slice into the stack.
Details: Pushes the subslice of cc.code consisting of 0 <= r <= 4 references and up to 8xx+6 bits of data, with 0 <= xx <= 127.
A completion tag is assumed.
Category: Const Data (const_data)
[slice] PUSHSLICE
[slice] SLICE8F_rxxcccc PUSHCONT
Pushes a continuation made from builder.
Details: Pushes the simple ordinary continuation cccc made from the first 0 <= r <= 3 references and the first 0 <= xx <= 127 bytes of cc.code.
Category: Const Data (const_data)
[builder] PUSHCONT
[builder] CONT9xccc PUSHCONT_SHORT
Pushes a continuation made from builder.
Details: Pushes an x-byte continuation for 0 <= x <= 15.
Category: Const Data (const_data)
[builder] PUSHCONT
[builder] CONTA0 ADD
Category: Arithm Basic (arithm_basic)
ADDA1 SUB
Category: Arithm Basic (arithm_basic)
SUBA2 SUBR
Equivalent to SWAP SUB.
Category: Arithm Basic (arithm_basic)
SUBRA3 NEGATE
Equivalent to -1 MULCONST or to ZERO SUBR.
Notice that it triggers an integer overflow exception if x=-2^256.
Category: Arithm Basic (arithm_basic)
NEGATEA4 INC
Equivalent to 1 ADDCONST.
Category: Arithm Basic (arithm_basic)
INCA5 DEC
Equivalent to -1 ADDCONST.
Category: Arithm Basic (arithm_basic)
DECA6cc ADDCONST
-128 <= cc <= 127.
Category: Arithm Basic (arithm_basic)
[cc] ADDCONST
[cc] ADDINT
[-cc] SUBCONST
[-cc] SUBINTA7cc MULCONST
-128 <= cc <= 127.
Category: Arithm Basic (arithm_basic)
[cc] MULCONST
[cc] MULINTA8 MUL
Category: Arithm Basic (arithm_basic)
MULA900 ADDDIVMOD
Category: Arithm Div (arithm_div)
ADDDIVMODA901 ADDDIVMODR
Category: Arithm Div (arithm_div)
ADDDIVMODRA902 ADDDIVMODC
Category: Arithm Div (arithm_div)
ADDDIVMODCA904 DIV
q=floor(x/y), r=x-y*q
Category: Arithm Div (arithm_div)
DIVA905 DIVR
q'=round(x/y), r'=x-y*q'
Category: Arithm Div (arithm_div)
DIVRA906 DIVC
q''=ceil(x/y), r''=x-y*q''
Category: Arithm Div (arithm_div)
DIVCA908 MOD
Category: Arithm Div (arithm_div)
MODA909 MODR
Category: Arithm Div (arithm_div)
MODRA90A MODC
Category: Arithm Div (arithm_div)
MODCA90C DIVMOD
Category: Arithm Div (arithm_div)
DIVMODA90D DIVMODR
Category: Arithm Div (arithm_div)
DIVMODRA90E DIVMODC
Category: Arithm Div (arithm_div)
DIVMODCA920 ADDRSHIFTMOD_VAR
Category: Arithm Div (arithm_div)
ADDRSHIFTMODA921 ADDRSHIFTMODR
Category: Arithm Div (arithm_div)
ADDRSHIFTMODRA922 ADDRSHIFTMODC
Category: Arithm Div (arithm_div)
ADDRSHIFTMODCA925 RSHIFTR_VAR
Category: Arithm Div (arithm_div)
RSHIFTRA926 RSHIFTC_VAR
Category: Arithm Div (arithm_div)
RSHIFTCA928 MODPOW2_VAR
Category: Arithm Div (arithm_div)
MODPOW2A929 MODPOW2R_VAR
Category: Arithm Div (arithm_div)
MODPOW2RA92A MODPOW2C_VAR
Category: Arithm Div (arithm_div)
MODPOW2CA92C RSHIFTMOD_VAR
Category: Arithm Div (arithm_div)
RSHIFTMODA92D RSHIFTMODR_VAR
Category: Arithm Div (arithm_div)
RSHIFTMODRA92E RSHIFTMODC_VAR
Category: Arithm Div (arithm_div)
RSHIFTMODCA930tt ADDRSHIFTMOD
Category: Arithm Div (arithm_div)
[tt+1] ADDRSHIFT#MODA931tt ADDRSHIFTRMOD
Category: Arithm Div (arithm_div)
[tt+1] ADDRSHIFTR#MODA932tt ADDRSHIFTCMOD
Category: Arithm Div (arithm_div)
[tt+1] ADDRSHIFTC#MODA935tt RSHIFTR
Category: Arithm Div (arithm_div)
[tt+1] RSHIFTR#A936tt RSHIFTC
Category: Arithm Div (arithm_div)
[tt+1] RSHIFTC#A938tt MODPOW2
Category: Arithm Div (arithm_div)
[tt+1] MODPOW2#A939tt MODPOW2R
Category: Arithm Div (arithm_div)
[tt+1] MODPOW2R#A93Att MODPOW2C
Category: Arithm Div (arithm_div)
[tt+1] MODPOW2C#A93Ctt RSHIFTMOD
Category: Arithm Div (arithm_div)
[tt+1] RSHIFT#MODA93Dtt RSHIFTRMOD
Category: Arithm Div (arithm_div)
[tt+1] RSHIFTR#MODA93Ett RSHIFTCMOD
Category: Arithm Div (arithm_div)
[tt+1] RSHIFTC#MODA980 MULADDDIVMOD
Category: Arithm Div (arithm_div)
MULADDDIVMODA981 MULADDDIVMODR
Category: Arithm Div (arithm_div)
MULADDDIVMODRA982 MULADDDIVMODC
Category: Arithm Div (arithm_div)
MULADDDIVMODCA984 MULDIV
q=floor(x*y/z)
Category: Arithm Div (arithm_div)
MULDIVA985 MULDIVR
q'=round(x*y/z)
Category: Arithm Div (arithm_div)
MULDIVRA986 MULDIVC
q'=ceil(x*y/z)
Category: Arithm Div (arithm_div)
MULDIVCA988 MULMOD
Category: Arithm Div (arithm_div)
MULMODA989 MULMODR
Category: Arithm Div (arithm_div)
MULMODRA98A MULMODC
Category: Arithm Div (arithm_div)
MULMODCA98C MULDIVMOD
q=floor(x*y/z), r=x*y-z*q
Category: Arithm Div (arithm_div)
MULDIVMODA98D MULDIVMODR
q=round(x*y/z), r=x*y-z*q
Category: Arithm Div (arithm_div)
MULDIVMODRA98E MULDIVMODC
q=ceil(x*y/z), r=x*y-z*q
Category: Arithm Div (arithm_div)
MULDIVMODCA9A0 MULADDRSHIFTMOD_VAR
Category: Arithm Div (arithm_div)
MULADDRSHIFTMODA9A1 MULADDRSHIFTRMOD_VAR
Category: Arithm Div (arithm_div)
MULADDRSHIFTRMODA9A2 MULADDRSHIFTCMOD_VAR
Category: Arithm Div (arithm_div)
MULADDRSHIFTCMODA9A4 MULRSHIFT_VAR
0 <= z <= 256
Category: Arithm Div (arithm_div)
MULRSHIFTA9A5 MULRSHIFTR_VAR
0 <= z <= 256
Category: Arithm Div (arithm_div)
MULRSHIFTRA9A6 MULRSHIFTC_VAR
0 <= z <= 256
Category: Arithm Div (arithm_div)
MULRSHIFTCA9A8 MULMODPOW2_VAR
Category: Arithm Div (arithm_div)
MULMODPOW2_VARA9A9 MULMODPOW2R_VAR
Category: Arithm Div (arithm_div)
MULMODPOW2R_VARA9AA MULMODPOW2C_VAR
Category: Arithm Div (arithm_div)
MULMODPOW2C_VARA9AC MULRSHIFTMOD_VAR
Category: Arithm Div (arithm_div)
MULRSHIFTMOD_VARA9AD MULRSHIFTRMOD_VAR
Category: Arithm Div (arithm_div)
MULRSHIFTRMOD_VARA9AE MULRSHIFTCMOD_VAR
Category: Arithm Div (arithm_div)
MULRSHIFTCMOD_VARA9B0tt MULADDRSHIFTMOD
Category: Arithm Div (arithm_div)
[tt+1] MULADDRSHIFT#MODA9B1tt MULADDRSHIFTRMOD
Category: Arithm Div (arithm_div)
[tt+1] MULADDRSHIFTR#MODA9B2tt MULADDRSHIFTCMOD
Category: Arithm Div (arithm_div)
[tt+1] MULADDRSHIFTC#MODA9B4tt MULRSHIFT
Category: Arithm Div (arithm_div)
[tt+1] MULRSHIFT#A9B5tt MULRSHIFTR
Category: Arithm Div (arithm_div)
[tt+1] MULRSHIFTR#A9B6tt MULRSHIFTC
Category: Arithm Div (arithm_div)
[tt+1] MULRSHIFTC#A9B8tt MULMODPOW2
Category: Arithm Div (arithm_div)
[tt+1] MULMODPOW2#A9B9tt MULMODPOW2R
Category: Arithm Div (arithm_div)
[tt+1] MULMODPOW2R#A9BAtt MULMODPOW2C
Category: Arithm Div (arithm_div)
[tt+1] MULMODPOW2C#A9BC MULRSHIFTMOD
Category: Arithm Div (arithm_div)
MULRSHIFT#MODA9BD MULRSHIFTRMOD
Category: Arithm Div (arithm_div)
MULRSHIFTR#MODA9BE MULRSHIFTCMOD
Category: Arithm Div (arithm_div)
MULRSHIFTC#MODA9C0 LSHIFTADDDIVMOD_VAR
Category: Arithm Div (arithm_div)
LSHIFTADDDIVMODA9C1 LSHIFTADDDIVMODR_VAR
Category: Arithm Div (arithm_div)
LSHIFTADDDIVMODRA9C2 LSHIFTADDDIVMODC_VAR
Category: Arithm Div (arithm_div)
LSHIFTADDDIVMODCA9C4 LSHIFTDIV_VAR
0 <= z <= 256
Category: Arithm Div (arithm_div)
LSHIFTDIVA9C5 LSHIFTDIVR_VAR
0 <= z <= 256
Category: Arithm Div (arithm_div)
LSHIFTDIVRA9C6 LSHIFTDIVC_VAR
0 <= z <= 256
Category: Arithm Div (arithm_div)
LSHIFTDIVCA9C8 LSHIFTMOD_VAR
Category: Arithm Div (arithm_div)
LSHIFTMODA9C9 LSHIFTMODR_VAR
Category: Arithm Div (arithm_div)
LSHIFTMODRA9CA LSHIFTMODC_VAR
Category: Arithm Div (arithm_div)
LSHIFTMODCA9CC LSHIFTDIVMOD_VAR
Category: Arithm Div (arithm_div)
LSHIFTDIVMODA9CD LSHIFTDIVMODR_VAR
Category: Arithm Div (arithm_div)
LSHIFTDIVMODRA9CE LSHIFTDIVMODC_VAR
Category: Arithm Div (arithm_div)
LSHIFTDIVMODCA9D0tt LSHIFTADDDIVMOD
Category: Arithm Div (arithm_div)
[tt+1] LSHIFT#ADDDIVMODA9D1tt LSHIFTADDDIVMODR
Category: Arithm Div (arithm_div)
[tt+1] LSHIFT#ADDDIVMODRA9D2tt LSHIFTADDDIVMODC
Category: Arithm Div (arithm_div)
[tt+1] LSHIFT#ADDDIVMODCA9D4tt LSHIFTDIV
Category: Arithm Div (arithm_div)
[tt+1] LSHIFT#DIVA9D5tt LSHIFTDIVR
Category: Arithm Div (arithm_div)
[tt+1] LSHIFT#DIVRA9D6tt LSHIFTDIVC
Category: Arithm Div (arithm_div)
[tt+1] LSHIFT#DIVCA9D8tt LSHIFTMOD
Category: Arithm Div (arithm_div)
[tt+1] LSHIFT#MODA9D9tt LSHIFTMODR
Category: Arithm Div (arithm_div)
[tt+1] LSHIFT#MODRA9DAtt LSHIFTMODC
Category: Arithm Div (arithm_div)
[tt+1] LSHIFT#MODCA9DCtt LSHIFTDIVMOD
Category: Arithm Div (arithm_div)
[tt+1] LSHIFT#DIVMODA9DDtt LSHIFTDIVMODR
Category: Arithm Div (arithm_div)
[tt+1] LSHIFT#DIVMODRA9DEtt LSHIFTDIVMODC
Category: Arithm Div (arithm_div)
[tt+1] LSHIFT#DIVMODCAAcc LSHIFT
0 <= cc <= 255
Category: Arithm Logical (arithm_logical)
[cc+1] LSHIFT#ABcc RSHIFT
0 <= cc <= 255
Category: Arithm Logical (arithm_logical)
[cc+1] RSHIFT#AC LSHIFT_VAR
0 <= y <= 1023
Category: Arithm Logical (arithm_logical)
LSHIFTAD RSHIFT_VAR
0 <= y <= 1023
Category: Arithm Logical (arithm_logical)
RSHIFTAE POW2
0 <= y <= 1023
Equivalent to ONE SWAP LSHIFT.
Category: Arithm Logical (arithm_logical)
POW2B0 AND
Bitwise and of two signed integers x and y, sign-extended to infinity.
Category: Arithm Logical (arithm_logical)
ANDB1 OR
Bitwise or of two integers.
Category: Arithm Logical (arithm_logical)
ORB2 XOR
Bitwise xor of two integers.
Category: Arithm Logical (arithm_logical)
XORB3 NOT
Bitwise not of an integer.
Category: Arithm Logical (arithm_logical)
NOTB4cc FITS
Checks whether x is a cc+1-bit signed integer for 0 <= cc <= 255 (i.e., whether -2^cc <= x < 2^cc).
If not, either triggers an integer overflow exception, or replaces x with a NaN (quiet version).
Category: Arithm Logical (arithm_logical)
[cc+1] FITSAliases:
CHKBOOL
Checks whetherxis a ''boolean value'' (i.e., either 0 or -1).
B5cc UFITS
Checks whether x is a cc+1-bit unsigned integer for 0 <= cc <= 255 (i.e., whether 0 <= x < 2^(cc+1)).
Category: Arithm Logical (arithm_logical)
[cc+1] UFITSAliases:
CHKBIT
Checks whetherxis a binary digit (i.e., zero or one).
B600 FITSX
Checks whether x is a c-bit signed integer for 0 <= c <= 1023.
Category: Arithm Logical (arithm_logical)
FITSXB601 UFITSX
Checks whether x is a c-bit unsigned integer for 0 <= c <= 1023.
Category: Arithm Logical (arithm_logical)
UFITSXB602 BITSIZE
Computes smallest c >= 0 such that x fits into a c-bit signed integer (-2^(c-1) <= c < 2^(c-1)).
Category: Arithm Logical (arithm_logical)
BITSIZEB603 UBITSIZE
Computes smallest c >= 0 such that x fits into a c-bit unsigned integer (0 <= x < 2^c), or throws a range check exception.
Category: Arithm Logical (arithm_logical)
UBITSIZEB608 MIN
Computes the minimum of two integers x and y.
Category: Arithm Logical (arithm_logical)
MINB609 MAX
Computes the maximum of two integers x and y.
Category: Arithm Logical (arithm_logical)
MAXB60A MINMAX
Sorts two integers. Quiet version of this operation returns two NaNs if any of the arguments are NaNs.
Category: Arithm Logical (arithm_logical)
MINMAX
INTSORT2B60B ABS
Computes the absolute value of an integer x.
Category: Arithm Logical (arithm_logical)
ABSB7A0 QADD
Category: Arithm Quiet (arithm_quiet)
QADDB7A1 QSUB
Category: Arithm Quiet (arithm_quiet)
QSUBB7A2 QSUBR
Category: Arithm Quiet (arithm_quiet)
QSUBRB7A3 QNEGATE
Category: Arithm Quiet (arithm_quiet)
QNEGATEB7A4 QINC
Category: Arithm Quiet (arithm_quiet)
QINCB7A5 QDEC
Category: Arithm Quiet (arithm_quiet)
QDECB7A8 QMUL
Category: Arithm Quiet (arithm_quiet)
QMULB7A900 QADDDIVMOD
Category: Arithm Quiet (arithm_quiet)
QADDDIVMODB7A901 QADDDIVMODR
Category: Arithm Quiet (arithm_quiet)
QADDDIVMODRB7A902 QADDDIVMODC
Category: Arithm Quiet (arithm_quiet)
QADDDIVMODCB7A904 QDIV
Division returns NaN if y=0.
Category: Arithm Quiet (arithm_quiet)
QDIVB7A905 QDIVR
Category: Arithm Quiet (arithm_quiet)
QDIVRB7A906 QDIVC
Category: Arithm Quiet (arithm_quiet)
QDIVCB7A908 QMOD
Category: Arithm Quiet (arithm_quiet)
QMODB7A909 QMODR
Category: Arithm Quiet (arithm_quiet)
QMODRB7A90A QMODC
Category: Arithm Quiet (arithm_quiet)
QMODCB7A90C QDIVMOD
Category: Arithm Quiet (arithm_quiet)
QDIVMODB7A90D QDIVMODR
Category: Arithm Quiet (arithm_quiet)
QDIVMODRB7A90E QDIVMODC
Category: Arithm Quiet (arithm_quiet)
QDIVMODCB7A920 QADDRSHIFTMOD
Category: Arithm Quiet (arithm_quiet)
QADDRSHIFTMODB7A921 QADDRSHIFTMODR
Category: Arithm Quiet (arithm_quiet)
QADDRSHIFTMODRB7A922 QADDRSHIFTMODC
Category: Arithm Quiet (arithm_quiet)
QADDRSHIFTMODCB7A925 QRSHIFTR_VAR
Category: Arithm Quiet (arithm_quiet)
QRSHIFTRB7A926 QRSHIFTC_VAR
Category: Arithm Quiet (arithm_quiet)
QRSHIFTCB7A928 QMODPOW2_VAR
Category: Arithm Quiet (arithm_quiet)
QMODPOW2B7A929 QMODPOW2R_VAR
Category: Arithm Quiet (arithm_quiet)
QMODPOW2RB7A92A QMODPOW2C_VAR
Category: Arithm Quiet (arithm_quiet)
QMODPOW2CB7A92C QRSHIFTMOD_VAR
Category: Arithm Quiet (arithm_quiet)
QRSHIFTMODB7A92D QRSHIFTMODR_VAR
Category: Arithm Quiet (arithm_quiet)
QRSHIFTMODRB7A92E QRSHIFTMODC_VAR
Category: Arithm Quiet (arithm_quiet)
QRSHIFTMODCB7A930tt QADDRSHIFTMOD
Category: Arithm Quiet (arithm_quiet)
[tt+1] QADDRSHIFT#MODB7A931tt QADDRSHIFTRMOD
Category: Arithm Quiet (arithm_quiet)
[tt+1] QADDRSHIFTR#MODB7A932tt QADDRSHIFTCMOD
Category: Arithm Quiet (arithm_quiet)
[tt+1] QADDRSHIFTC#MODB7A935tt QRSHIFTR
Category: Arithm Quiet (arithm_quiet)
[tt+1] QRSHIFTR#B7A936tt QRSHIFTC
Category: Arithm Quiet (arithm_quiet)
[tt+1] QRSHIFTC#B7A938tt QMODPOW2
Category: Arithm Quiet (arithm_quiet)
[tt+1] QMODPOW2#B7A939tt QMODPOW2R
Category: Arithm Quiet (arithm_quiet)
[tt+1] QMODPOW2R#B7A93Att QMODPOW2C
Category: Arithm Quiet (arithm_quiet)
[tt+1] QMODPOW2C#B7A93Ctt QRSHIFTMOD
Category: Arithm Quiet (arithm_quiet)
[tt+1] QRSHIFT#MODB7A93Dtt QRSHIFTRMOD
Category: Arithm Quiet (arithm_quiet)
[tt+1] QRSHIFTR#MODB7A93Ett QRSHIFTCMOD
Category: Arithm Quiet (arithm_quiet)
[tt+1] QRSHIFTC#MODB7A980 QMULADDDIVMOD
Category: Arithm Quiet (arithm_quiet)
QMULADDDIVMODB7A981 QMULADDDIVMODR
Category: Arithm Quiet (arithm_quiet)
QMULADDDIVMODRB7A982 QMULADDDIVMODC
Category: Arithm Quiet (arithm_quiet)
QMULADDDIVMODCB7A984 QMULDIV
q=floor(x*y/z)
Category: Arithm Quiet (arithm_quiet)
QMULDIVB7A985 QMULDIVR
Category: Arithm Quiet (arithm_quiet)
QMULDIVRB7A986 QMULDIVC
q'=ceil(x*y/z)
Category: Arithm Quiet (arithm_quiet)
QMULDIVCB7A988 QMULMOD
Category: Arithm Quiet (arithm_quiet)
QMULMODB7A989 QMULMODR
Category: Arithm Quiet (arithm_quiet)
QMULMODRB7A98A QMULMODC
Category: Arithm Quiet (arithm_quiet)
QMULMODCB7A98C QMULDIVMOD
Category: Arithm Quiet (arithm_quiet)
QMULDIVMODB7A98D QMULDIVMODR
q=round(x*y/z), r=x*y-z*q
Category: Arithm Quiet (arithm_quiet)
QMULDIVMODRB7A98E QMULDIVMODC
q=ceil(x*y/z), r=x*y-z*q
Category: Arithm Quiet (arithm_quiet)
QMULDIVMODCB7A9A0 QMULADDRSHIFTMOD_VAR
Category: Arithm Quiet (arithm_quiet)
QMULADDRSHIFTMODB7A9A1 QMULADDRSHIFTRMOD_VAR
Category: Arithm Quiet (arithm_quiet)
QMULADDRSHIFTRMODB7A9A2 QMULADDRSHIFTCMOD_VAR
Category: Arithm Quiet (arithm_quiet)
QMULADDRSHIFTCMODB7A9A4 QMULRSHIFT_VAR
0 <= z <= 256
Category: Arithm Quiet (arithm_quiet)
QMULRSHIFTB7A9A5 QMULRSHIFTR_VAR
0 <= z <= 256
Category: Arithm Quiet (arithm_quiet)
QMULRSHIFTRB7A9A6 QMULRSHIFTC_VAR
0 <= z <= 256
Category: Arithm Quiet (arithm_quiet)
QMULRSHIFTCB7A9A8 QMULMODPOW2_VAR
Category: Arithm Quiet (arithm_quiet)
QMULMODPOW2_VARB7A9A9 QMULMODPOW2R_VAR
Category: Arithm Quiet (arithm_quiet)
QMULMODPOW2R_VARB7A9AA QMULMODPOW2C_VAR
Category: Arithm Quiet (arithm_quiet)
QMULMODPOW2C_VARB7A9AC QMULRSHIFTMOD_VAR
Category: Arithm Quiet (arithm_quiet)
QMULRSHIFTMOD_VARB7A9AD QMULRSHIFTRMOD_VAR
Category: Arithm Quiet (arithm_quiet)
QMULRSHIFTRMOD_VARB7A9AE QMULRSHIFTCMOD_VAR
Category: Arithm Quiet (arithm_quiet)
QMULRSHIFTCMOD_VARB7A9B0tt QMULADDRSHIFTMOD
Category: Arithm Quiet (arithm_quiet)
[tt+1] QMULADDRSHIFT#MODB7A9B1tt QMULADDRSHIFTRMOD
Category: Arithm Quiet (arithm_quiet)
[tt+1] QMULADDRSHIFTR#MODB7A9B2tt QMULADDRSHIFTCMOD
Category: Arithm Quiet (arithm_quiet)
[tt+1] QMULADDRSHIFTC#MODB7A9B4tt QMULRSHIFT
Category: Arithm Quiet (arithm_quiet)
[tt+1] QMULRSHIFT#B7A9B5tt QMULRSHIFTR
Category: Arithm Quiet (arithm_quiet)
[tt+1] QMULRSHIFTR#B7A9B6tt QMULRSHIFTC
Category: Arithm Quiet (arithm_quiet)
[tt+1] QMULRSHIFTC#B7A9B8tt QMULMODPOW2
Category: Arithm Quiet (arithm_quiet)
[tt+1] QMULMODPOW2#B7A9B9tt QMULMODPOW2R
Category: Arithm Quiet (arithm_quiet)
[tt+1] QMULMODPOW2R#B7A9BAtt QMULMODPOW2C
Category: Arithm Quiet (arithm_quiet)
[tt+1] QMULMODPOW2C#B7A9BC QMULRSHIFTMOD
Category: Arithm Quiet (arithm_quiet)
QMULRSHIFT#MODB7A9BD QMULRSHIFTRMOD
Category: Arithm Quiet (arithm_quiet)
QMULRSHIFTR#MODB7A9BE QMULRSHIFTCMOD
Category: Arithm Quiet (arithm_quiet)
QMULRSHIFTC#MODB7A9C0 QLSHIFTADDDIVMOD_VAR
Category: Arithm Quiet (arithm_quiet)
QLSHIFTADDDIVMODB7A9C1 QLSHIFTADDDIVMODR_VAR
Category: Arithm Quiet (arithm_quiet)
QLSHIFTADDDIVMODRB7A9C2 QLSHIFTADDDIVMODC_VAR
Category: Arithm Quiet (arithm_quiet)
QLSHIFTADDDIVMODCB7A9C4 QLSHIFTDIV_VAR
0 <= z <= 256
Category: Arithm Quiet (arithm_quiet)
QLSHIFTDIVB7A9C5 QLSHIFTDIVR_VAR
0 <= z <= 256
Category: Arithm Quiet (arithm_quiet)
QLSHIFTDIVRB7A9C6 QLSHIFTDIVC_VAR
0 <= z <= 256
Category: Arithm Quiet (arithm_quiet)
QLSHIFTDIVCB7A9C8 QLSHIFTMOD_VAR
Category: Arithm Quiet (arithm_quiet)
QLSHIFTMODB7A9C9 QLSHIFTMODR_VAR
Category: Arithm Quiet (arithm_quiet)
QLSHIFTMODRB7A9CA QLSHIFTMODC_VAR
Category: Arithm Quiet (arithm_quiet)
QLSHIFTMODCB7A9CC QLSHIFTDIVMOD_VAR
Category: Arithm Quiet (arithm_quiet)
QLSHIFTDIVMODB7A9CD QLSHIFTDIVMODR_VAR
Category: Arithm Quiet (arithm_quiet)
QLSHIFTDIVMODRB7A9CE QLSHIFTDIVMODC_VAR
Category: Arithm Quiet (arithm_quiet)
QLSHIFTDIVMODCB7A9D0tt QLSHIFTADDDIVMOD
Category: Arithm Quiet (arithm_quiet)
[tt+1] QLSHIFT#ADDDIVMODB7A9D1tt QLSHIFTADDDIVMODR
Category: Arithm Quiet (arithm_quiet)
[tt+1] QLSHIFT#ADDDIVMODRB7A9D2tt QLSHIFTADDDIVMODC
Category: Arithm Quiet (arithm_quiet)
[tt+1] QLSHIFT#ADDDIVMODCB7A9D4tt QLSHIFTDIV
Category: Arithm Quiet (arithm_quiet)
[tt+1] QLSHIFT#DIVB7A9D5tt QLSHIFTDIVR
Category: Arithm Quiet (arithm_quiet)
[tt+1] QLSHIFT#DIVRB7A9D6tt QLSHIFTDIVC
Category: Arithm Quiet (arithm_quiet)
[tt+1] QLSHIFT#DIVCB7A9D8tt QLSHIFTMOD
Category: Arithm Quiet (arithm_quiet)
[tt+1] QLSHIFT#MODB7A9D9tt QLSHIFTMODR
Category: Arithm Quiet (arithm_quiet)
[tt+1] QLSHIFT#MODRB7A9DAtt QLSHIFTMODC
Category: Arithm Quiet (arithm_quiet)
[tt+1] QLSHIFT#MODCB7A9DCtt QLSHIFTDIVMOD
Category: Arithm Quiet (arithm_quiet)
[tt+1] QLSHIFT#DIVMODB7A9DDtt QLSHIFTDIVMODR
Category: Arithm Quiet (arithm_quiet)
[tt+1] QLSHIFT#DIVMODRB7A9DEtt QLSHIFTDIVMODC
Category: Arithm Quiet (arithm_quiet)
[tt+1] QLSHIFT#DIVMODCB7AAcc QLSHIFT
0 <= cc <= 255
Category: Arithm Quiet (arithm_quiet)
[cc+1] QLSHIFT#B7ABcc QRSHIFT
0 <= cc <= 255
Category: Arithm Quiet (arithm_quiet)
[cc+1] QRSHIFT#B7AC QLSHIFT_VAR
Category: Arithm Quiet (arithm_quiet)
QLSHIFTB7AD QRSHIFT_VAR
Category: Arithm Quiet (arithm_quiet)
QRSHIFTB7AE QPOW2
Category: Arithm Quiet (arithm_quiet)
QPOW2B7B0 QAND
Category: Arithm Quiet (arithm_quiet)
QANDB7B1 QOR
Category: Arithm Quiet (arithm_quiet)
QORB7B2 QXOR
Category: Arithm Quiet (arithm_quiet)
QXORB7B3 QNOT
Category: Arithm Quiet (arithm_quiet)
QNOTB7B4cc QFITS
Replaces x with a NaN if x is not a cc+1-bit signed integer, leaves it intact otherwise.
Category: Arithm Quiet (arithm_quiet)
[cc+1] QFITSB7B5cc QUFITS
Replaces x with a NaN if x is not a cc+1-bit unsigned integer, leaves it intact otherwise.
Category: Arithm Quiet (arithm_quiet)
[cc+1] QUFITSB7B600 QFITSX
Replaces x with a NaN if x is not a c-bit signed integer, leaves it intact otherwise.
Category: Arithm Quiet (arithm_quiet)
QFITSXB7B601 QUFITSX
Replaces x with a NaN if x is not a c-bit unsigned integer, leaves it intact otherwise.
Category: Arithm Quiet (arithm_quiet)
QUFITSXB8 SGN
Computes the sign of an integer x:-1 if x<0, 0 if x=0, 1 if x>0.
Category: Compare Int (compare_int)
SGNB9 LESS
Returns -1 if x<y, 0 otherwise.
Category: Compare Int (compare_int)
LESSBA EQUAL
Returns -1 if x=y, 0 otherwise.
Category: Compare Int (compare_int)
EQUALBB LEQ
Category: Compare Int (compare_int)
LEQBC GREATER
Category: Compare Int (compare_int)
GREATERBD NEQ
Equivalent to EQUAL NOT.
Category: Compare Int (compare_int)
NEQBE GEQ
Equivalent to LESS NOT.
Category: Compare Int (compare_int)
GEQBF CMP
Computes the sign of x-y:-1 if x<y, 0 if x=y, 1 if x>y.
No integer overflow can occur here unless x or y is a NaN.
Category: Compare Int (compare_int)
CMPC0yy EQINT
Returns -1 if x=yy, 0 otherwise.-2^7 <= yy < 2^7.
Category: Compare Int (compare_int)
[yy] EQINTAliases:
ISZERO
Checks whether an integer is zero. Corresponds to Forth's0=.
C1yy LESSINT
Returns -1 if x<yy, 0 otherwise.-2^7 <= yy < 2^7.
Category: Compare Int (compare_int)
[yy] LESSINT
[yy-1] LEQINTAliases:
ISNEG
Checks whether an integer is negative. Corresponds to Forth's0<.ISNPOS
Checks whether an integer is non-positive.
C2yy GTINT
Returns -1 if x>yy, 0 otherwise.-2^7 <= yy < 2^7.
Category: Compare Int (compare_int)
[yy] GTINT
[yy+1] GEQINTAliases:
ISPOS
Checks whether an integer is positive. Corresponds to Forth's0>.ISNNEG
Checks whether an integer is non-negative.
C3yy NEQINT
Returns -1 if x!=yy, 0 otherwise.-2^7 <= yy < 2^7.
Category: Compare Int (compare_int)
[yy] NEQINTC4 ISNAN
Checks whether x is a NaN.
Category: Compare Int (compare_int)
ISNANC5 CHKNAN
Throws an arithmetic overflow exception if x is a NaN.
Category: Compare Int (compare_int)
CHKNANC700 SEMPTY
Checks whether a Slice s is empty (i.e., contains no bits of data and no cell references).
Category: Compare Other (compare_other)
SEMPTYC701 SDEMPTY
Checks whether Slice s has no bits of data.
Category: Compare Other (compare_other)
SDEMPTYC702 SREMPTY
Checks whether Slice s has no references.
Category: Compare Other (compare_other)
SREMPTYC703 SDFIRST
Checks whether the first bit of Slice s is a one.
Category: Compare Other (compare_other)
SDFIRSTC704 SDLEXCMP
Compares the data of s lexicographically with the data of s', returning -1, 0, or 1 depending on the result.
Category: Compare Other (compare_other)
SDLEXCMPC705 SDEQ
Checks whether the data parts of s and s' coincide, equivalent to SDLEXCMP ISZERO.
Category: Compare Other (compare_other)
SDEQC708 SDPFX
Checks whether s is a prefix of s'.
Category: Compare Other (compare_other)
SDPFXC709 SDPFXREV
Checks whether s' is a prefix of s, equivalent to SWAP SDPFX.
Category: Compare Other (compare_other)
SDPFXREVC70A SDPPFX
Checks whether s is a proper prefix of s' (i.e., a prefix distinct from s').
Category: Compare Other (compare_other)
SDPPFXC70B SDPPFXREV
Checks whether s' is a proper prefix of s.
Category: Compare Other (compare_other)
SDPPFXREVC70C SDSFX
Checks whether s is a suffix of s'.
Category: Compare Other (compare_other)
SDSFXC70D SDSFXREV
Checks whether s' is a suffix of s.
Category: Compare Other (compare_other)
SDSFXREVC70E SDPSFX
Checks whether s is a proper suffix of s'.
Category: Compare Other (compare_other)
SDPSFXC70F SDPSFXREV
Checks whether s' is a proper suffix of s.
Category: Compare Other (compare_other)
SDPSFXREVC710 SDCNTLEAD0
Returns the number of leading zeroes in s.
Category: Compare Other (compare_other)
SDCNTLEAD0C711 SDCNTLEAD1
Returns the number of leading ones in s.
Category: Compare Other (compare_other)
SDCNTLEAD1C712 SDCNTTRAIL0
Returns the number of trailing zeroes in s.
Category: Compare Other (compare_other)
SDCNTTRAIL0C713 SDCNTTRAIL1
Returns the number of trailing ones in s.
Category: Compare Other (compare_other)
SDCNTTRAIL1C8 NEWC
Creates a new empty Builder.
Category: Cell Build (cell_build)
NEWCC9 ENDC
Converts a Builder into an ordinary Cell.
Category: Cell Build (cell_build)
ENDCCAcc STI
Stores a signed cc+1-bit integer x into Builder b for 0 <= cc <= 255, throws a range check exception if x does not fit into cc+1 bits.
Category: Cell Build (cell_build)
[cc+1] STICBcc STU
Stores an unsigned cc+1-bit integer x into Builder b. In all other respects it is similar to STI.
Category: Cell Build (cell_build)
[cc+1] STUCC STREF
Stores a reference to Cell c into Builder b.
Category: Cell Build (cell_build)
STREFCD STBREFR
Equivalent to ENDC SWAP STREF.
Category: Cell Build (cell_build)
STBREFR
ENDCSTCE STSLICE
Stores Slice s into Builder b.
Category: Cell Build (cell_build)
STSLICEAliases:
STDICTS
Stores a Slice-represented dictionarysinto Builderb.
It is actually a synonym forSTSLICE.
CF00 STIX
Stores a signed l-bit integer x into b for 0 <= l <= 257.
Category: Cell Build (cell_build)
STIXCF01 STUX
Stores an unsigned l-bit integer x into b for 0 <= l <= 256.
Category: Cell Build (cell_build)
STUXCF02 STIXR
Similar to STIX, but with arguments in a different order.
Category: Cell Build (cell_build)
STIXRCF03 STUXR
Similar to STUX, but with arguments in a different order.
Category: Cell Build (cell_build)
STUXRCF04 STIXQ
A quiet version of STIX. If there is no space in b, sets b'=b and f=-1.
If x does not fit into l bits, sets b'=b and f=1.
If the operation succeeds, b' is the new Builder and f=0.
However, 0 <= l <= 257, with a range check exception if this is not so.
Category: Cell Build (cell_build)
STIXQCF05 STUXQ
A quiet version of STUX.
Category: Cell Build (cell_build)
STUXQCF06 STIXRQ
A quiet version of STIXR.
Category: Cell Build (cell_build)
STIXRQCF07 STUXRQ
A quiet version of STUXR.
Category: Cell Build (cell_build)
STUXRQCF08cc STI_ALT
A longer version of [cc+1] STI.
Category: Cell Build (cell_build)
[cc+1] STI_lCF09cc STU_ALT
A longer version of [cc+1] STU.
Category: Cell Build (cell_build)
[cc+1] STU_lCF0Acc STIR
Equivalent to SWAP [cc+1] STI.
Category: Cell Build (cell_build)
[cc+1] STIRCF0Bcc STUR
Equivalent to SWAP [cc+1] STU.
Category: Cell Build (cell_build)
[cc+1] STURCF0Ccc STIQ
A quiet version of STI.
Category: Cell Build (cell_build)
[cc+1] STIQCF0Dcc STUQ
A quiet version of STU.
Category: Cell Build (cell_build)
[cc+1] STUQCF0Ecc STIRQ
A quiet version of STIR.
Category: Cell Build (cell_build)
[cc+1] STIRQCF0Fcc STURQ
A quiet version of STUR.
Category: Cell Build (cell_build)
[cc+1] STURQCF10 STREF_ALT
A longer version of STREF.
Category: Cell Build (cell_build)
STREF_lCF11 STBREF
Equivalent to SWAP STBREFR.
Category: Cell Build (cell_build)
STBREFCF12 STSLICE_ALT
A longer version of STSLICE.
Category: Cell Build (cell_build)
STSLICE_lCF13 STB
Appends all data from Builder b' to Builder b.
Category: Cell Build (cell_build)
STBCF14 STREFR
Equivalent to SWAP STREF.
Category: Cell Build (cell_build)
STREFRCF15 STBREFR_ALT
A longer encoding of STBREFR.
Category: Cell Build (cell_build)
STBREFR_lCF16 STSLICER
Equivalent to SWAP STSLICE.
Category: Cell Build (cell_build)
STSLICERCF17 STBR
Concatenates two builders.
Equivalent to SWAP STB.
Category: Cell Build (cell_build)
STBR
BCONCATCF18 STREFQ
Quiet version of STREF.
Category: Cell Build (cell_build)
STREFQCF19 STBREFQ
Quiet version of STBREF.
Category: Cell Build (cell_build)
STBREFQCF1A STSLICEQ
Quiet version of STSLICE.
Category: Cell Build (cell_build)
STSLICEQCF1B STBQ
Quiet version of STB.
Category: Cell Build (cell_build)
STBQCF1C STREFRQ
Quiet version of STREFR.
Category: Cell Build (cell_build)
STREFRQCF1D STBREFRQ
Quiet version of STBREFR.
Category: Cell Build (cell_build)
STBREFRQCF1E STSLICERQ
Quiet version of STSLICER.
Category: Cell Build (cell_build)
STSLICERQCF1F STBRQ
Quiet version of STBR.
Category: Cell Build (cell_build)
STBRQ
BCONCATQCF20 STREFCONST
Equivalent to PUSHREF STREFR.
Category: Cell Build (cell_build)
[ref] STREFCONSTCF21 STREF2CONST
Equivalent to STREFCONST STREFCONST.
Category: Cell Build (cell_build)
[ref] [ref] STREF2CONSTCF23 ENDXC
If x!=0, creates a special or exotic cell from Builder b.
The type of the exotic cell must be stored in the first 8 bits of b.
If x=0, it is equivalent to ENDC. Otherwise some validity checks on the data and references of b are performed before creating the exotic cell.
Category: Cell Build (cell_build)
ENDXCCF28 STILE4
Stores a little-endian signed 32-bit integer.
Category: Cell Build (cell_build)
STILE4CF29 STULE4
Stores a little-endian unsigned 32-bit integer.
Category: Cell Build (cell_build)
STULE4CF2A STILE8
Stores a little-endian signed 64-bit integer.
Category: Cell Build (cell_build)
STILE8CF2B STULE8
Stores a little-endian unsigned 64-bit integer.
Category: Cell Build (cell_build)
STULE8CF30 BDEPTH
Returns the depth of Builder b. If no cell references are stored in b, then x=0; otherwise x is one plus the maximum of depths of cells referred to from b.
Category: Cell Build (cell_build)
BDEPTHCF31 BBITS
Returns the number of data bits already stored in Builder b.
Category: Cell Build (cell_build)
BBITSCF32 BREFS
Returns the number of cell references already stored in b.
Category: Cell Build (cell_build)
BREFSCF33 BBITREFS
Returns the numbers of both data bits and cell references in b.
Category: Cell Build (cell_build)
BBITREFSCF35 BREMBITS
Returns the number of data bits that can still be stored in b.
Category: Cell Build (cell_build)
BREMBITSCF36 BREMREFS
Returns the number of references that can still be stored in b.
Category: Cell Build (cell_build)
BREMREFSCF37 BREMBITREFS
Returns the numbers of both data bits and references that can still be stored in b.
Category: Cell Build (cell_build)
BREMBITREFSCF38cc BCHKBITS
Checks whether cc+1 bits can be stored into b, where 0 <= cc <= 255.
Category: Cell Build (cell_build)
[cc+1] BCHKBITS#CF39 BCHKBITS_VAR
Checks whether x bits can be stored into b, 0 <= x <= 1023. If there is no space for x more bits in b, or if x is not within the range 0...1023, throws an exception.
Category: Cell Build (cell_build)
BCHKBITSCF3A BCHKREFS
Checks whether y references can be stored into b, 0 <= y <= 7.
Category: Cell Build (cell_build)
BCHKREFSCF3B BCHKBITREFS
Checks whether x bits and y references can be stored into b, 0 <= x <= 1023, 0 <= y <= 7.
Category: Cell Build (cell_build)
BCHKBITREFSCF3Ccc BCHKBITSQ
Checks whether cc+1 bits can be stored into b, where 0 <= cc <= 255.
Category: Cell Build (cell_build)
[cc+1] BCHKBITSQ#CF3D BCHKBITSQ_VAR
Checks whether x bits can be stored into b, 0 <= x <= 1023.
Category: Cell Build (cell_build)
BCHKBITSQCF3E BCHKREFSQ
Checks whether y references can be stored into b, 0 <= y <= 7.
Category: Cell Build (cell_build)
BCHKREFSQCF3F BCHKBITREFSQ
Checks whether x bits and y references can be stored into b, 0 <= x <= 1023, 0 <= y <= 7.
Category: Cell Build (cell_build)
BCHKBITREFSQCF40 STZEROES
Stores n binary zeroes into Builder b.
Category: Cell Build (cell_build)
STZEROESCF41 STONES
Stores n binary ones into Builder b.
Category: Cell Build (cell_build)
STONESCF42 STSAME
Stores n binary xes (0 <= x <= 1) into Builder b.
Category: Cell Build (cell_build)
STSAMECF50 BTOS
Same as ENDC CTOS, but without gas cost for cell creation and loading.
Category: Cell Build (cell_build)
BTOSCFC_xysss STSLICECONST
Stores a constant subslice sss.
Details: sss consists of 0 <= x <= 3 references and up to 8y+2 data bits, with 0 <= y <= 7. Completion bit is assumed.
Note that the assembler can replace STSLICECONST with PUSHSLICE STSLICER if the slice is too big.
Category: Cell Build (cell_build)
[slice] STSLICECONSTAliases:
STZERO
Stores one binary zero.STONE
Stores one binary one.
D0 CTOS
Converts a Cell into a Slice. Notice that c must be either an ordinary cell, or an exotic cell which is automatically loaded to yield an ordinary cell c', converted into a Slice afterwards.
Category: Cell Parse (cell_parse)
CTOSD1 ENDS
Removes a Slice s from the stack, and throws an exception if it is not empty.
Category: Cell Parse (cell_parse)
ENDSD2cc LDI
Loads (i.e., parses) a signed cc+1-bit integer x from Slice s, and returns the remainder of s as s'.
Category: Cell Parse (cell_parse)
[cc+1] LDID3cc LDU
Loads an unsigned cc+1-bit integer x from Slice s.
Category: Cell Parse (cell_parse)
[cc+1] LDUD4 LDREF
Loads a cell reference c from s.
Category: Cell Parse (cell_parse)
LDREFD5 LDREFRTOS
Equivalent to LDREF SWAP CTOS.
Category: Cell Parse (cell_parse)
LDREFRTOSD6cc LDSLICE
Cuts the next cc+1 bits of s into a separate Slice s''.
Category: Cell Parse (cell_parse)
[cc+1] LDSLICED700 LDIX
Loads a signed l-bit (0 <= l <= 257) integer x from Slice s, and returns the remainder of s as s'.
Category: Cell Parse (cell_parse)
LDIXD701 LDUX
Loads an unsigned l-bit integer x from (the first l bits of) s, with 0 <= l <= 256.
Category: Cell Parse (cell_parse)
LDUXD702 PLDIX
Preloads a signed l-bit integer from Slice s, for 0 <= l <= 257.
Category: Cell Parse (cell_parse)
PLDIXD703 PLDUX
Preloads an unsigned l-bit integer from s, for 0 <= l <= 256.
Category: Cell Parse (cell_parse)
PLDUXD704 LDIXQ
Quiet version of LDIX: loads a signed l-bit integer from s similarly to LDIX, but returns a success flag, equal to -1 on success or to 0 on failure (if s does not have l bits), instead of throwing a cell underflow exception.
Category: Cell Parse (cell_parse)
LDIXQD705 LDUXQ
Quiet version of LDUX.
Category: Cell Parse (cell_parse)
LDUXQD706 PLDIXQ
Quiet version of PLDIX.
Category: Cell Parse (cell_parse)
PLDIXQD707 PLDUXQ
Quiet version of PLDUX.
Category: Cell Parse (cell_parse)
PLDUXQD708cc LDI_ALT
A longer encoding for LDI.
Category: Cell Parse (cell_parse)
[cc+1] LDI_lD709cc LDU_ALT
A longer encoding for LDU.
Category: Cell Parse (cell_parse)
[cc+1] LDU_lD70Acc PLDI
Preloads a signed cc+1-bit integer from Slice s.
Category: Cell Parse (cell_parse)
[cc+1] PLDID70Bcc PLDU
Preloads an unsigned cc+1-bit integer from s.
Category: Cell Parse (cell_parse)
[cc+1] PLDUD70Ccc LDIQ
A quiet version of LDI.
Category: Cell Parse (cell_parse)
[cc+1] LDIQD70Dcc LDUQ
A quiet version of LDU.
Category: Cell Parse (cell_parse)
[cc+1] LDUQD70Ecc PLDIQ
A quiet version of PLDI.
Category: Cell Parse (cell_parse)
[cc+1] PLDIQD70Fcc PLDUQ
A quiet version of PLDU.
Category: Cell Parse (cell_parse)
[cc+1] PLDUQD714_c PLDUZ
Preloads the first 32(c+1) bits of Slice s into an unsigned integer x, for 0 <= c <= 7. If s is shorter than necessary, missing bits are assumed to be zero. This operation is intended to be used along with IFBITJMP and similar instructions.
Category: Cell Parse (cell_parse)
[32(c+1)] PLDUZD718 LDSLICEX
Loads the first 0 <= l <= 1023 bits from Slice s into a separate Slice s'', returning the remainder of s as s'.
Category: Cell Parse (cell_parse)
LDSLICEXD719 PLDSLICEX
Returns the first 0 <= l <= 1023 bits of s as s''.
Category: Cell Parse (cell_parse)
PLDSLICEXD71A LDSLICEXQ
A quiet version of LDSLICEX.
Category: Cell Parse (cell_parse)
LDSLICEXQD71B PLDSLICEXQ
A quiet version of LDSLICEXQ.
Category: Cell Parse (cell_parse)
PLDSLICEXQD71Ccc LDSLICE_ALT
A longer encoding for LDSLICE.
Category: Cell Parse (cell_parse)
[cc+1] LDSLICE_lD71Dcc PLDSLICE
Returns the first 0 < cc+1 <= 256 bits of s as s''.
Category: Cell Parse (cell_parse)
[cc+1] PLDSLICED71Ecc LDSLICEQ
A quiet version of LDSLICE.
Category: Cell Parse (cell_parse)
[cc+1] LDSLICEQD71Fcc PLDSLICEQ
A quiet version of PLDSLICE.
Category: Cell Parse (cell_parse)
[cc+1] PLDSLICEQD720 SDCUTFIRST
Returns the first 0 <= l <= 1023 bits of s. It is equivalent to PLDSLICEX.
Category: Cell Parse (cell_parse)
SDCUTFIRSTD721 SDSKIPFIRST
Returns all but the first 0 <= l <= 1023 bits of s. It is equivalent to LDSLICEX NIP.
Category: Cell Parse (cell_parse)
SDSKIPFIRSTD722 SDCUTLAST
Returns the last 0 <= l <= 1023 bits of s.
Category: Cell Parse (cell_parse)
SDCUTLASTD723 SDSKIPLAST
Returns all but the last 0 <= l <= 1023 bits of s.
Category: Cell Parse (cell_parse)
SDSKIPLASTD724 SDSUBSTR
Returns 0 <= l' <= 1023 bits of s starting from offset 0 <= l <= 1023, thus extracting a bit substring out of the data of s.
Category: Cell Parse (cell_parse)
SDSUBSTRD726 SDBEGINSX
Checks whether s begins with (the data bits of) s', and removes s' from s on success. On failure throws a cell deserialization exception. Primitive SDPFXREV can be considered a quiet version of SDBEGINSX.
Category: Cell Parse (cell_parse)
SDBEGINSXD727 SDBEGINSXQ
A quiet version of SDBEGINSX.
Category: Cell Parse (cell_parse)
SDBEGINSXQD72A_xsss SDBEGINS
Checks whether s begins with constant bitstring sss of length 8x+3 (with continuation bit assumed), where 0 <= x <= 127, and removes sss from s on success.
Category: Cell Parse (cell_parse)
[slice] SDBEGINSD72E_xsss SDBEGINSQ
A quiet version of SDBEGINS.
Category: Cell Parse (cell_parse)
[slice] SDBEGINSQD730 SCUTFIRST
Returns the first 0 <= l <= 1023 bits and first 0 <= r <= 4 references of s.
Category: Cell Parse (cell_parse)
SCUTFIRSTD731 SSKIPFIRST
Returns all but the first l bits of s and r references of s.
Category: Cell Parse (cell_parse)
SSKIPFIRSTD732 SCUTLAST
Returns the last 0 <= l <= 1023 data bits and last 0 <= r <= 4 references of s.
Category: Cell Parse (cell_parse)
SCUTLASTD733 SSKIPLAST
Returns all but the last l bits of s and r references of s.
Category: Cell Parse (cell_parse)
SSKIPLASTD734 SUBSLICE
Returns 0 <= l' <= 1023 bits and 0 <= r' <= 4 references from Slice s, after skipping the first 0 <= l <= 1023 bits and first 0 <= r <= 4 references.
Category: Cell Parse (cell_parse)
SUBSLICED736 SPLIT
Splits the first 0 <= l <= 1023 data bits and first 0 <= r <= 4 references from s into s', returning the remainder of s as s''.
Category: Cell Parse (cell_parse)
SPLITD737 SPLITQ
A quiet version of SPLIT.
Category: Cell Parse (cell_parse)
SPLITQD739 XCTOS
Transforms an ordinary or exotic cell into a Slice, as if it were an ordinary cell. A flag is returned indicating whether c is exotic. If that be the case, its type can later be deserialized from the first eight bits of s.
Category: Cell Parse (cell_parse)
XCTOSD73A XLOAD
Loads an exotic cell c and returns an ordinary cell c'. If c is already ordinary, does nothing. If c cannot be loaded, throws an exception.
Category: Cell Parse (cell_parse)
XLOADD73B XLOADQ
Loads an exotic cell c and returns an ordinary cell c'. If c is already ordinary, does nothing. If c cannot be loaded, returns 0.
Category: Cell Parse (cell_parse)
XLOADQD741 SCHKBITS
Checks whether there are at least l data bits in Slice s. If this is not the case, throws a cell deserialisation (i.e., cell underflow) exception.
Category: Cell Parse (cell_parse)
SCHKBITSD742 SCHKREFS
Checks whether there are at least r references in Slice s.
Category: Cell Parse (cell_parse)
SCHKREFSD743 SCHKBITREFS
Checks whether there are at least l data bits and r references in Slice s.
Category: Cell Parse (cell_parse)
SCHKBITREFSD745 SCHKBITSQ
Checks whether there are at least l data bits in Slice s.
Category: Cell Parse (cell_parse)
SCHKBITSQD746 SCHKREFSQ
Checks whether there are at least r references in Slice s.
Category: Cell Parse (cell_parse)
SCHKREFSQD747 SCHKBITREFSQ
Checks whether there are at least l data bits and r references in Slice s.
Category: Cell Parse (cell_parse)
SCHKBITREFSQD748 PLDREFVAR
Returns the n-th cell reference of Slice s for 0 <= n <= 3.
Category: Cell Parse (cell_parse)
PLDREFVARD749 SBITS
Returns the number of data bits in Slice s.
Category: Cell Parse (cell_parse)
SBITSD74A SREFS
Returns the number of references in Slice s.
Category: Cell Parse (cell_parse)
SREFSD74B SBITREFS
Returns both the number of data bits and the number of references in s.
Category: Cell Parse (cell_parse)
SBITREFSD74E_n PLDREFIDX
Returns the n-th cell reference of Slice s, where 0 <= n <= 3.
Category: Cell Parse (cell_parse)
[n] PLDREFIDXAliases:
PLDREF
Preloads the first cell reference of a Slice.
D750 LDILE4
Loads a little-endian signed 32-bit integer.
Category: Cell Parse (cell_parse)
LDILE4D751 LDULE4
Loads a little-endian unsigned 32-bit integer.
Category: Cell Parse (cell_parse)
LDULE4D752 LDILE8
Loads a little-endian signed 64-bit integer.
Category: Cell Parse (cell_parse)
LDILE8D753 LDULE8
Loads a little-endian unsigned 64-bit integer.
Category: Cell Parse (cell_parse)
LDULE8D754 PLDILE4
Preloads a little-endian signed 32-bit integer.
Category: Cell Parse (cell_parse)
PLDILE4D755 PLDULE4
Preloads a little-endian unsigned 32-bit integer.
Category: Cell Parse (cell_parse)
PLDULE4D756 PLDILE8
Preloads a little-endian signed 64-bit integer.
Category: Cell Parse (cell_parse)
PLDILE8D757 PLDULE8
Preloads a little-endian unsigned 64-bit integer.
Category: Cell Parse (cell_parse)
PLDULE8D758 LDILE4Q
Quietly loads a little-endian signed 32-bit integer.
Category: Cell Parse (cell_parse)
LDILE4QD759 LDULE4Q
Quietly loads a little-endian unsigned 32-bit integer.
Category: Cell Parse (cell_parse)
LDULE4QD75A LDILE8Q
Quietly loads a little-endian signed 64-bit integer.
Category: Cell Parse (cell_parse)
LDILE8QD75B LDULE8Q
Quietly loads a little-endian unsigned 64-bit integer.
Category: Cell Parse (cell_parse)
LDULE8QD75C PLDILE4Q
Quietly preloads a little-endian signed 32-bit integer.
Category: Cell Parse (cell_parse)
PLDILE4QD75D PLDULE4Q
Quietly preloads a little-endian unsigned 32-bit integer.
Category: Cell Parse (cell_parse)
PLDULE4QD75E PLDILE8Q
Quietly preloads a little-endian signed 64-bit integer.
Category: Cell Parse (cell_parse)
PLDILE8QD75F PLDULE8Q
Quietly preloads a little-endian unsigned 64-bit integer.
Category: Cell Parse (cell_parse)
PLDULE8QD760 LDZEROES
Returns the count n of leading zero bits in s, and removes these bits from s.
Category: Cell Parse (cell_parse)
LDZEROESD761 LDONES
Returns the count n of leading one bits in s, and removes these bits from s.
Category: Cell Parse (cell_parse)
LDONESD762 LDSAME
Returns the count n of leading bits equal to 0 <= x <= 1 in s, and removes these bits from s.
Category: Cell Parse (cell_parse)
LDSAMED764 SDEPTH
Returns the depth of Slice s. If s has no references, then x=0; otherwise x is one plus the maximum of depths of cells referred to from s.
Category: Cell Parse (cell_parse)
SDEPTHD765 CDEPTH
Returns the depth of Cell c. If c has no references, then x=0; otherwise x is one plus the maximum of depths of cells referred to from c. If c is a Null instead of a Cell, returns zero.
Category: Cell Parse (cell_parse)
CDEPTHD766 CLEVEL
Returns level of the cell.
Category: Cell Parse (cell_parse)
CLEVELD767 CLEVELMASK
Returns level mask of the cell.
Category: Cell Parse (cell_parse)
CLEVELMASKD76A_ CHASHI
Returns ith hash of the cell.
Category: Cell Parse (cell_parse)
[i] CHASHID76E_ CDEPTHI
Returns ith depth of the cell.
Category: Cell Parse (cell_parse)
[i] CDEPTHID770 CHASHIX
Returns ith hash of the cell.
Category: Cell Parse (cell_parse)
CHASHIXD771 CDEPTHIX
Returns ith depth of the cell.
Category: Cell Parse (cell_parse)
CDEPTHIXD8 EXECUTE
Calls, or executes, continuation c.
Category: Cont Basic (cont_basic)
EXECUTE
CALLXD9 JMPX
Jumps, or transfers control, to continuation c.
The remainder of the previous current continuation cc is discarded.
Category: Cont Basic (cont_basic)
JMPXDApr CALLXARGS
Calls continuation c with p parameters and expecting r return values0 <= p <= 15, 0 <= r <= 15
Category: Cont Basic (cont_basic)
[p] [r] CALLXARGSDB0p CALLXARGS_VAR
Calls continuation c with 0 <= p <= 15 parameters, expecting an arbitrary number of return values.
Category: Cont Basic (cont_basic)
[p] -1 CALLXARGSDB1p JMPXARGS
Jumps to continuation c, passing only the top 0 <= p <= 15 values from the current stack to it (the remainder of the current stack is discarded).
Category: Cont Basic (cont_basic)
[p] JMPXARGSDB2r RETARGS
Returns to c0, with 0 <= r <= 15 return values taken from the current stack.
Category: Cont Basic (cont_basic)
[r] RETARGSDB30 RET
Returns to the continuation at c0. The remainder of the current continuation cc is discarded.
Approximately equivalent to c0 PUSHCTR JMPX.
Category: Cont Basic (cont_basic)
RET
RETTRUEDB31 RETALT
Returns to the continuation at c1.
Approximately equivalent to c1 PUSHCTR JMPX.
Category: Cont Basic (cont_basic)
RETALT
RETFALSEDB32 BRANCH
Performs RETTRUE if integer f!=0, or RETFALSE if f=0.
Category: Cont Basic (cont_basic)
BRANCH
RETBOOLDB34 CALLCC
Call with current continuation, transfers control to c, pushing the old value of cc into c's stack (instead of discarding it or writing it into new c0).
Category: Cont Basic (cont_basic)
CALLCCDB35 JMPXDATA
Similar to CALLCC, but the remainder of the current continuation (the old value of cc) is converted into a Slice before pushing it into the stack of c.
Category: Cont Basic (cont_basic)
JMPXDATADB36pr CALLCCARGS
Similar to CALLXARGS, but pushes the old value of cc (along with the top 0 <= p <= 15 values from the original stack) into the stack of newly-invoked continuation c, setting cc.nargs to -1 <= r <= 14.
Category: Cont Basic (cont_basic)
[p] [r] CALLCCARGSDB38 CALLXVARARGS
Similar to CALLXARGS, but takes -1 <= p,r <= 254 from the stack. The next three operations also take p and r from the stack, both in the range -1...254.
Category: Cont Basic (cont_basic)
CALLXVARARGSDB39 RETVARARGS
Similar to RETARGS.
Category: Cont Basic (cont_basic)
RETVARARGSDB3A JMPXVARARGS
Similar to JMPXARGS.
Category: Cont Basic (cont_basic)
JMPXVARARGSDB3B CALLCCVARARGS
Similar to CALLCCARGS.
Category: Cont Basic (cont_basic)
CALLCCVARARGSDB3C CALLREF
Equivalent to PUSHREFCONT CALLX.
Category: Cont Basic (cont_basic)
[ref] CALLREFDB3D JMPREF
Equivalent to PUSHREFCONT JMPX.
Category: Cont Basic (cont_basic)
[ref] JMPREFDB3E JMPREFDATA
Equivalent to PUSHREFCONT JMPXDATA.
Category: Cont Basic (cont_basic)
[ref] JMPREFDATADB3F RETDATA
Equivalent to c0 PUSHCTR JMPXDATA. In this way, the remainder of the current continuation is converted into a Slice and returned to the caller.
Category: Cont Basic (cont_basic)
RETDATADB4fff RUNVM
Runs child VM with code code and stack x_1...x_n. Returns the resulting stack x'_1...x'_m and exitcode. Other arguments and return values are enabled by flags.
Flags operate similarly to RUNVMX in Fift:
- +1: sets c3 to code.
- +2: pushes an implicit 0 before executing the code.
- +4: takes persistent data c4 from the stack and returns its final value.
- +8: takes the gas limit g_l from the stack and returns the consumed gas g_c.
- +16: takes c7 (smart contract context) from the stack.
- +32: returns the final value of c5 (actions).
- +64: pops the hard gas limit g_m enabled by ACCEPT from the stack.
- +128: enables "isolated gas consumption", meaning the child VM maintains a separate set of visited cells and a chksgn counter.
- +256: pops an integer r and ensures exactly r values are returned from the top of the stack:
- If RUNVM call succeeds and r is set, it returns r elements. If r is not set, it returns all available elements.
- If RUNVM is successful but lacks elements on the stack, meaning the stack depth is less than r, it is treated as an exception in the child VM. The exit_code is set to -3, and exit_arg is set to 0, so 0 is returned as the only stack element.
- If RUNVM fails with an exception, only one element is returned, exit_arg, which should not be confused with exit_code.
- In the case of running out of gas, exit_code is set to -14, and exit_arg contains the amount of gas.
Gas cost:
- 66 gas;
- 1 gas for each stack element passed to the child VM (the first 32 elements are free);
- 1 gas for each stack element returned from the child VM (the first 32 elements are free).
Category: Cont Basic (cont_basic)
flags RUNVMDB50 RUNVMX
Runs child VM with code code and stack x_1...x_n. Returns the resulting stack x'_1...x'_m and exitcode. Other arguments and return values are enabled by flags.
Flags operate similarly to RUNVMX in Fift:
- +1: sets c3 to code.
- +2: pushes an implicit 0 before executing the code.
- +4: takes persistent data c4 from the stack and returns its final value.
- +8: takes the gas limit g_l from the stack and returns the consumed gas g_c.
- +16: takes c7 (smart contract context) from the stack.
- +32: returns the final value of c5 (actions).
- +64: pops the hard gas limit g_m enabled by ACCEPT from the stack.
- +128: enables "isolated gas consumption", meaning the child VM maintains a separate set of visited cells and a chksgn counter.
- +256: pops an integer r and ensures exactly r values are returned from the top of the stack:
- If RUNVM call succeeds and r is set, it returns r elements. If r is not set, it returns all available elements.
- If RUNVM is successful but lacks elements on the stack, meaning the stack depth is less than r, it is treated as an exception in the child VM. The exit_code is set to -3, and exit_arg is set to 0, so 0 is returned as the only stack element.
- If RUNVM fails with an exception, only one element is returned, exit_arg, which should not be confused with exit_code.
- In the case of running out of gas, exit_code is set to -14, and exit_arg contains the amount of gas.
Gas cost:
- 66 gas;
- 1 gas for each stack element passed to the child VM (the first 32 elements are free);
- 1 gas for each stack element returned from the child VM (the first 32 elements are free).
Category: Cont Basic (cont_basic)
RUNVMXDC IFRET
Performs a RET, but only if integer f is non-zero. If f is a NaN, throws an integer overflow exception.
Category: Cont Conditional (cont_conditional)
IFRET
IFNOT:DD IFNOTRET
Performs a RET, but only if integer f is zero.
Category: Cont Conditional (cont_conditional)
IFNOTRET
IF:DE IF
Performs EXECUTE for c (i.e., executes c), but only if integer f is non-zero. Otherwise simply discards both values.
Category: Cont Conditional (cont_conditional)
IFDF IFNOT
Executes continuation c, but only if integer f is zero. Otherwise simply discards both values.
Category: Cont Conditional (cont_conditional)
IFNOTE0 IFJMP
Jumps to c (similarly to JMPX), but only if f is non-zero.
Category: Cont Conditional (cont_conditional)
IFJMPE1 IFNOTJMP
Jumps to c (similarly to JMPX), but only if f is zero.
Category: Cont Conditional (cont_conditional)
IFNOTJMPE2 IFELSE
If integer f is non-zero, executes c, otherwise executes c'. Equivalent to CONDSELCHK EXECUTE.
Category: Cont Conditional (cont_conditional)
IFELSEE300 IFREF
Equivalent to PUSHREFCONT IF, with the optimization that the cell reference is not actually loaded into a Slice and then converted into an ordinary Continuation if f=0.
Gas consumption of this primitive depends on whether f=0 and whether the reference was loaded before.
Similar remarks apply other primitives that accept a continuation as a reference.
Category: Cont Conditional (cont_conditional)
[ref] IFREFE301 IFNOTREF
Equivalent to PUSHREFCONT IFNOT.
Category: Cont Conditional (cont_conditional)
[ref] IFNOTREFE302 IFJMPREF
Equivalent to PUSHREFCONT IFJMP.
Category: Cont Conditional (cont_conditional)
[ref] IFJMPREFE303 IFNOTJMPREF
Equivalent to PUSHREFCONT IFNOTJMP.
Category: Cont Conditional (cont_conditional)
[ref] IFNOTJMPREFE304 CONDSEL
If integer f is non-zero, returns x, otherwise returns y. Notice that no type checks are performed on x and y; as such, it is more like a conditional stack operation. Roughly equivalent to ROT ISZERO INC ROLLX NIP.
Category: Cont Conditional (cont_conditional)
CONDSELE305 CONDSELCHK
Same as CONDSEL, but first checks whether x and y have the same type.
Category: Cont Conditional (cont_conditional)
CONDSELCHKE308 IFRETALT
Performs RETALT if integer f!=0.
Category: Cont Conditional (cont_conditional)
IFRETALTE309 IFNOTRETALT
Performs RETALT if integer f=0.
Category: Cont Conditional (cont_conditional)
IFNOTRETALTE30D IFREFELSE
Equivalent to PUSHREFCONT SWAP IFELSE, with the optimization that the cell reference is not actually loaded into a Slice and then converted into an ordinary Continuation if f=0. Similar remarks apply to the next two primitives: cells are converted into continuations only when necessary.
Category: Cont Conditional (cont_conditional)
[ref] IFREFELSEE30E IFELSEREF
Equivalent to PUSHREFCONT IFELSE.
Category: Cont Conditional (cont_conditional)
[ref] IFELSEREFE30F IFREFELSEREF
Equivalent to PUSHREFCONT PUSHREFCONT IFELSE.
Category: Cont Conditional (cont_conditional)
[ref] [ref] IFREFELSEREFE39_n IFBITJMP
Checks whether bit 0 <= n <= 31 is set in integer x, and if so, performs JMPX to continuation c. Value x is left in the stack.
Category: Cont Conditional (cont_conditional)
[n] IFBITJMPE3B_n IFNBITJMP
Jumps to c if bit 0 <= n <= 31 is not set in integer x.
Category: Cont Conditional (cont_conditional)
[n] IFNBITJMPE3D_n IFBITJMPREF
Performs a JMPREF if bit 0 <= n <= 31 is set in integer x.
Category: Cont Conditional (cont_conditional)
[ref] [n] IFBITJMPREFE3F_n IFNBITJMPREF
Performs a JMPREF if bit 0 <= n <= 31 is not set in integer x.
Category: Cont Conditional (cont_conditional)
[ref] [n] IFNBITJMPREFE4 REPEAT
Executes continuation c n times, if integer n is non-negative. If n>=2^31 or n<-2^31, generates a range check exception.
Notice that a RET inside the code of c works as a continue, not as a break. One should use either alternative (experimental) loops or alternative RETALT (along with a SETEXITALT before the loop) to break out of a loop.
Category: Cont Loops (cont_loops)
REPEATE5 REPEATEND
Similar to REPEAT, but it is applied to the current continuation cc.
Category: Cont Loops (cont_loops)
REPEATEND
REPEAT:E6 UNTIL
Executes continuation c, then pops an integer x from the resulting stack. If x is zero, performs another iteration of this loop. The actual implementation of this primitive involves an extraordinary continuation ec_until with its arguments set to the body of the loop (continuation c) and the original current continuation cc. This extraordinary continuation is then saved into the savelist of c as c.c0 and the modified c is then executed. The other loop primitives are implemented similarly with the aid of suitable extraordinary continuations.
Category: Cont Loops (cont_loops)
UNTILE7 UNTILEND
Similar to UNTIL, but executes the current continuation cc in a loop. When the loop exit condition is satisfied, performs a RET.
Category: Cont Loops (cont_loops)
UNTILEND
UNTIL:E8 WHILE
Executes c' and pops an integer x from the resulting stack. If x is zero, exists the loop and transfers control to the original cc. If x is non-zero, executes c, and then begins a new iteration.
Category: Cont Loops (cont_loops)
WHILEE9 WHILEEND
Similar to WHILE, but uses the current continuation cc as the loop body.
Category: Cont Loops (cont_loops)
WHILEENDEA AGAIN
Similar to REPEAT, but executes c infinitely many times. A RET only begins a new iteration of the infinite loop, which can be exited only by an exception, or a RETALT (or an explicit JMPX).
Category: Cont Loops (cont_loops)
AGAINEB AGAINEND
Similar to AGAIN, but performed with respect to the current continuation cc.
Category: Cont Loops (cont_loops)
AGAINEND
AGAIN:E314 REPEATBRK
Similar to REPEAT, but also sets c1 to the original cc after saving the old value of c1 into the savelist of the original cc. In this way RETALT could be used to break out of the loop body.
Category: Cont Loops (cont_loops)
REPEATBRKE315 REPEATENDBRK
Similar to REPEATEND, but also sets c1 to the original c0 after saving the old value of c1 into the savelist of the original c0. Equivalent to SAMEALTSAVE REPEATEND.
Category: Cont Loops (cont_loops)
REPEATENDBRKE316 UNTILBRK
Similar to UNTIL, but also modifies c1 in the same way as REPEATBRK.
Category: Cont Loops (cont_loops)
UNTILBRKE317 UNTILENDBRK
Equivalent to SAMEALTSAVE UNTILEND.
Category: Cont Loops (cont_loops)
UNTILENDBRK
UNTILBRK:E318 WHILEBRK
Similar to WHILE, but also modifies c1 in the same way as REPEATBRK.
Category: Cont Loops (cont_loops)
WHILEBRKE319 WHILEENDBRK
Equivalent to SAMEALTSAVE WHILEEND.
Category: Cont Loops (cont_loops)
WHILEENDBRKE31A AGAINBRK
Similar to AGAIN, but also modifies c1 in the same way as REPEATBRK.
Category: Cont Loops (cont_loops)
AGAINBRKE31B AGAINENDBRK
Equivalent to SAMEALTSAVE AGAINEND.
Category: Cont Loops (cont_loops)
AGAINENDBRK
AGAINBRK:ECrn SETCONTARGS_N
Pushes 0 <= r <= 15 values x_1...x_r into the stack of (a copy of) the continuation c, starting with x_1. When n is 15 (-1 in Fift notation), does nothing with c.nargs. For 0 <= n <= 14, sets c.nargs to the final size of the stack of c' plus n. In other words, transforms c into a closure or a partially applied function, with 0 <= n <= 14 arguments missing.
Category: Cont Stack (cont_stack)
[r] [n] SETCONTARGSAliases:
SETNUMARGS
Setsc.nargstonplus the current depth ofc's stack, where0 <= n <= 14. Ifc.nargsis already set to a non-negative value, does nothing.SETCONTARGS
Pushes0 <= 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.
ED0p RETURNARGS
Leaves only the top 0 <= p <= 15 values in the current stack (somewhat similarly to ONLYTOPX), with all the unused bottom values not discarded, but saved into continuation c0 in the same way as SETCONTARGS does.
Category: Cont Stack (cont_stack)
[p] RETURNARGSED10 RETURNVARARGS
Similar to RETURNARGS, but with Integer 0 <= p <= 255 taken from the stack.
Category: Cont Stack (cont_stack)
RETURNVARARGSED11 SETCONTVARARGS
Similar to SETCONTARGS, but with 0 <= r <= 255 and -1 <= n <= 255 taken from the stack.
Category: Cont Stack (cont_stack)
SETCONTVARARGSED12 SETNUMVARARGS
-1 <= n <= 255
If n=-1, this operation does nothing (c'=c).
Otherwise its action is similar to [n] SETNUMARGS, but with n taken from the stack.
Category: Cont Stack (cont_stack)
SETNUMVARARGSED1E BLESS
Transforms a Slice s into a simple ordinary continuation c, with c.code=s and an empty stack and savelist.
Category: Cont Create (cont_create)
BLESSED1F BLESSVARARGS
Equivalent to ROT BLESS ROTREV SETCONTVARARGS.
Category: Cont Create (cont_create)
BLESSVARARGSEErn BLESSARGS
0 <= r <= 15, -1 <= n <= 14
Equivalent to BLESS [r] [n] SETCONTARGS.
The value of n is represented inside the instruction by the 4-bit integer n mod 16.
Category: Cont Create (cont_create)
[r] [n] BLESSARGSAliases:
BLESSNUMARGS
Also transforms a Slicesinto a Continuationc, but setsc.nargsto0 <= n <= 14.
ED4i PUSHCTR
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.
Category: Cont Registers (cont_registers)
c[i] PUSHCTR
c[i] PUSHAliases:
PUSHROOT
Pushes the ''global data root'' cell reference, thus enabling access to persistent smart-contract data.
ED5i POPCTR
Pops a value x from the stack and stores it into control register c(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.
Category: Cont Registers (cont_registers)
c[i] POPCTR
c[i] POPAliases:
POPROOT
Sets the ''global data root'' cell reference, thus allowing modification of persistent smart-contract data.
ED6i SETCONTCTR
Stores x into the savelist of continuation c as c(i), and returns the resulting continuation c'. Almost all operations with continuations may be expressed in terms of SETCONTCTR, POPCTR, and PUSHCTR.
Category: Cont Registers (cont_registers)
c[i] SETCONT
c[i] SETCONTCTRED7i SETRETCTR
Equivalent to c0 PUSHCTR c[i] SETCONTCTR c0 POPCTR.
Category: Cont Registers (cont_registers)
c[i] SETRETCTRED8i SETALTCTR
Equivalent to c1 PUSHCTR c[i] SETCONTCTR c1 POPCTR.
Category: Cont Registers (cont_registers)
c[i] SETALTCTRED9i POPSAVE
Similar to c[i] POPCTR, but also saves the old value of c[i] into continuation c0.
Equivalent (up to exceptions) to c[i] SAVECTR c[i] POPCTR.
Category: Cont Registers (cont_registers)
c[i] POPSAVE
c[i] POPCTRSAVEEDAi SAVE
Saves the current value of c(i) into the savelist of continuation c0. If an entry for c[i] is already present in the savelist of c0, nothing is done. Equivalent to c[i] PUSHCTR c[i] SETRETCTR.
Category: Cont Registers (cont_registers)
c[i] SAVE
c[i] SAVECTREDBi SAVEALT
Similar to c[i] SAVE, but saves the current value of c[i] into the savelist of c1, not c0.
Category: Cont Registers (cont_registers)
c[i] SAVEALT
c[i] SAVEALTCTREDCi SAVEBOTH
Equivalent to c[i] SAVE c[i] SAVEALT.
Category: Cont Registers (cont_registers)
c[i] SAVEBOTH
c[i] SAVEBOTHCTREDE0 PUSHCTRX
Similar to c[i] PUSHCTR, but with i, 0 <= i <= 255, taken from the stack.
Notice that this primitive is one of the few ''exotic'' primitives, which are not polymorphic like stack manipulation primitives, and at the same time do not have well-defined types of parameters and return values, because the type of x depends on i.
Category: Cont Registers (cont_registers)
PUSHCTRXEDE1 POPCTRX
Similar to c[i] POPCTR, but with 0 <= i <= 255 from the stack.
Category: Cont Registers (cont_registers)
POPCTRXEDE2 SETCONTCTRX
Similar to c[i] SETCONTCTR, but with 0 <= i <= 255 from the stack.
Category: Cont Registers (cont_registers)
SETCONTCTRXEDE3mm SETCONTCTRMANY
Takes continuation, performs the equivalent of c[i] PUSHCTR SWAP c[i] SETCONTCNR for each i that is set in mask (mask is in 0..255).
Category: Cont Registers (cont_registers)
SETCONTCTRMANY
SETCONTMANYEDE4 SETCONTCTRMANYX
Takes continuation, performs the equivalent of c[i] PUSHCTR SWAP c[i] SETCONTCNR for each i that is set in mask (mask is in 0..255).
Category: Cont Registers (cont_registers)
SETCONTCTRMANYX
SETCONTMANYXEDF0 COMPOS
Computes the composition compose0(c, c'), which has the meaning of ''perform c, and, if successful, perform c''' (if c is a boolean circuit) or simply ''perform c, then c'''. Equivalent to SWAP c0 SETCONT.
Category: Cont Registers (cont_registers)
COMPOS
BOOLANDEDF1 COMPOSALT
Computes the alternative composition compose1(c, c'), which has the meaning of ''perform c, and, if not successful, perform c''' (if c is a boolean circuit). Equivalent to SWAP c1 SETCONT.
Category: Cont Registers (cont_registers)
COMPOSALT
BOOLOREDF2 COMPOSBOTH
Computes composition compose1(compose0(c, c'), c'), which has the meaning of ''compute boolean circuit c, then compute c', regardless of the result of c''.
Category: Cont Registers (cont_registers)
COMPOSBOTHEDF3 ATEXIT
Sets c0 to compose0(c, c0). In other words, c will be executed before exiting current subroutine.
Category: Cont Registers (cont_registers)
ATEXITEDF4 ATEXITALT
Sets c1 to compose1(c, c1). In other words, c will be executed before exiting current subroutine by its alternative return path.
Category: Cont Registers (cont_registers)
ATEXITALTEDF5 SETEXITALT
Sets c1 to compose1(compose0(c, c0), c1),
In this way, a subsequent RETALT will first execute c, then transfer control to the original c0. This can be used, for instance, to exit from nested loops.
Category: Cont Registers (cont_registers)
SETEXITALTEDF6 THENRET
Computes compose0(c, c0).
Category: Cont Registers (cont_registers)
THENRETEDF7 THENRETALT
Computes compose0(c, c1)
Category: Cont Registers (cont_registers)
THENRETALTEDF8 INVERT
Interchanges c0 and c1.
Category: Cont Registers (cont_registers)
INVERTEDF9 BOOLEVAL
Performs cc:=compose1(compose0(c, compose0(-1 PUSHINT, cc)), compose0(0 PUSHINT, cc)). If c represents a boolean circuit, the net effect is to evaluate it and push either -1 or 0 into the stack before continuing.
Category: Cont Registers (cont_registers)
BOOLEVALEDFA SAMEALT
Sets c1 to c0. Equivalent to c0 PUSHCTR c1 POPCTR.
Category: Cont Registers (cont_registers)
SAMEALTEDFB SAMEALTSAVE
Sets c1 to c0, but first saves the old value of c1 into the savelist of c0.
Equivalent to c1 SAVE SAMEALT.
Category: Cont Registers (cont_registers)
SAMEALTSAVEF0nn CALLDICT
Calls the continuation in c3, pushing integer 0 <= nn <= 255 into its stack as an argument.
Approximately equivalent to [nn] PUSHINT c3 PUSHCTR EXECUTE.
Category: Cont Dict (cont_dict)
[nn] CALL
[nn] CALLDICTF12_n CALLDICT_LONG
For 0 <= n < 2^14, an encoding of [n] CALL for larger values of n.
Category: Cont Dict (cont_dict)
[n] CALL
[n] CALLDICTF16_n JMPDICT
Jumps to the continuation in c3, pushing integer 0 <= n < 2^14 as its argument.
Approximately equivalent to n PUSHINT c3 PUSHCTR JMPX.
Category: Cont Dict (cont_dict)
[n] JMPF1A_n PREPAREDICT
Equivalent to n PUSHINT c3 PUSHCTR, for 0 <= n < 2^14.
In this way, [n] CALL is approximately equivalent to [n] PREPARE EXECUTE, and [n] JMP is approximately equivalent to [n] PREPARE JMPX.
One might use, for instance, CALLXARGS or CALLCC instead of EXECUTE here.
Category: Cont Dict (cont_dict)
[n] PREPARE
[n] PREPAREDICTF22_n THROW_SHORT
Throws exception 0 <= n <= 63 with parameter zero.
In other words, it transfers control to the continuation in c2, pushing 0 and n into its stack, and discarding the old stack altogether.
Category: Exceptions (exceptions)
[n] THROWF26_n THROWIF_SHORT
Throws exception 0 <= n <= 63 with parameter zero only if integer f!=0.
Category: Exceptions (exceptions)
[n] THROWIFF2A_n THROWIFNOT_SHORT
Throws exception 0 <= n <= 63 with parameter zero only if integer f=0.
Category: Exceptions (exceptions)
[n] THROWIFNOTF2C4_n THROW
For 0 <= n < 2^11, an encoding of [n] THROW for larger values of n.
Category: Exceptions (exceptions)
[n] THROWF2CC_n THROWARG
Throws exception 0 <= n < 2^11 with parameter x, by copying x and n into the stack of c2 and transferring control to c2.
Category: Exceptions (exceptions)
[n] THROWARGF2D4_n THROWIF
For 0 <= n < 2^11, an encoding of [n] THROWIF for larger values of n.
Category: Exceptions (exceptions)
[n] THROWIFF2DC_n THROWARGIF
Throws exception 0 <= nn < 2^11 with parameter x only if integer f!=0.
Category: Exceptions (exceptions)
[n] THROWARGIFF2E4_n THROWIFNOT
For 0 <= n < 2^11, an encoding of [n] THROWIFNOT for larger values of n.
Category: Exceptions (exceptions)
[n] THROWIFNOTF2EC_n THROWARGIFNOT
Throws exception 0 <= n < 2^11 with parameter x only if integer f=0.
Category: Exceptions (exceptions)
[n] THROWARGIFNOTF2F0 THROWANY
Throws exception 0 <= n < 2^16 with parameter zero.
Approximately equivalent to ZERO SWAP THROWARGANY.
Category: Exceptions (exceptions)
THROWANYF2F1 THROWARGANY
Throws exception 0 <= n < 2^16 with parameter x, transferring control to the continuation in c2.
Approximately equivalent to c2 PUSHCTR 2 JMPXARGS.
Category: Exceptions (exceptions)
THROWARGANYF2F2 THROWANYIF
Throws exception 0 <= n < 2^16 with parameter zero only if f!=0.
Category: Exceptions (exceptions)
THROWANYIFF2F3 THROWARGANYIF
Throws exception 0 <= n<2^16 with parameter x only if f!=0.
Category: Exceptions (exceptions)
THROWARGANYIFF2F4 THROWANYIFNOT
Throws exception 0 <= n<2^16 with parameter zero only if f=0.
Category: Exceptions (exceptions)
THROWANYIFNOTF2F5 THROWARGANYIFNOT
Throws exception 0 <= n<2^16 with parameter x only if f=0.
Category: Exceptions (exceptions)
THROWARGANYIFNOTF2FF TRY
Sets c2 to c', first saving the old value of c2 both into the savelist of c' and into the savelist of the current continuation, which is stored into c.c0 and c'.c0. Then runs c similarly to EXECUTE. If c does not throw any exceptions, the original value of c2 is automatically restored on return from c. If an exception occurs, the execution is transferred to c', but the original value of c2 is restored in the process, so that c' can re-throw the exception by THROWANY if it cannot handle it by itself.
Category: Exceptions (exceptions)
TRYF3pr TRYARGS
Similar to TRY, but with [p] [r] CALLXARGS internally used instead of EXECUTE.
In this way, all but the top 0 <= p <= 15 stack elements will be saved into current continuation's stack, and then restored upon return from either c or c', with the top 0 <= r <= 15 values of the resulting stack of c or c' copied as return values.
Category: Exceptions (exceptions)
[p] [r] TRYARGSF400 STDICT
Stores dictionary D into Builder b, returning the resulting Builder b'.
In other words, if D is a cell, performs STONE and STREF; if D is Null, performs NIP and STZERO; otherwise throws a type checking exception.
Category: Dict Serial (dict_serial)
STDICT
STOPTREFF401 SKIPDICT
Equivalent to LDDICT NIP.
Category: Dict Serial (dict_serial)
SKIPDICT
SKIPOPTREFF402 LDDICTS
Loads (parses) a (Slice-represented) dictionary s' from Slice s, and returns the remainder of s as s''.
This is a ''split function'' for all HashmapE(n,X) dictionary types.
Category: Dict Serial (dict_serial)
LDDICTSF403 PLDDICTS
Preloads a (Slice-represented) dictionary s' from Slice s.
Approximately equivalent to LDDICTS DROP.
Category: Dict Serial (dict_serial)
PLDDICTSF404 LDDICT
Loads (parses) a dictionary D from Slice s, and returns the remainder of s as s'. May be applied to dictionaries or to values of arbitrary (^Y)? types.
Category: Dict Serial (dict_serial)
LDDICT
LDOPTREFF405 PLDDICT
Preloads a dictionary D from Slice s.
Approximately equivalent to LDDICT DROP.
Category: Dict Serial (dict_serial)
PLDDICT
PLDOPTREFF406 LDDICTQ
A quiet version of LDDICT.
Category: Dict Serial (dict_serial)
LDDICTQF407 PLDDICTQ
A quiet version of PLDDICT.
Category: Dict Serial (dict_serial)
PLDDICTQF40A DICTGET
Looks up key k (represented by a Slice, the first 0 <= n <= 1023 data bits of which are used as a key) in dictionary D of type HashmapE(n,X) with n-bit keys.
On success, returns the value found as a Slice x.
Category: Dict Get (dict_get)
DICTGETF40B DICTGETREF
Similar to DICTGET, but with a LDREF ENDS applied to x on success.
This operation is useful for dictionaries of type HashmapE(n,^Y).
Category: Dict Get (dict_get)
DICTGETREFF40C DICTIGET
Similar to DICTGET, but with a signed (big-endian) n-bit Integer i as a key. If i does not fit into n bits, returns 0. If i is a NaN, throws an integer overflow exception.
Category: Dict Get (dict_get)
DICTIGETF40D DICTIGETREF
Combines DICTIGET with DICTGETREF: it uses signed n-bit Integer i as a key and returns a Cell instead of a Slice on success.
Category: Dict Get (dict_get)
DICTIGETREFF40E DICTUGET
Similar to DICTIGET, but with unsigned (big-endian) n-bit Integer i used as a key.
Category: Dict Get (dict_get)
DICTUGETF40F DICTUGETREF
Similar to DICTIGETREF, but with an unsigned n-bit Integer key i.
Category: Dict Get (dict_get)
DICTUGETREFF412 DICTSET
Sets the value associated with n-bit key k (represented by a Slice as in DICTGET) in dictionary D (also represented by a Slice) to value x (again a Slice), and returns the resulting dictionary as D'.
Category: Dict Set (dict_set)
DICTSETF413 DICTSETREF
Similar to DICTSET, but with the value set to a reference to Cell c.
Category: Dict Set (dict_set)
DICTSETREFF414 DICTISET
Similar to DICTSET, but with the key represented by a (big-endian) signed n-bit integer i. If i does not fit into n bits, a range check exception is generated.
Category: Dict Set (dict_set)
DICTISETF415 DICTISETREF
Similar to DICTSETREF, but with the key a signed n-bit integer as in DICTISET.
Category: Dict Set (dict_set)
DICTISETREFF416 DICTUSET
Similar to DICTISET, but with i an unsigned n-bit integer.
Category: Dict Set (dict_set)
DICTUSETF417 DICTUSETREF
Similar to DICTISETREF, but with i unsigned.
Category: Dict Set (dict_set)
DICTUSETREFF41A DICTSETGET
Combines DICTSET with DICTGET: it sets the value corresponding to key k to x, but also returns the old value y associated with the key in question, if present.
Category: Dict Set (dict_set)
DICTSETGETF41B DICTSETGETREF
Combines DICTSETREF with DICTGETREF similarly to DICTSETGET.
Category: Dict Set (dict_set)
DICTSETGETREFF41C DICTISETGET
DICTISETGET, but with i a signed n-bit integer.
Category: Dict Set (dict_set)
DICTISETGETF41D DICTISETGETREF
DICTISETGETREF, but with i a signed n-bit integer.
Category: Dict Set (dict_set)
DICTISETGETREFF41E DICTUSETGET
DICTISETGET, but with i an unsigned n-bit integer.
Category: Dict Set (dict_set)
DICTUSETGETF41F DICTUSETGETREF
DICTISETGETREF, but with i an unsigned n-bit integer.
Category: Dict Set (dict_set)
DICTUSETGETREFF422 DICTREPLACE
A Replace operation, which is similar to DICTSET, but sets the value of key k in dictionary D to x only if the key k was already present in D.
Category: Dict Set (dict_set)
DICTREPLACEF423 DICTREPLACEREF
A Replace counterpart of DICTSETREF.
Category: Dict Set (dict_set)
DICTREPLACEREFF424 DICTIREPLACE
DICTREPLACE, but with i a signed n-bit integer.
Category: Dict Set (dict_set)
DICTIREPLACEF425 DICTIREPLACEREF
DICTREPLACEREF, but with i a signed n-bit integer.
Category: Dict Set (dict_set)
DICTIREPLACEREFF426 DICTUREPLACE
DICTREPLACE, but with i an unsigned n-bit integer.
Category: Dict Set (dict_set)
DICTUREPLACEF427 DICTUREPLACEREF
DICTREPLACEREF, but with i an unsigned n-bit integer.
Category: Dict Set (dict_set)
DICTUREPLACEREFF42A DICTREPLACEGET
A Replace counterpart of DICTSETGET: on success, also returns the old value associated with the key in question.
Category: Dict Set (dict_set)
DICTREPLACEGETF42B DICTREPLACEGETREF
A Replace counterpart of DICTSETGETREF.
Category: Dict Set (dict_set)
DICTREPLACEGETREFF42C DICTIREPLACEGET
DICTREPLACEGET, but with i a signed n-bit integer.
Category: Dict Set (dict_set)
DICTIREPLACEGETF42D DICTIREPLACEGETREF
DICTREPLACEGETREF, but with i a signed n-bit integer.
Category: Dict Set (dict_set)
DICTIREPLACEGETREFF42E DICTUREPLACEGET
DICTREPLACEGET, but with i an unsigned n-bit integer.
Category: Dict Set (dict_set)
DICTUREPLACEGETF42F DICTUREPLACEGETREF
DICTREPLACEGETREF, but with i an unsigned n-bit integer.
Category: Dict Set (dict_set)
DICTUREPLACEGETREFF432 DICTADD
An Add counterpart of DICTSET: sets the value associated with key k in dictionary D to x, but only if it is not already present in D.
Category: Dict Set (dict_set)
DICTADDF433 DICTADDREF
An Add counterpart of DICTSETREF.
Category: Dict Set (dict_set)
DICTADDREFF434 DICTIADD
DICTADD, but with i a signed n-bit integer.
Category: Dict Set (dict_set)
DICTIADDF435 DICTIADDREF
DICTADDREF, but with i a signed n-bit integer.
Category: Dict Set (dict_set)
DICTIADDREFF436 DICTUADD
DICTADD, but with i an unsigned n-bit integer.
Category: Dict Set (dict_set)
DICTUADDF437 DICTUADDREF
DICTADDREF, but with i an unsigned n-bit integer.
Category: Dict Set (dict_set)
DICTUADDREFF43A DICTADDGET
An Add counterpart of DICTSETGET: sets the value associated with key k in dictionary D to x, but only if key k is not already present in D. Otherwise, just returns the old value y without changing the dictionary.
Category: Dict Set (dict_set)
DICTADDGETF43B DICTADDGETREF
An Add counterpart of DICTSETGETREF.
Category: Dict Set (dict_set)
DICTADDGETREFF43C DICTIADDGET
DICTADDGET, but with i a signed n-bit integer.
Category: Dict Set (dict_set)
DICTIADDGETF43D DICTIADDGETREF
DICTADDGETREF, but with i a signed n-bit integer.
Category: Dict Set (dict_set)
DICTIADDGETREFF43E DICTUADDGET
DICTADDGET, but with i an unsigned n-bit integer.
Category: Dict Set (dict_set)
DICTUADDGETF43F DICTUADDGETREF
DICTADDGETREF, but with i an unsigned n-bit integer.
Category: Dict Set (dict_set)
DICTUADDGETREFF441 DICTSETB
Category: Dict Set Builder (dict_set_builder)
DICTSETBF442 DICTISETB
Category: Dict Set Builder (dict_set_builder)
DICTISETBF443 DICTUSETB
Category: Dict Set Builder (dict_set_builder)
DICTUSETBF445 DICTSETGETB
Category: Dict Set Builder (dict_set_builder)
DICTSETGETBF446 DICTISETGETB
Category: Dict Set Builder (dict_set_builder)
DICTISETGETBF447 DICTUSETGETB
Category: Dict Set Builder (dict_set_builder)
DICTUSETGETBF449 DICTREPLACEB
Category: Dict Set Builder (dict_set_builder)
DICTREPLACEBF44A DICTIREPLACEB
Category: Dict Set Builder (dict_set_builder)
DICTIREPLACEBF44B DICTUREPLACEB
Category: Dict Set Builder (dict_set_builder)
DICTUREPLACEBF44D DICTREPLACEGETB
Category: Dict Set Builder (dict_set_builder)
DICTREPLACEGETBF44E DICTIREPLACEGETB
Category: Dict Set Builder (dict_set_builder)
DICTIREPLACEGETBF44F DICTUREPLACEGETB
Category: Dict Set Builder (dict_set_builder)
DICTUREPLACEGETBF451 DICTADDB
Category: Dict Set Builder (dict_set_builder)
DICTADDBF452 DICTIADDB
Category: Dict Set Builder (dict_set_builder)
DICTIADDBF453 DICTUADDB
Category: Dict Set Builder (dict_set_builder)
DICTUADDBF455 DICTADDGETB
Category: Dict Set Builder (dict_set_builder)
DICTADDGETBF456 DICTIADDGETB
Category: Dict Set Builder (dict_set_builder)
DICTIADDGETBF457 DICTUADDGETB
Category: Dict Set Builder (dict_set_builder)
DICTUADDGETBF459 DICTDEL
Deletes n-bit key, represented by a Slice k, from dictionary D. If the key is present, returns the modified dictionary D' and the success flag -1. Otherwise, returns the original dictionary D and 0.
Category: Dict Delete (dict_delete)
DICTDELF45A DICTIDEL
A version of DICTDEL with the key represented by a signed n-bit Integer i. If i does not fit into n bits, simply returns D 0 (''key not found, dictionary unmodified'').
Category: Dict Delete (dict_delete)
DICTIDELF45B DICTUDEL
Similar to DICTIDEL, but with i an unsigned n-bit integer.
Category: Dict Delete (dict_delete)
DICTUDELF462 DICTDELGET
Deletes n-bit key, represented by a Slice k, from dictionary D. If the key is present, returns the modified dictionary D', the original value x associated with the key k (represented by a Slice), and the success flag -1. Otherwise, returns the original dictionary D and 0.
Category: Dict Delete (dict_delete)
DICTDELGETF463 DICTDELGETREF
Similar to DICTDELGET, but with LDREF ENDS applied to x on success, so that the value returned c is a Cell.
Category: Dict Delete (dict_delete)
DICTDELGETREFF464 DICTIDELGET
DICTDELGET, but with i a signed n-bit integer.
Category: Dict Delete (dict_delete)
DICTIDELGETF465 DICTIDELGETREF
DICTDELGETREF, but with i a signed n-bit integer.
Category: Dict Delete (dict_delete)
DICTIDELGETREFF466 DICTUDELGET
DICTDELGET, but with i an unsigned n-bit integer.
Category: Dict Delete (dict_delete)
DICTUDELGETF467 DICTUDELGETREF
DICTDELGETREF, but with i an unsigned n-bit integer.
Category: Dict Delete (dict_delete)
DICTUDELGETREFF469 DICTGETOPTREF
A variant of DICTGETREF that returns Null instead of the value c^? if the key k is absent from dictionary D.
Category: Dict Mayberef (dict_mayberef)
DICTGETOPTREFF46A DICTIGETOPTREF
DICTGETOPTREF, but with i a signed n-bit integer. If the key i is out of range, also returns Null.
Category: Dict Mayberef (dict_mayberef)
DICTIGETOPTREFF46B DICTUGETOPTREF
DICTGETOPTREF, but with i an unsigned n-bit integer. If the key i is out of range, also returns Null.
Category: Dict Mayberef (dict_mayberef)
DICTUGETOPTREFF46D DICTSETGETOPTREF
A variant of both DICTGETOPTREF and DICTSETGETREF that sets the value corresponding to key k in dictionary D to c^? (if c^? is Null, then the key is deleted instead), and returns the old value ~c^? (if the key k was absent before, returns Null instead).
Category: Dict Mayberef (dict_mayberef)
DICTSETGETOPTREFF46E DICTISETGETOPTREF
Similar to primitive DICTSETGETOPTREF, but using signed n-bit Integer i as a key. If i does not fit into n bits, throws a range checking exception.
Category: Dict Mayberef (dict_mayberef)
DICTISETGETOPTREFF46F DICTUSETGETOPTREF
Similar to primitive DICTSETGETOPTREF, but using unsigned n-bit Integer i as a key.
Category: Dict Mayberef (dict_mayberef)
DICTUSETGETOPTREFF470 PFXDICTSET
Category: Dict Prefix (dict_prefix)
PFXDICTSETF471 PFXDICTREPLACE
Category: Dict Prefix (dict_prefix)
PFXDICTREPLACEF472 PFXDICTADD
Category: Dict Prefix (dict_prefix)
PFXDICTADDF473 PFXDICTDEL
Category: Dict Prefix (dict_prefix)
PFXDICTDELF474 DICTGETNEXT
Computes the minimal key k' in dictionary D that is lexicographically greater than k, and returns k' (represented by a Slice) along with associated value x' (also represented by a Slice).
Category: Dict Next (dict_next)
DICTGETNEXTF475 DICTGETNEXTEQ
Similar to DICTGETNEXT, but computes the minimal key k' that is lexicographically greater than or equal to k.
Category: Dict Next (dict_next)
DICTGETNEXTEQF476 DICTGETPREV
Similar to DICTGETNEXT, but computes the maximal key k' lexicographically smaller than k.
Category: Dict Next (dict_next)
DICTGETPREVF477 DICTGETPREVEQ
Similar to DICTGETPREV, but computes the maximal key k' lexicographically smaller than or equal to k.
Category: Dict Next (dict_next)
DICTGETPREVEQF478 DICTIGETNEXT
Similar to DICTGETNEXT, but interprets all keys in dictionary D as big-endian signed n-bit integers, and computes the minimal key i' that is larger than Integer i (which does not necessarily fit into n bits).
Category: Dict Next (dict_next)
DICTIGETNEXTF479 DICTIGETNEXTEQ
Similar to DICTGETNEXTEQ, but interprets keys as signed n-bit integers.
Category: Dict Next (dict_next)
DICTIGETNEXTEQF47A DICTIGETPREV
Similar to DICTGETPREV, but interprets keys as signed n-bit integers.
Category: Dict Next (dict_next)
DICTIGETPREVF47B DICTIGETPREVEQ
Similar to DICTGETPREVEQ, but interprets keys as signed n-bit integers.
Category: Dict Next (dict_next)
DICTIGETPREVEQF47C DICTUGETNEXT
Similar to DICTGETNEXT, but interprets all keys in dictionary D as big-endian unsigned n-bit integers, and computes the minimal key i' that is larger than Integer i (which does not necessarily fit into n bits, and is not necessarily non-negative).
Category: Dict Next (dict_next)
DICTUGETNEXTF47D DICTUGETNEXTEQ
Similar to DICTGETNEXTEQ, but interprets keys as unsigned n-bit integers.
Category: Dict Next (dict_next)
DICTUGETNEXTEQF47E DICTUGETPREV
Similar to DICTGETPREV, but interprets keys as unsigned n-bit integers.
Category: Dict Next (dict_next)
DICTUGETPREVF47F DICTUGETPREVEQ
Similar to DICTGETPREVEQ, but interprets keys a unsigned n-bit integers.
Category: Dict Next (dict_next)
DICTUGETPREVEQF482 DICTMIN
Computes the minimal key k (represented by a Slice with n data bits) in dictionary D, and returns k along with the associated value x.
Category: Dict Min (dict_min)
DICTMINF483 DICTMINREF
Similar to DICTMIN, but returns the only reference in the value as a Cell c.
Category: Dict Min (dict_min)
DICTMINREFF484 DICTIMIN
Similar to DICTMIN, but computes the minimal key i under the assumption that all keys are big-endian signed n-bit integers. Notice that the key and value returned may differ from those computed by DICTMIN and DICTUMIN.
Category: Dict Min (dict_min)
DICTIMINF485 DICTIMINREF
Similar to DICTIMIN, but returns the only reference in the value.
Category: Dict Min (dict_min)
DICTIMINREFF486 DICTUMIN
Similar to DICTMIN, but returns the key as an unsigned n-bit Integer i.
Category: Dict Min (dict_min)
DICTUMINF487 DICTUMINREF
Similar to DICTUMIN, but returns the only reference in the value.
Category: Dict Min (dict_min)
DICTUMINREFF48A DICTMAX
Computes the maximal key k (represented by a Slice with n data bits) in dictionary D, and returns k along with the associated value x.
Category: Dict Min (dict_min)
DICTMAXF48B DICTMAXREF
Similar to DICTMAX, but returns the only reference in the value.
Category: Dict Min (dict_min)
DICTMAXREFF48C DICTIMAX
Similar to DICTMAX, but computes the maximal key i under the assumption that all keys are big-endian signed n-bit integers. Notice that the key and value returned may differ from those computed by DICTMAX and DICTUMAX.
Category: Dict Min (dict_min)
DICTIMAXF48D DICTIMAXREF
Similar to DICTIMAX, but returns the only reference in the value.
Category: Dict Min (dict_min)
DICTIMAXREFF48E DICTUMAX
Similar to DICTMAX, but returns the key as an unsigned n-bit Integer i.
Category: Dict Min (dict_min)
DICTUMAXF48F DICTUMAXREF
Similar to DICTUMAX, but returns the only reference in the value.
Category: Dict Min (dict_min)
DICTUMAXREFF492 DICTREMMIN
Computes the minimal key k (represented by a Slice with n data bits) in dictionary D, removes k from the dictionary, and returns k along with the associated value x and the modified dictionary D'.
Category: Dict Min (dict_min)
DICTREMMINF493 DICTREMMINREF
Similar to DICTREMMIN, but returns the only reference in the value as a Cell c.
Category: Dict Min (dict_min)
DICTREMMINREFF494 DICTIREMMIN
Similar to DICTREMMIN, but computes the minimal key i under the assumption that all keys are big-endian signed n-bit integers. Notice that the key and value returned may differ from those computed by DICTREMMIN and DICTUREMMIN.
Category: Dict Min (dict_min)
DICTIREMMINF495 DICTIREMMINREF
Similar to DICTIREMMIN, but returns the only reference in the value.
Category: Dict Min (dict_min)
DICTIREMMINREFF496 DICTUREMMIN
Similar to DICTREMMIN, but returns the key as an unsigned n-bit Integer i.
Category: Dict Min (dict_min)
DICTUREMMINF497 DICTUREMMINREF
Similar to DICTUREMMIN, but returns the only reference in the value.
Category: Dict Min (dict_min)
DICTUREMMINREFF49A DICTREMMAX
Computes the maximal key k (represented by a Slice with n data bits) in dictionary D, removes k from the dictionary, and returns k along with the associated value x and the modified dictionary D'.
Category: Dict Min (dict_min)
DICTREMMAXF49B DICTREMMAXREF
Similar to DICTREMMAX, but returns the only reference in the value as a Cell c.
Category: Dict Min (dict_min)
DICTREMMAXREFF49C DICTIREMMAX
Similar to DICTREMMAX, but computes the minimal key i under the assumption that all keys are big-endian signed n-bit integers. Notice that the key and value returned may differ from those computed by DICTREMMAX and DICTUREMMAX.
Category: Dict Min (dict_min)
DICTIREMMAXF49D DICTIREMMAXREF
Similar to DICTIREMMAX, but returns the only reference in the value.
Category: Dict Min (dict_min)
DICTIREMMAXREFF49E DICTUREMMAX
Similar to DICTREMMAX, but returns the key as an unsigned n-bit Integer i.
Category: Dict Min (dict_min)
DICTUREMMAXF49F DICTUREMMAXREF
Similar to DICTUREMMAX, but returns the only reference in the value.
Category: Dict Min (dict_min)
DICTUREMMAXREFF4A0 DICTIGETJMP
Similar to DICTIGET, but with x BLESSed into a continuation with a subsequent JMPX to it on success. On failure, does nothing. This is useful for implementing switch/case constructions.
Category: Dict Special (dict_special)
DICTIGETJMPF4A1 DICTUGETJMP
Similar to DICTIGETJMP, but performs DICTUGET instead of DICTIGET.
Category: Dict Special (dict_special)
DICTUGETJMPF4A2 DICTIGETEXEC
Similar to DICTIGETJMP, but with EXECUTE instead of JMPX.
Category: Dict Special (dict_special)
DICTIGETEXECF4A3 DICTUGETEXEC
Similar to DICTUGETJMP, but with EXECUTE instead of JMPX.
Category: Dict Special (dict_special)
DICTUGETEXECF4A6_n DICTPUSHCONST
Pushes a non-empty constant dictionary D (as a Cell^?) along with its key length 0 <= 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 complete DICTPUSHCONST instruction can be obtained by first serializing xF4A4_, then the non-empty dictionary itself (one 1 bit and a cell reference), and then the unsigned 10-bit integer n (as if by a STU 10 instruction). An empty dictionary can be pushed by a NEWDICT primitive instead.
Category: Dict Special (dict_special)
[ref] [n] DICTPUSHCONSTF4A8 PFXDICTGETQ
Looks up the unique prefix of Slice s present in the prefix code dictionary represented by Cell^? D and 0 <= n <= 1023. If found, the prefix of s is returned as s', and the corresponding value (also a Slice) as x. The remainder of s is returned as a Slice s''. If no prefix of s is a key in prefix code dictionary D, returns the unchanged s and a zero flag to indicate failure.
Category: Dict Special (dict_special)
PFXDICTGETQF4A9 PFXDICTGET
Similar to PFXDICTGET, but throws a cell deserialization failure exception on failure.
Category: Dict Special (dict_special)
PFXDICTGETF4AA PFXDICTGETJMP
Similar to PFXDICTGETQ, but on success BLESSes the value x into a Continuation and transfers control to it as if by a JMPX. On failure, returns s unchanged and continues execution.
Category: Dict Special (dict_special)
PFXDICTGETJMPF4AB PFXDICTGETEXEC
Similar to PFXDICTGETJMP, but EXECutes the continuation found instead of jumping to it. On failure, throws a cell deserialization exception.
Category: Dict Special (dict_special)
PFXDICTGETEXECF4AE_n PFXDICTCONSTGETJMP
Combines [n] DICTPUSHCONST for 0 <= n <= 1023 with PFXDICTGETJMP.
Category: Dict Special (dict_special)
[ref] [n] PFXDICTCONSTGETJMP
[ref] [n] PFXDICTSWITCHF4BC DICTIGETJMPZ
A variant of DICTIGETJMP that returns index i on failure.
Category: Dict Special (dict_special)
DICTIGETJMPZF4BD DICTUGETJMPZ
A variant of DICTUGETJMP that returns index i on failure.
Category: Dict Special (dict_special)
DICTUGETJMPZF4BE DICTIGETEXECZ
A variant of DICTIGETEXEC that returns index i on failure.
Category: Dict Special (dict_special)
DICTIGETEXECZF4BF DICTUGETEXECZ
A variant of DICTUGETEXEC that returns index i on failure.
Category: Dict Special (dict_special)
DICTUGETEXECZF4B1 SUBDICTGET
Constructs a subdictionary consisting of all keys beginning with prefix k (represented by a Slice, the first 0 <= l <= n <= 1023 data bits of which are used as a key) of length l in dictionary D of type HashmapE(n,X) with n-bit keys. On success, returns the new subdictionary of the same type HashmapE(n,X) as a Slice D'.
Category: Dict Sub (dict_sub)
SUBDICTGETF4B2 SUBDICTIGET
Variant of SUBDICTGET with the prefix represented by a signed big-endian l-bit Integer x, where necessarily l <= 257.
Category: Dict Sub (dict_sub)
SUBDICTIGETF4B3 SUBDICTUGET
Variant of SUBDICTGET with the prefix represented by an unsigned big-endian l-bit Integer x, where necessarily l <= 256.
Category: Dict Sub (dict_sub)
SUBDICTUGETF4B5 SUBDICTRPGET
Similar to SUBDICTGET, but removes the common prefix k from all keys of the new dictionary D', which becomes of type HashmapE(n-l,X).
Category: Dict Sub (dict_sub)
SUBDICTRPGETF4B6 SUBDICTIRPGET
Variant of SUBDICTRPGET with the prefix represented by a signed big-endian l-bit Integer x, where necessarily l <= 257.
Category: Dict Sub (dict_sub)
SUBDICTIRPGETF4B7 SUBDICTURPGET
Variant of SUBDICTRPGET with the prefix represented by an unsigned big-endian l-bit Integer x, where necessarily l <= 256.
Category: Dict Sub (dict_sub)
SUBDICTURPGETF800 ACCEPT
Sets current gas limit g_l to its maximal allowed value g_m, and resets the gas credit g_c to zero, decreasing the value of g_r by g_c in the process.
In other words, the current smart contract agrees to buy some gas to finish the current transaction. This action is required to process external messages, which bring no value (hence no gas) with themselves.
Category: App Gas (app_gas)
ACCEPTF801 SETGASLIMIT
Sets current gas limit g_l to the minimum of g and g_m, and resets the gas credit g_c to zero. If the gas consumed so far (including the present instruction) exceeds the resulting value of g_l, an (unhandled) out of gas exception is thrown before setting new gas limits. Notice that SETGASLIMIT with an argument g >= 2^63-1 is equivalent to ACCEPT.
Category: App Gas (app_gas)
SETGASLIMITF807 GASCONSUMED
Returns gas consumed by VM so far (including this instruction).
Category: App Gas (app_gas)
GASCONSUMEDF80F COMMIT
Commits the current state of registers c4 (''persistent data'') and c5 (''actions'') so that the current execution is considered ''successful'' with the saved values even if an exception is thrown later.
Category: App Gas (app_gas)
COMMITF810 RANDU256
Generates a new pseudo-random unsigned 256-bit Integer x. The algorithm is as follows: if r is 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 its sha512(r) is computed; the first 32 bytes of this hash are stored as the new value r' of the random seed, and the remaining 32 bytes are returned as the next random value x.
Category: App Rnd (app_rnd)
RANDU256F811 RAND
Generates a new pseudo-random integer z in the range 0...y-1 (or y...-1, if y<0). More precisely, an unsigned random value x is generated as in RAND256U; then z:=floor(x*y/2^256) is computed.
Equivalent to RANDU256 256 MULRSHIFT.
Category: App Rnd (app_rnd)
RANDF814 SETRAND
Sets the random seed to unsigned 256-bit Integer x.
Category: App Rnd (app_rnd)
SETRANDF815 ADDRAND
Mixes unsigned 256-bit Integer x into the random seed r by setting the random seed to Sha of the concatenation of two 32-byte strings: the first with the big-endian representation of the old seed r, and the second with the big-endian representation of x.
Category: App Rnd (app_rnd)
ADDRAND
RANDOMIZEF82i GETPARAM
Returns the i-th parameter from the Tuple provided at c7 for 0 <= i <= 15. Equivalent to c7 PUSHCTR FIRST [i] INDEX.
If one of these internal operations fails, throws an appropriate type checking or range checking exception.
Category: App Config (app_config)
[i] GETPARAMAliases:
NOW
Returns the current Unix time as an Integer. If it is impossible to recover the requested value starting fromc7, throws a type checking or range checking exception as appropriate.
Equivalent to3 GETPARAM.BLOCKLT
Returns the starting logical time of the current block.
Equivalent to4 GETPARAM.LTIME
Returns the logical time of the current transaction.
Equivalent to5 GETPARAM.RANDSEED
Returns the current random seed as an unsigned 256-bit Integer.
Equivalent to6 GETPARAM.BALANCE
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 to7 GETPARAM.
Note thatRAWprimitives such asSENDRAWMSGdo not update this field.MYADDR
Returns the internal address of the current smart contract as a Slice with aMsgAddressInt. If necessary, it can be parsed further using primitives such asPARSEMSGADDRorREWRITESTDADDR.
Equivalent to8 GETPARAM.CONFIGROOT
Returns the Maybe CellDwith the current global configuration dictionary. Equivalent to9 GETPARAM.MYCODE
Retrieves code of smart-contract from c7. Equivalent to10 GETPARAM.INCOMINGVALUE
Retrieves value of incoming message from c7. Equivalent to11 GETPARAM.STORAGEFEES
Retrieves value of storage phase fees from c7. Equivalent to12 GETPARAM.PREVBLOCKSINFOTUPLE
Retrives PrevBlocksInfo:[last_mc_blocks, prev_key_block]from c7. Equivalent to13 GETPARAM.UNPACKEDCONFIGTUPLE
Retrives tuple that contains some config parameters as cell slices. If the parameter is absent from the config, the value is null. Values:
* 0:StoragePricesfromConfigParam 18. Not the whole dict, but only the one StoragePrices entry (one which corresponds to the current time).
* 1:ConfigParam 19(global id).
* 2:ConfigParam 20(mc gas prices).
* 3:ConfigParam 21(gas prices).
* 4:ConfigParam 24(mc fwd fees).
* 5:ConfigParam 25(fwd fees).
* 6:ConfigParam 43(size limits).DUEPAYMENT
Retrives current debt for storage fee (nanotons).
F830 CONFIGDICT
Returns the global configuration dictionary along with its key length (32).
Equivalent to CONFIGROOT 32 PUSHINT.
Category: App Config (app_config)
CONFIGDICTF832 CONFIGPARAM
Returns the value of the global configuration parameter with integer index i as a Cell c, and a flag to indicate success.
Equivalent to CONFIGDICT DICTIGETREF.
Category: App Config (app_config)
CONFIGPARAMF833 CONFIGOPTPARAM
Returns the value of the global configuration parameter with integer index i as a Maybe Cell c^?.
Equivalent to CONFIGDICT DICTIGETOPTREF.
Category: App Config (app_config)
CONFIGOPTPARAMF83400 PREVMCBLOCKS
Retrives last_mc_blocks part of PrevBlocksInfo from c7 (parameter 13).
Category: App Config (app_config)
PREVMCBLOCKSF83401 PREVKEYBLOCK
Retrives prev_key_block part of PrevBlocksInfo from c7 (parameter 13).
Category: App Config (app_config)
PREVKEYBLOCKF83402 PREVMCBLOCKS_100
Retrives last_mc_blocks_divisible_by_100 part of PrevBlocksInfo from c7 (parameter 13).
Category: App Config (app_config)
PREVMCBLOCKS_100F835 GLOBALID
Retrieves global_id from 19 network config.
Category: App Config (app_config)
GLOBALIDF836 GETGASFEE
Calculates gas fee
Category: App Config (app_config)
GETGASFEEF837 GETSTORAGEFEE
Calculates storage fees (only current StoragePrices entry is used).
Category: App Config (app_config)
GETSTORAGEFEEF838 GETFORWARDFEE
Calculates forward fee.
Category: App Config (app_config)
GETFORWARDFEEF839 GETPRECOMPILEDGAS
Returns gas usage for the current contract if it is precompiled, null otherwise.
Category: App Config (app_config)
GETPRECOMPILEDGASF83A GETORIGINALFWDFEE
Calculate (fwd_fee * 2^16) / (2^16 - first_frac). Can be used to get the original fwd_fee of the message.
Category: App Config (app_config)
GETORIGINALFWDFEEF83B GETGASFEESIMPLE
Same as GETGASFEE, but without flat price (just (gas_used * price) / 2^16).
Category: App Config (app_config)
GETGASFEESIMPLEF83C GETFORWARDFEESIMPLE
Same as GETFORWARDFEE, but without lump price (just (bits*bit_price + cells*cell_price) / 2^16).
Category: App Config (app_config)
GETFORWARDFEESIMPLEF840 GETGLOBVAR
Returns the k-th global variable for 0 <= k < 255.
Equivalent to c7 PUSHCTR SWAP INDEXVARQ.
Category: App Global (app_global)
GETGLOBVARF85_k GETGLOB
Returns the k-th global variable for 1 <= k <= 31.
Equivalent to c7 PUSHCTR [k] INDEXQ.
Category: App Global (app_global)
[k] GETGLOBF860 SETGLOBVAR
Assigns x to the k-th global variable for 0 <= k < 255.
Equivalent to c7 PUSHCTR ROTREV SETINDEXVARQ c7 POPCTR.
Category: App Global (app_global)
SETGLOBVARF87_k SETGLOB
Assigns x to the k-th global variable for 1 <= k <= 31.
Equivalent to c7 PUSHCTR SWAP k SETINDEXQ c7 POPCTR.
Category: App Global (app_global)
[k] SETGLOBF880 GETEXTRABALANCE
Takes id of the extra currency (integer in range 0..2^32-1), returns the amount of this extra currency on the account balance. The first 5 executions of GETEXTRABALANCE consume at most 26 + 200 gas each. The subsequent executions incur the full gas cost of 26 (normal instruction cost) plus gas for loading cells (up to 3300 if the dictionary has maximum depth).
Category: App Global (app_global)
GETEXTRABALANCEF881ii GETPARAMLONG
Returns the i-th parameter from the Tuple provided at c7 for 0 <= i <= 255. Equivalent to c7 PUSHCTR FIRST [i] INDEX.
If one of these internal operations fails, throws an appropriate type checking or range checking exception.
Category: App Config (app_config)
[i] GETPARAMLONGF89i INMSGPARAM
Equivalent to INMSGPARAMS i INDEX
Category: App Config (app_config)
[i] INMSGPARAMAliases:
INMSG_BOUNCE
Retrivesbounceflag of incoming message.INMSG_BOUNCED
Retrivesbouncedflag of incoming message.INMSG_SRC
Retrivessrcflag of incoming message.INMSG_FWDFEE
Retrivesfwd_feefield of incoming message.INMSG_LT
Retrivesltfield of incoming message.INMSG_UTIME
Retrivesutimefield of incoming message.INMSG_ORIGVALUE
Retrives original value of the message. This is sometimes different from the value inINCOMINGVALUEand TVM stack because of storage fees.INMSG_VALUE
Retrives value of the message after deducting storage fees. This is same as inINCOMINGVALUEand TVM stack.INMSG_VALUEEXTRA
Same as inINCOMINGVALUE.INMSG_STATEINIT
Retrievesinitfield of the incoming message.
F900 HASHCU
Computes the representation hash of a Cell c and returns it as a 256-bit unsigned integer x. Useful for signing and checking signatures of arbitrary entities represented by a tree of cells.
Category: App Crypto (app_crypto)
HASHCUF901 HASHSU
Computes the hash of a Slice s and returns it as a 256-bit unsigned integer x. The result is the same as if an ordinary cell containing only data and references from s had been created and its hash computed by HASHCU.
Category: App Crypto (app_crypto)
HASHSUF902 SHA256U
Computes Sha of the data bits of Slice s. If the bit length of s is not divisible by eight, throws a cell underflow exception. The hash value is returned as a 256-bit unsigned integer x.
Category: App Crypto (app_crypto)
SHA256UF90400 HASHEXT_SHA256
Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: App Crypto (app_crypto)
HASHEXT_SHA256F90401 HASHEXT_SHA512
Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: App Crypto (app_crypto)
HASHEXT_SHA512F90402 HASHEXT_BLAKE2B
Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: App Crypto (app_crypto)
HASHEXT_BLAKE2BF90403 HASHEXT_KECCAK256
Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: App Crypto (app_crypto)
HASHEXT_KECCAK256F90404 HASHEXT_KECCAK512
Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: App Crypto (app_crypto)
HASHEXT_KECCAK512F90500 HASHEXTR_SHA256
Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: App Crypto (app_crypto)
HASHEXTR_SHA256F90501 HASHEXTR_SHA512
Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: App Crypto (app_crypto)
HASHEXTR_SHA512F90502 HASHEXTR_BLAKE2B
Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: App Crypto (app_crypto)
HASHEXTR_BLAKE2BF90503 HASHEXTR_KECCAK256
Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: App Crypto (app_crypto)
HASHEXTR_KECCAK256F90504 HASHEXTR_KECCAK512
Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: App Crypto (app_crypto)
HASHEXTR_KECCAK512F90600 HASHEXTA_SHA256
Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builder b.
Category: App Crypto (app_crypto)
HASHEXTA_SHA256F90601 HASHEXTA_SHA512
Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builder b.
Category: App Crypto (app_crypto)
HASHEXTA_SHA512F90602 HASHEXTA_BLAKE2B
Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builder b.
Category: App Crypto (app_crypto)
HASHEXTA_BLAKE2BF90603 HASHEXTA_KECCAK256
Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builder b.
Category: App Crypto (app_crypto)
HASHEXTA_KECCAK256F90604 HASHEXTA_KECCAK512
Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builder b.
Category: App Crypto (app_crypto)
HASHEXTA_KECCAK512F90700 HASHEXTAR_SHA256
Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builder b.
Category: App Crypto (app_crypto)
HASHEXTAR_SHA256F90701 HASHEXTAR_SHA512
Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builder b.
Category: App Crypto (app_crypto)
HASHEXTAR_SHA512F90702 HASHEXTAR_BLAKE2B
Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builder b.
Category: App Crypto (app_crypto)
HASHEXTAR_BLAKE2BF90703 HASHEXTAR_KECCAK256
Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builder b.
Category: App Crypto (app_crypto)
HASHEXTAR_KECCAK256F90704 HASHEXTAR_KECCAK512
Calculates hash of the concatenation of slices (or builders) s_1...s_n. Appends the resulting hash to a builder b.
Category: App Crypto (app_crypto)
HASHEXTAR_KECCAK512F910 CHKSIGNU
Checks the Ed25519-signature s of a hash h (a 256-bit unsigned integer, usually computed as the hash of some data) using public key k (also represented by a 256-bit unsigned integer).
The signature s must be a Slice containing at least 512 data bits; only the first 512 bits are used. The result is -1 if the signature is valid, 0 otherwise.
Notice that CHKSIGNU is equivalent to ROT NEWC 256 STU ENDC ROTREV CHKSIGNS, i.e., to CHKSIGNS with the first argument d set to 256-bit Slice containing h. Therefore, if h is computed as the hash of some data, these data are hashed twice, the second hashing occurring inside CHKSIGNS.
Category: App Crypto (app_crypto)
CHKSIGNUF911 CHKSIGNS
Checks whether s is a valid Ed25519-signature of the data portion of Slice d using public key k, similarly to CHKSIGNU. If the bit length of Slice d is not divisible by eight, throws a cell underflow exception. The verification of Ed25519 signatures is the standard one, with Sha used to reduce d to the 256-bit number that is actually signed.
Category: App Crypto (app_crypto)
CHKSIGNSF912 ECRECOVER
Recovers the public key from a secp256k1 signature, identical to Bitcoin/Ethereum operations. Takes a 32-byte hash as uint256 hash and a 65-byte signature as uint8 v, uint256 r, and uint256 s. In TON, the v value is strictly 0 or 1; no extra flags or extended values are supported. If the public key cannot be recovered, the instruction returns 0. On success, it returns the recovered 65-byte public key as uint8 h, uint256 x1, and uint256 x2, followed by -1.
Category: App Crypto (app_crypto)
ECRECOVERF913 SECP256K1_XONLY_PUBKEY_TWEAK_ADD
performs secp256k1_xonly_pubkey_tweak_add. key and tweak are 256-bit unsigned integers. 65-byte public key is returned as uint8 f, uint256 x, y (as in ECRECOVER).
Category: App Crypto (app_crypto)
SECP256K1_XONLY_PUBKEY_TWEAK_ADDF914 P256_CHKSIGNU
Checks seck256r1-signature sig of a number h (a 256-bit unsigned integer, usually computed as the hash of some data) and public key k. 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). Signature sig is a 64-byte slice (two 256-bit unsigned integers r and s).
Category: App Crypto (app_crypto)
P256_CHKSIGNUF915 P256_CHKSIGNS
Checks seck256r1-signature sig of data portion of slice d and public key k. 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). Signature sig is a 64-byte slice (two 256-bit unsigned integers r and s).
Category: App Crypto (app_crypto)
P256_CHKSIGNSF916 HASHBU
Same as ENDC HASHCU, but without gas cost for cell creation.
Category: App Crypto (app_crypto)
HASHBUF920 RIST255_FROMHASH
Deterministically generates a valid point x from a 512-bit hash (given as two 256-bit integers).
Category: App Crypto (app_crypto)
RIST255_FROMHASHF921 RIST255_VALIDATE
Checks that integer x is a valid representation of some curve point. Throws range_chk on error.
Category: App Crypto (app_crypto)
RIST255_VALIDATEF922 RIST255_ADD
Addition of two points on a curve.
Category: App Crypto (app_crypto)
RIST255_ADDF923 RIST255_SUB
Subtraction of two points on curve.
Category: App Crypto (app_crypto)
RIST255_SUBF924 RIST255_MUL
Multiplies point x by a scalar n. Any n is valid, including negative.
Category: App Crypto (app_crypto)
RIST255_MULF925 RIST255_MULBASE
Multiplies the generator point g by a scalar n. Any n is valid, including negative.
Category: App Crypto (app_crypto)
RIST255_MULBASEF926 RIST255_PUSHL
Pushes integer l=2^252+27742317777372353535851937790883648493, which is the order of the group.
Category: App Crypto (app_crypto)
RIST255_PUSHLB7F921 RIST255_QVALIDATE
Checks that integer x is a valid representation of some curve point. Returns -1 on success and 0 on failure.
Category: App Crypto (app_crypto)
RIST255_QVALIDATEB7F922 RIST255_QADD
Addition of two points on a curve. Returns -1 on success and 0 on failure.
Category: App Crypto (app_crypto)
RIST255_QADDB7F923 RIST255_QSUB
Subtraction of two points on curve. Returns -1 on success and 0 on failure.
Category: App Crypto (app_crypto)
RIST255_QSUBB7F924 RIST255_QMUL
Multiplies point x by a scalar n. Any n is valid, including negative. Returns -1 on success and 0 on failure.
Category: App Crypto (app_crypto)
RIST255_QMULB7F925 RIST255_QMULBASE
Multiplies the generator point g by a scalar n. Any n is valid, including negative.
Category: App Crypto (app_crypto)
RIST255_QMULBASEF93000 BLS_VERIFY
Checks BLS signature, return true on success, false otherwise.
Category: App Crypto (app_crypto)
BLS_VERIFYF93001 BLS_AGGREGATE
Aggregates signatures. n>0. Throw exception if n=0 or if some sig_i is not a valid signature.
Category: App Crypto (app_crypto)
BLS_AGGREGATEF93002 BLS_FASTAGGREGATEVERIFY
Checks aggregated BLS signature for keys pk_1...pk_n and message msg. Return true on success, false otherwise. Return false if n=0.
Category: App Crypto (app_crypto)
BLS_FASTAGGREGATEVERIFYF93003 BLS_AGGREGATEVERIFY
Checks aggregated BLS signature for key-message pairs pk_1 msg_1...pk_n msg_n. Return true on success, false otherwise. Return false if n=0.
Category: App Crypto (app_crypto)
BLS_AGGREGATEVERIFYF93010 BLS_G1_ADD
Addition on G1.
Category: App Crypto (app_crypto)
BLS_G1_ADDF93011 BLS_G1_SUB
Subtraction on G1.
Category: App Crypto (app_crypto)
BLS_G1_SUBF93012 BLS_G1_NEG
Negation on G1.
Category: App Crypto (app_crypto)
BLS_G1_NEGF93013 BLS_G1_MUL
Multiplies G1 point x by scalar s. Any s is valid, including negative.
Category: App Crypto (app_crypto)
BLS_G1_MULF93014 BLS_G1_MULTIEXP
Calculates x_1*s_1+...+x_n*s_n for G1 points x_i and scalars s_i. Returns zero point if n=0. Any s_i is valid, including negative.
Category: App Crypto (app_crypto)
BLS_G1_MULTIEXPF93015 BLS_G1_ZERO
Pushes zero point in G1.
Category: App Crypto (app_crypto)
BLS_G1_ZEROF93016 BLS_MAP_TO_G1
Converts FP element f to a G1 point.
Category: App Crypto (app_crypto)
BLS_MAP_TO_G1F93017 BLS_G1_INGROUP
Checks that slice x represents a valid element of G1.
Category: App Crypto (app_crypto)
BLS_G1_INGROUPF93018 BLS_G1_ISZERO
Checks that G1 point x is equal to zero.
Category: App Crypto (app_crypto)
BLS_G1_ISZEROF93020 BLS_G2_ADD
Addition on G2.
Category: App Crypto (app_crypto)
BLS_G2_ADDF93021 BLS_G2_SUB
Subtraction on G2.
Category: App Crypto (app_crypto)
BLS_G2_SUBF93022 BLS_G2_NEG
Negation on G2.
Category: App Crypto (app_crypto)
BLS_G2_NEGF93023 BLS_G2_MUL
Multiplies G2 point x by scalar s. Any s is valid, including negative.
Category: App Crypto (app_crypto)
BLS_G2_MULF93024 BLS_G2_MULTIEXP
Calculates x_1*s_1+...+x_n*s_n for G2 points x_i and scalars s_i. Returns zero point if n=0. Any s_i is valid, including negative.
Category: App Crypto (app_crypto)
BLS_G2_MULTIEXPF93025 BLS_G2_ZERO
Pushes zero point in G2.
Category: App Crypto (app_crypto)
BLS_G2_ZEROF93026 BLS_MAP_TO_G2
Converts FP2 element f to a G2 point.
Category: App Crypto (app_crypto)
BLS_MAP_TO_G2F93027 BLS_G2_INGROUP
Checks that slice x represents a valid element of G2.
Category: App Crypto (app_crypto)
BLS_G2_INGROUPF93028 BLS_G2_ISZERO
Checks that G2 point x is equal to zero.
Category: App Crypto (app_crypto)
BLS_G2_ISZEROF93030 BLS_PAIRING
Given G1 points x_i and G2 points y_i, calculates and multiply pairings of x_i,y_i. Returns true if the result is the multiplicative identity in FP12, false otherwise. Returns false if n=0.
Category: App Crypto (app_crypto)
BLS_PAIRINGF93031 BLS_PUSHR
Pushes the order of G1 and G2 (approx. 2^255).
Category: App Crypto (app_crypto)
BLS_PUSHRF940 CDATASIZEQ
Recursively computes the count of distinct cells x, data bits y, and cell references z in the dag rooted at Cell c, effectively returning the total storage used by this dag taking into account the identification of equal cells. The values of x, y, and z are 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 cells x cannot exceed non-negative Integer n; otherwise the computation is aborted before visiting the (n+1)-st cell and a zero is returned to indicate failure. If c is Null, returns x=y=z=0.
Category: App Misc (app_misc)
CDATASIZEQF941 CDATASIZE
A non-quiet version of CDATASIZEQ that throws a cell overflow exception (8) on failure.
Category: App Misc (app_misc)
CDATASIZEF942 SDATASIZEQ
Similar to CDATASIZEQ, but accepting a Slice s instead of a Cell. The returned value of x does not take into account the cell that contains the slice s itself; however, the data bits and the cell references of s are accounted for in y and z.
Category: App Misc (app_misc)
SDATASIZEQF943 SDATASIZE
A non-quiet version of SDATASIZEQ that throws a cell overflow exception (8) on failure.
Category: App Misc (app_misc)
SDATASIZEFA00 LDGRAMS
Loads (deserializes) a Gram or VarUInteger 16 amount from Slice s, and returns the amount as Integer x along with the remainder s' of s. The expected serialization of x consists of a 4-bit unsigned big-endian integer l, followed by an 8l-bit unsigned big-endian representation of x.
The net effect is approximately equivalent to 4 LDU SWAP 3 LSHIFT# LDUX.
Category: App Currency (app_currency)
LDGRAMS
LDVARUINT16FA01 LDVARINT16
Similar to LDVARUINT16, but loads a signed Integer x.
Approximately equivalent to 4 LDU SWAP 3 LSHIFT# LDIX.
Category: App Currency (app_currency)
LDVARINT16FA02 STGRAMS
Stores (serializes) an Integer x in the range 0...2^120-1 into Builder b, and returns the resulting Builder b'. The serialization of x consists of a 4-bit unsigned big-endian integer l, which is the smallest integer l>=0, such that x<2^(8l), followed by an 8l-bit unsigned big-endian representation of x. If x does not belong to the supported range, a range check exception is thrown.
Category: App Currency (app_currency)
STGRAMS
STVARUINT16FA03 STVARINT16
Similar to STVARUINT16, but serializes a signed Integer x in the range -2^119...2^119-1.
Category: App Currency (app_currency)
STVARINT16FA04 LDVARUINT32
Loads (deserializes) a VarUInteger 32 amount from Slice s, and returns the amount as Integer x along with the remainder s' of s. The expected serialization of x consists of a 5-bit unsigned big-endian integer l, followed by an 8l-bit unsigned big-endian representation of x.
The net effect is approximately equivalent to 4 LDU SWAP 3 LSHIFT# LDUX.
Category: App Currency (app_currency)
LDVARUINT32FA05 LDVARINT32
Similar to LDVARUINT32, but loads a signed Integer x.
Approximately equivalent to 5 LDU SWAP 3 LSHIFT# LDIX.
Category: App Currency (app_currency)
LDVARINT32FA06 STVARUINT32
Stores (serializes) an Integer x in the range 0...2^248-1 into Builder b, and returns the resulting Builder b'. The serialization of x consists of a 5-bit unsigned big-endian integer l, which is the smallest integer l>=0, such that x<2^(8l), followed by an 8l-bit unsigned big-endian representation of x. If x does not belong to the supported range, a range check exception is thrown.
Category: App Currency (app_currency)
STVARUINT32FA07 STVARINT32
Similar to STVARUINT32, but serializes a signed Integer x in the range -2^247...2^247-1.
Category: App Currency (app_currency)
STVARINT32FA40 LDMSGADDR
Loads from Slice s the only prefix that is a valid MsgAddress, and returns both this prefix s' and the remainder s'' of s as slices.
Category: App Addr (app_addr)
LDMSGADDRFA41 LDMSGADDRQ
A quiet version of LDMSGADDR: on success, pushes an extra -1; on failure, pushes the original s and a zero.
Category: App Addr (app_addr)
LDMSGADDRQFA42 PARSEMSGADDR
Decomposes Slice s containing a valid MsgAddress into a Tuple t with separate fields of this MsgAddress. If s is not a valid MsgAddress, a cell deserialization exception is thrown.
Category: App Addr (app_addr)
PARSEMSGADDRFA43 PARSEMSGADDRQ
A quiet version of PARSEMSGADDR: returns a zero on error instead of throwing an exception.
Category: App Addr (app_addr)
PARSEMSGADDRQFA44 REWRITESTDADDR
Parses Slice s containing a valid MsgAddressInt (usually a msg_addr_std), applies rewriting from the anycast (if present) to the same-length prefix of the address, and returns both the workchain x and the 256-bit address y as integers. If the address is not 256-bit, or if s is not a valid serialization of MsgAddressInt, throws a cell deserialization exception.
Category: App Addr (app_addr)
REWRITESTDADDRFA45 REWRITESTDADDRQ
A quiet version of primitive REWRITESTDADDR.
Category: App Addr (app_addr)
REWRITESTDADDRQFA46 REWRITEVARADDR
msg_addr_var not allowed since TVM v10, so it behaves like REWRITESTDADDR, but returns account id in Slice, not Integer: parses address s into workchain x and account id s.
Category: App Addr (app_addr)
REWRITEVARADDRFA47 REWRITEVARADDRQ
A quiet version of primitive REWRITEVARADDR.
Category: App Addr (app_addr)
REWRITEVARADDRQFA48 LDSTDADDR
Loads addr_std$10, if address is not addr_std, throws an error 9 (cannot load a MsgAddressInt).
Category: App Addr (app_addr)
LDSTDADDRFA49 LDSTDADDRQ
A quiet version of primitive LDSTDADDR.
Category: App Addr (app_addr)
LDSTDADDRQFA50 LDOPTSTDADDR
Loads addr_std$10 or addr_none$00, if address is addr_none$00 pushes a Null, if address is not addr_std or addr_none, throws an error 9 (cannot load a MsgAddressInt).
Category: App Addr (app_addr)
LDOPTSTDADDRFA51 LDOPTSTDADDRQ
A quiet version of primitive LDOPTSTDADDR.
Category: App Addr (app_addr)
LDOPTSTDADDRQFA52 STSTDADDR
Stores addr_std$10, if address is not addr_std, throws an error 9 (cannot load a MsgAddressInt).
Category: App Addr (app_addr)
STSTDADDRFA53 STSTDADDRQ
A quiet version of primitive STSTDADDR.
Category: App Addr (app_addr)
STSTDADDRQFA54 STOPTSTDADDR
stores addr_std$10 or Null. Null is stored as addr_none$00, if address is not addr_std, throws an error 9 (cannot load a MsgAddressInt).
Category: App Addr (app_addr)
STOPTSTDADDRFA55 STOPTSTDADDRQ
A quiet version of primitive STOPTSTDADDR.
Category: App Addr (app_addr)
STOPTSTDADDRQFB00 SENDRAWMSG
Sends a raw message contained in Cell c, which should contain a correctly serialized object Message X, with the only exception that the source address is allowed to have dummy value addr_none (to be automatically replaced with the current smart-contract address), and ihr_fee, fwd_fee, created_lt and created_at fields can have arbitrary values (to be rewritten with correct values during the action phase of the current transaction). Integer parameter x contains the flags. Currently x=0 is used for ordinary messages; x=128 is 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=64 is 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+1 means that the sender wants to pay transfer fees separately; x'=x+2 means that any errors arising while processing this message during the action phase should be ignored. Finally, x'=x+32 means that the current account must be destroyed if its resulting balance is zero. This flag is usually employed together with +128.
Category: App Actions (app_actions)
SENDRAWMSGFB02 RAWRESERVE
Creates an output action which would reserve exactly x nanograms (if y=0), at most x nanograms (if y=2), or all but x nanograms (if y=1 or y=3), from the remaining balance of the account. It is roughly equivalent to creating an outbound message carrying x nanograms (or b-x nanograms, where b is the remaining balance) to oneself, so that the subsequent output actions would not be able to spend more money than the remainder. Bit +2 in y means that the external action does not fail if the specified amount cannot be reserved; instead, all remaining balance is reserved. Bit +8 in y means x:=-x before performing any further actions. Bit +4 in y means that x is increased by the original balance of the current account (before the compute phase), including all extra currencies, before performing any other checks and actions. Currently x must be a non-negative integer, and y must be in the range 0...15.
Category: App Actions (app_actions)
RAWRESERVEFB03 RAWRESERVEX
Similar to RAWRESERVE, but also accepts a dictionary D (represented by a Cell or Null) with extra currencies. In this way currencies other than Grams can be reserved.
Category: App Actions (app_actions)
RAWRESERVEXFB04 SETCODE
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.
Category: App Actions (app_actions)
SETCODEFB06 SETLIBCODE
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. If x=0, the library is actually removed if it was previously present in the collection (if not, this action does nothing). If x=1, the library is added as a private library, and if x=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 to x. Values of x other than 0...2 are invalid.
Category: App Actions (app_actions)
SETLIBCODEFB07 CHANGELIB
Creates an output action similarly to SETLIBCODE, but instead of the library code accepts its hash as an unsigned 256-bit integer h. If x!=0 and the library with hash h is absent from the library collection of this smart contract, this output action will fail.
Category: App Actions (app_actions)
CHANGELIBFB08 SENDMSG
Creates an output action and returns a fee for creating a message. Mode has the same effect as in the case of SENDRAWMSG. Additionally +1024 means - do not create an action, only estimate fee. Other modes affect the fee calculation as follows: +64 substitutes 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), +128 substitutes 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).
Category: App Actions (app_actions)
SENDMSGFEij DEBUG
Category: Debug (debug)
{i*16+j} DEBUGAliases:
DUMPSTK
Dumps the stack (at most the top 255 values) and shows the total stack depth. Does nothing on production versions of TVM.STRDUMP
Dumps slice with length divisible by 8 from top of stack as a string. Does nothing on production versions of TVM.DUMP
Dumps slice with length divisible by 8 from top of stack as a string. Does nothing on production versions of TVM.
FEFnssss DEBUGSTR
0 <= n < 16. Length of ssss is n+1 bytes.{string} is a string literal.DEBUGSTR: ssss is the given string.DEBUGSTRI: ssss is one-byte integer 0 <= x <= 255 followed by the given string.
Category: Debug (debug)
{string} DEBUGSTR
{string} {x} DEBUGSTRIFFnn SETCP
Selects TVM codepage 0 <= nn < 240. If the codepage is not supported, throws an invalid opcode exception.
Category: Codepage (codepage)
[nn] SETCPAliases:
SETCP0
Selects TVM (test) codepage zero as described in this document.
FFFz SETCP_SPECIAL
Selects TVM codepage z-16 for 1 <= z <= 15. Negative codepages -13...-1 are reserved for restricted versions of TVM needed to validate runs of TVM in other codepages. Negative codepage -14 is reserved for experimental codepages, not necessarily compatible between different TVM implementations, and should be disabled in the production versions of TVM.
Category: Codepage (codepage)
[z-16] SETCPFFF0 SETCPX
Selects codepage c with -2^15 <= c < 2^15 passed in the top of the stack.
Category: Codepage (codepage)
SETCPXLast updated on