00 NOP
Fift: NOP
Description: Does nothing.
Category: stack_basic Stack Basic0 XCHG_0I
Fift: s[i] XCHG0
Description: Interchanges s0 with s[i], 1 <= i <= 15.
Category: stack_basic Stack Basic
Alias: SWAP Same as s1 XCHG0.1 XCHG_1I
Fift: s1 s[i] XCHG
Description: Interchanges s1 with s[i], 2 <= i <= 15.
Category: stack_basic Stack Basic2 PUSH
Fift: s[i] PUSH
Description: Pushes a copy of the old s[i] into the stack.
Category: stack_basic Stack Basic
Alias: DUP Same as s0 PUSH.
Alias: OVER Same as s1 PUSH.3 POP
Fift: s[i] POP
Description: Pops the old s0 value into the old s[i].
Category: stack_basic Stack Basic
Alias: DROP Same as s0 POP, discards the top-of-stack value.
Alias: NIP Same as s1 POP.4 XCHG3
Fift: s[i] s[j] s[k] XCHG3
Description: Equivalent to s2 s[i] XCHG s1 s[j] XCHG s[k] XCHG0.
Category: stack_complex Stack Complex7 PUSHINT_4
Fift: [x] PUSHINT
[x] INT
Description: 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
Alias: ZERO
Alias: ONE
Alias: TWO
Alias: TEN
Alias: TRUE9 PUSHCONT_SHORT
Fift: [builder] PUSHCONT
[builder] CONT
Description: Pushes a continuation made from builder.
Details: Pushes an x-byte continuation for 0 <= x <= 15.
Category: const_data Const Data10 XCHG_IJ
Fift: s[i] s[j] XCHG
Description: Interchanges s[i] with s[j], 1 <= i < j <= 15.
Category: stack_basic Stack Basic11 XCHG_0I_LONG
Fift: s0 [ii] s() XCHG
Description: Interchanges s0 with s[ii], 0 <= ii <= 255.
Category: stack_basic Stack Basic50 XCHG2
Fift: s[i] s[j] XCHG2
Description: Equivalent to s1 s[i] XCHG s[j] XCHG0.
Category: stack_complex Stack Complex51 XCPU
Fift: s[i] s[j] XCPU
Description: Equivalent to s[i] XCHG0 s[j] PUSH.
Category: stack_complex Stack Complex52 PUXC
Fift: s[i] s[j-1] PUXC
Description: Equivalent to s[i] PUSH SWAP s[j] XCHG0.
Category: stack_complex Stack Complex53 PUSH2
Fift: s[i] s[j] PUSH2
Description: Equivalent to s[i] PUSH s[j+1] PUSH.
Category: stack_complex Stack Complex55 BLKSWAP
Fift: [i+1] [j+1] BLKSWAP
Description: 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
Alias: ROT2 Rotates the three topmost pairs of stack entries.
Alias: ROLL Rotates the top i+1 stack entries.
Equivalent to 1 [i+1] BLKSWAP.
Alias: ROLLREV Rotates the top i+1 stack entries in the other direction.
Equivalent to [i+1] 1 BLKSWAP.56 PUSH_LONG
Fift: [ii] s() PUSH
Description: Pushes a copy of the old s[ii] into the stack.
0 <= ii <= 255
Category: stack_complex Stack Complex57 POP_LONG
Fift: [ii] s() POP
Description: Pops the old s0 value into the old s[ii].
0 <= ii <= 255
Category: stack_complex Stack Complex58 ROT
Fift: ROT
Description: Equivalent to 1 2 BLKSWAP or to s2 s1 XCHG2.
Category: stack_complex Stack Complex59 ROTREV
Fift: ROTREV
-ROT
Description: Equivalent to 2 1 BLKSWAP or to s2 s2 XCHG2.
Category: stack_complex Stack Complex5A SWAP2
Fift: SWAP2
2SWAP
Description: Equivalent to 2 2 BLKSWAP or to s3 s2 XCHG2.
Category: stack_complex Stack Complex5B DROP2
Fift: DROP2
2DROP
Description: Equivalent to DROP DROP.
Category: stack_complex Stack Complex5C DUP2
Fift: DUP2
2DUP
Description: Equivalent to s1 s0 PUSH2.
Category: stack_complex Stack Complex5D OVER2
Fift: OVER2
2OVER
Description: Equivalent to s3 s2 PUSH2.
Category: stack_complex Stack Complex5E REVERSE
Fift: [i+2] [j] REVERSE
Description: Reverses the order of s[j+i+1] ... s[j].
Category: stack_complex Stack Complex5F BLKPUSH
Fift: [i] [j] BLKPUSH
Description: Equivalent to PUSH s(j) performed i times.
1 <= i <= 15, 0 <= j <= 15.
Category: stack_complex Stack Complex60 PICK
Fift: PICK
PUSHX
Description: Pops integer i from the stack, then performs s[i] PUSH.
Category: stack_complex Stack Complex61 ROLLX
Fift: ROLLX
Description: Pops integer i from the stack, then performs 1 [i] BLKSWAP.
Category: stack_complex Stack Complex62 -ROLLX
Fift: -ROLLX
ROLLREVX
Description: Pops integer i from the stack, then performs [i] 1 BLKSWAP.
Category: stack_complex Stack Complex63 BLKSWX
Fift: BLKSWX
Description: Pops integers i,j from the stack, then performs [i] [j] BLKSWAP.
Category: stack_complex Stack Complex64 REVX
Fift: REVX
Description: Pops integers i,j from the stack, then performs [i] [j] REVERSE.
Category: stack_complex Stack Complex65 DROPX
Fift: DROPX
Description: Pops integer i from the stack, then performs [i] BLKDROP.
Category: stack_complex Stack Complex66 TUCK
Fift: TUCK
Description: Equivalent to SWAP OVER or to s1 s1 XCPU.
Category: stack_complex Stack Complex67 XCHGX
Fift: XCHGX
Description: Pops integer i from the stack, then performs s[i] XCHG.
Category: stack_complex Stack Complex68 DEPTH
Fift: DEPTH
Description: Pushes the current depth of the stack.
Category: stack_complex Stack Complex69 CHKDEPTH
Fift: CHKDEPTH
Description: 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 Complex6A ONLYTOPX
Fift: ONLYTOPX
Description: Pops integer i from the stack, then removes all but the top i elements.
Category: stack_complex Stack Complex6B ONLYX
Fift: ONLYX
Description: Pops integer i from the stack, then leaves only the bottom i elements. Approximately equivalent to DEPTH SWAP SUB DROPX.
Category: stack_complex Stack Complex6C BLKDROP2
Fift: [i] [j] BLKDROP2
Description: 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 Complex6D NULL
Fift: NULL
PUSHNULL
Description: Pushes the only value of type Null.
Category: tuple Tuple
Alias: NEWDICT Returns a new empty dictionary.
It is an alternative mnemonics for PUSHNULL.6E ISNULL
Fift: ISNULL
Description: Checks whether x is a Null, and returns -1 or 0 accordingly.
Category: tuple Tuple
Alias: DICTEMPTY Checks whether dictionary D is empty, and returns -1 or 0 accordingly.
It is an alternative mnemonics for ISNULL.80 PUSHINT_8
Fift: [xx] PUSHINT
[xx] INT
Description: Pushes integer xx. -128 <= xx <= 127.
Category: const_int Const Int81 PUSHINT_16
Fift: [xxxx] PUSHINT
[xxxx] INT
Description: Pushes integer xxxx. -2^15 <= xx < 2^15.
Category: const_int Const Int82 PUSHINT_LONG
Fift: [xxx] PUSHINT
[xxx] INT
Description: 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 Int83 PUSHPOW2
Fift: [xx+1] PUSHPOW2
Description: (Quietly) pushes 2^(xx+1) for 0 <= xx <= 255.
2^256 is a NaN.
Category: const_int Const Int84 PUSHPOW2DEC
Fift: [xx+1] PUSHPOW2DEC
Description: Pushes 2^(xx+1)-1 for 0 <= xx <= 255.
Category: const_int Const Int85 PUSHNEGPOW2
Fift: [xx+1] PUSHNEGPOW2
Description: Pushes -2^(xx+1) for 0 <= xx <= 255.
Category: const_int Const Int88 PUSHREF
Fift: [ref] PUSHREF
Description: 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 Data89 PUSHREFSLICE
Fift: [ref] PUSHREFSLICE
Description: Similar to PUSHREF, but converts the cell into a Slice.
Category: const_data Const Data8A PUSHREFCONT
Fift: [ref] PUSHREFCONT
Description: Similar to PUSHREFSLICE, but makes a simple ordinary Continuation out of the cell.
Category: const_data Const Data8B PUSHSLICE
Fift: [slice] PUSHSLICE
[slice] SLICE
Description: 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 Data8C PUSHSLICE_REFS
Fift: [slice] PUSHSLICE
[slice] SLICE
Description: 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 Data8D PUSHSLICE_LONG
Fift: [slice] PUSHSLICE
[slice] SLICE
Description: 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 DataA0 ADD
Fift: ADD
Description:
Category: arithm_basic Arithm BasicA1 SUB
Fift: SUB
Description:
Category: arithm_basic Arithm BasicA2 SUBR
Fift: SUBR
Description: Equivalent to SWAP SUB.
Category: arithm_basic Arithm BasicA3 NEGATE
Fift: NEGATE
Description: Equivalent to -1 MULCONST or to ZERO SUBR.
Notice that it triggers an integer overflow exception if x=-2^256.
Category: arithm_basic Arithm BasicA4 INC
Fift: INC
Description: Equivalent to 1 ADDCONST.
Category: arithm_basic Arithm BasicA5 DEC
Fift: DEC
Description: Equivalent to -1 ADDCONST.
Category: arithm_basic Arithm BasicA6 ADDCONST
Fift: [cc] ADDCONST
[cc] ADDINT
[-cc] SUBCONST
[-cc] SUBINT
Description: -128 <= cc <= 127.
Category: arithm_basic Arithm BasicA7 MULCONST
Fift: [cc] MULCONST
[cc] MULINT
Description: -128 <= cc <= 127.
Category: arithm_basic Arithm BasicA8 MUL
Fift: MUL
Description:
Category: arithm_basic Arithm BasicAA LSHIFT
Fift: [cc+1] LSHIFT#
Description: 0 <= cc <= 255
Category: arithm_logical Arithm LogicalAB RSHIFT
Fift: [cc+1] RSHIFT#
Description: 0 <= cc <= 255
Category: arithm_logical Arithm LogicalAC LSHIFT_VAR
Fift: LSHIFT
Description: 0 <= y <= 1023
Category: arithm_logical Arithm LogicalAD RSHIFT_VAR
Fift: RSHIFT
Description: 0 <= y <= 1023
Category: arithm_logical Arithm LogicalAE POW2
Fift: POW2
Description: 0 <= y <= 1023
Equivalent to ONE SWAP LSHIFT.
Category: arithm_logical Arithm LogicalB0 AND
Fift: AND
Description: Bitwise and of two signed integers x and y, sign-extended to infinity.
Category: arithm_logical Arithm LogicalB1 OR
Fift: OR
Description: Bitwise or of two integers.
Category: arithm_logical Arithm LogicalB2 XOR
Fift: XOR
Description: Bitwise xor of two integers.
Category: arithm_logical Arithm LogicalB3 NOT
Fift: NOT
Description: Bitwise not of an integer.
Category: arithm_logical Arithm LogicalB4 FITS
Fift: [cc+1] FITS
Description: 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
Alias: CHKBOOL Checks whether x is a ”boolean value” (i.e., either 0 or -1).B5 UFITS
Fift: [cc+1] UFITS
Description: 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
Alias: CHKBIT Checks whether x is a binary digit (i.e., zero or one).B8 SGN
Fift: SGN
Description: Computes the sign of an integer x:
-1 if x<0, 0 if x=0, 1 if x>0.
Category: compare_int Compare IntB9 LESS
Fift: LESS
Description: Returns -1 if x<y, 0 otherwise.
Category: compare_int Compare IntBA EQUAL
Fift: EQUAL
Description: Returns -1 if x=y, 0 otherwise.
Category: compare_int Compare IntBB LEQ
Fift: LEQ
Description:
Category: compare_int Compare IntBC GREATER
Fift: GREATER
Description:
Category: compare_int Compare IntBD NEQ
Fift: NEQ
Description: Equivalent to EQUAL NOT.
Category: compare_int Compare IntBE GEQ
Fift: GEQ
Description: Equivalent to LESS NOT.
Category: compare_int Compare IntBF CMP
Fift: CMP
Description: 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 IntC0 EQINT
Fift: [yy] EQINT
Description: Returns -1 if x=yy, 0 otherwise.
-2^7 <= yy < 2^7.
Category: compare_int Compare Int
Alias: ISZERO Checks whether an integer is zero. Corresponds to Forth’s 0=.C1 LESSINT
Fift: [yy] LESSINT
[yy-1] LEQINT
Description: Returns -1 if x<yy, 0 otherwise.
-2^7 <= yy < 2^7.
Category: compare_int Compare Int
Alias: ISNEG Checks whether an integer is negative. Corresponds to Forth’s 0<.
Alias: ISNPOS Checks whether an integer is non-positive.C2 GTINT
Fift: [yy] GTINT
[yy+1] GEQINT
Description: Returns -1 if x>yy, 0 otherwise.
-2^7 <= yy < 2^7.
Category: compare_int Compare Int
Alias: ISPOS Checks whether an integer is positive. Corresponds to Forth’s 0>.
Alias: ISNNEG Checks whether an integer is non-negative.C3 NEQINT
Fift: [yy] NEQINT
Description: Returns -1 if x!=yy, 0 otherwise.
-2^7 <= yy < 2^7.
Category: compare_int Compare IntC4 ISNAN
Fift: ISNAN
Description: Checks whether x is a NaN.
Category: compare_int Compare IntC5 CHKNAN
Fift: CHKNAN
Description: Throws an arithmetic overflow exception if x is a NaN.
Category: compare_int Compare IntC8 NEWC
Fift: NEWC
Description: Creates a new empty Builder.
Category: cell_build Cell BuildC9 ENDC
Fift: ENDC
Description: Converts a Builder into an ordinary Cell.
Category: cell_build Cell BuildCA STI
Fift: [cc+1] STI
Description: 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 BuildCB STU
Fift: [cc+1] STU
Description: Stores an unsigned cc+1-bit integer x into Builder b. In all other respects it is similar to STI.
Category: cell_build Cell BuildCC STREF
Fift: STREF
Description: Stores a reference to Cell c into Builder b.
Category: cell_build Cell BuildCD STBREFR
Fift: STBREFR
ENDCST
Description: Equivalent to ENDC SWAP STREF.
Category: cell_build Cell BuildCE STSLICE
Fift: STSLICE
Description: Stores Slice s into Builder b.
Category: cell_build Cell Build
Alias: STDICTS Stores a Slice-represented dictionary s into Builder b.
It is actually a synonym for STSLICE.D0 CTOS
Fift: CTOS
Description: 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 ParseD1 ENDS
Fift: ENDS
Description: Removes a Slice s from the stack, and throws an exception if it is not empty.
Category: cell_parse Cell ParseD2 LDI
Fift: [cc+1] LDI
Description: 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 ParseD3 LDU
Fift: [cc+1] LDU
Description: Loads an unsigned cc+1-bit integer x from Slice s.
Category: cell_parse Cell ParseD4 LDREF
Fift: LDREF
Description: Loads a cell reference c from s.
Category: cell_parse Cell ParseD5 LDREFRTOS
Fift: LDREFRTOS
Description: Equivalent to LDREF SWAP CTOS.
Category: cell_parse Cell ParseD6 LDSLICE
Fift: [cc+1] LDSLICE
Description: Cuts the next cc+1 bits of s into a separate Slice s''.
Category: cell_parse Cell ParseD8 EXECUTE
Fift: EXECUTE
CALLX
Description: Calls, or executes, continuation c.
Category: cont_basic Cont BasicD9 JMPX
Fift: JMPX
Description: Jumps, or transfers control, to continuation c.
The remainder of the previous current continuation cc is discarded.
Category: cont_basic Cont BasicDA CALLXARGS
Fift: [p] [r] CALLXARGS
Description: Calls continuation c with p parameters and expecting r return values
0 <= p <= 15, 0 <= r <= 15
Category: cont_basic Cont BasicDC IFRET
Fift: IFRET
IFNOT:
Description: 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 ConditionalDD IFNOTRET
Fift: IFNOTRET
IF:
Description: Performs a RET, but only if integer f is zero.
Category: cont_conditional Cont ConditionalDE IF
Fift: IF
Description: 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 ConditionalDF IFNOT
Fift: IFNOT
Description: Executes continuation c, but only if integer f is zero. Otherwise simply discards both values.
Category: cont_conditional Cont ConditionalE0 IFJMP
Fift: IFJMP
Description: Jumps to c (similarly to JMPX), but only if f is non-zero.
Category: cont_conditional Cont ConditionalE1 IFNOTJMP
Fift: IFNOTJMP
Description: Jumps to c (similarly to JMPX), but only if f is zero.
Category: cont_conditional Cont ConditionalE2 IFELSE
Fift: IFELSE
Description: If integer f is non-zero, executes c, otherwise executes c'. Equivalent to CONDSELCHK EXECUTE.
Category: cont_conditional Cont ConditionalE4 REPEAT
Fift: REPEAT
Description: 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 LoopsE5 REPEATEND
Fift: REPEATEND
REPEAT:
Description: Similar to REPEAT, but it is applied to the current continuation cc.
Category: cont_loops Cont LoopsE6 UNTIL
Fift: UNTIL
Description: 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 LoopsE7 UNTILEND
Fift: UNTILEND
UNTIL:
Description: 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 LoopsE8 WHILE
Fift: WHILE
Description: 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 LoopsE9 WHILEEND
Fift: WHILEEND
Description: Similar to WHILE, but uses the current continuation cc as the loop body.
Category: cont_loops Cont LoopsEA AGAIN
Fift: AGAIN
Description: 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 LoopsEB AGAINEND
Fift: AGAINEND
AGAIN:
Description: Similar to AGAIN, but performed with respect to the current continuation cc.
Category: cont_loops Cont LoopsEC SETCONTARGS_N
Fift: [r] [n] SETCONTARGS
Description: 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
Alias: SETNUMARGS Sets c.nargs to n plus the current depth of c’s stack, where 0 <= n <= 14. If c.nargs is already set to a non-negative value, does nothing.
Alias: SETCONTARGS Pushes 0 <= r <= 15 values x_1...x_r into the stack of (a copy of) the continuation c, starting with x_1. If the final depth of c’s stack turns out to be greater than c.nargs, a stack overflow exception is generated.EE BLESSARGS
Fift: [r] [n] BLESSARGS
Description: 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
Alias: BLESSNUMARGS Also transforms a Slice s into a Continuation c, but sets c.nargs to 0 <= n <= 14.F0 CALLDICT
Fift: [nn] CALL
[nn] CALLDICT
Description: 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 DictF3 TRYARGS
Fift: [p] [r] TRYARGS
Description: 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 ExceptionsFE DEBUG
Fift: {i*16+j} DEBUG
Description:
Category: debug Debug
Alias: DUMPSTK Dumps the stack (at most the top 255 values) and shows the total stack depth. Does nothing on production versions of TVM.
Alias: STRDUMP Dumps slice with length divisible by 8 from top of stack as a string. Does nothing on production versions of TVM.
Alias: DUMP Dumps slice with length divisible by 8 from top of stack as a string. Does nothing on production versions of TVM.FF SETCP
Fift: [nn] SETCP
Description: Selects TVM codepage 0 <= nn < 240. If the codepage is not supported, throws an invalid opcode exception.
Category: codepage Codepage
Alias: SETCP0 Selects TVM (test) codepage zero as described in this document.540 XCHG3_ALT
Fift: s[i] s[j] s[k] XCHG3_l
Description: Long form of XCHG3.
Category: stack_complex Stack Complex541 XC2PU
Fift: s[i] s[j] s[k] XC2PU
Description: Equivalent to s[i] s[j] XCHG2 s[k] PUSH.
Category: stack_complex Stack Complex542 XCPUXC
Fift: s[i] s[j] s[k-1] XCPUXC
Description: Equivalent to s1 s[i] XCHG s[j] s[k-1] PUXC.
Category: stack_complex Stack Complex543 XCPU2
Fift: s[i] s[j] s[k] XCPU2
Description: Equivalent to s[i] XCHG0 s[j] s[k] PUSH2.
Category: stack_complex Stack Complex544 PUXC2
Fift: s[i] s[j-1] s[k-1] PUXC2
Description: Equivalent to s[i] PUSH s2 XCHG0 s[j] s[k] XCHG2.
Category: stack_complex Stack Complex545 PUXCPU
Fift: s[i] s[j-1] s[k-1] PUXCPU
Description: Equivalent to s[i] s[j-1] PUXC s[k] PUSH.
Category: stack_complex Stack Complex546 PU2XC
Fift: s[i] s[j-1] s[k-2] PU2XC
Description: Equivalent to s[i] PUSH SWAP s[j] s[k-1] PUXC.
Category: stack_complex Stack Complex547 PUSH3
Fift: s[i] s[j] s[k] PUSH3
Description: Equivalent to s[i] PUSH s[j+1] s[k+1] PUSH2.
Category: stack_complex Stack Complex5F0 BLKDROP
Fift: [i] BLKDROP
Description: Equivalent to DROP performed i times.
Category: stack_complex Stack Complex6F0 TUPLE
Fift: [n] TUPLE
Description: Creates a new Tuple t=(x_1, ... ,x_n) containing n values x_1,…, x_n.
0 <= n <= 15
Category: tuple Tuple
Alias: NIL Pushes the only Tuple t=() of length zero.
Alias: SINGLE Creates a singleton t:=(x), i.e., a Tuple of length one.
Alias: PAIR Creates pair t:=(x,y).
Alias: TRIPLE Creates triple t:=(x,y,z).6F1 INDEX
Fift: [k] INDEX
Description: Returns the k-th element of a Tuple t.
0 <= k <= 15.
Category: tuple Tuple
Alias: FIRST Returns the first element of a Tuple.
Alias: SECOND Returns the second element of a Tuple.
Alias: THIRD Returns the third element of a Tuple.6F2 UNTUPLE
Fift: [n] UNTUPLE
Description: 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
Alias: UNSINGLE Unpacks a singleton t=(x).
Alias: UNPAIR Unpacks a pair t=(x,y).
Alias: UNTRIPLE Unpacks a triple t=(x,y,z).6F3 UNPACKFIRST
Fift: [k] UNPACKFIRST
Description: Unpacks first 0 <= k <= 15 elements of a Tuple t.
If |t|<k, throws a type check exception.
Category: tuple Tuple
Alias: CHKTUPLE Checks whether t is a Tuple. If not, throws a type check exception.6F4 EXPLODE
Fift: [n] EXPLODE
Description: 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 Tuple6F5 SETINDEX
Fift: [k] SETINDEX
Description: 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
Alias: SETFIRST Sets the first component of Tuple t to x and returns the resulting Tuple t'.
Alias: SETSECOND Sets the second component of Tuple t to x and returns the resulting Tuple t'.
Alias: SETTHIRD Sets the third component of Tuple t to x and returns the resulting Tuple t'.6F6 INDEXQ
Fift: [k] INDEXQ
Description: 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
Alias: FIRSTQ Returns the first element of a Tuple.
Alias: SECONDQ Returns the second element of a Tuple.
Alias: THIRDQ Returns the third element of a Tuple.6F7 SETINDEXQ
Fift: [k] SETINDEXQ
Description: 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
Alias: SETFIRSTQ Sets the first component of Tuple t to x and returns the resulting Tuple t'.
Alias: SETSECONDQ Sets the second component of Tuple t to x and returns the resulting Tuple t'.
Alias: SETTHIRDQ Sets the third component of Tuple t to x and returns the resulting Tuple t'.6FB INDEX2
Fift: [i] [j] INDEX2
Description: Recovers x=(t_{i+1})_{j+1} for 0 <= i,j <= 3.
Equivalent to [i] INDEX [j] INDEX.
Category: tuple Tuple
Alias: CADR Recovers x=(t_2)_1.
Alias: CDDR Recovers x=(t_2)_2.DB0 CALLXARGS_VAR
Fift: [p] -1 CALLXARGS
Description: Calls continuation c with 0 <= p <= 15 parameters, expecting an arbitrary number of return values.
Category: cont_basic Cont BasicDB1 JMPXARGS
Fift: [p] JMPXARGS
Description: 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 BasicDB2 RETARGS
Fift: [r] RETARGS
Description: Returns to c0, with 0 <= r <= 15 return values taken from the current stack.
Category: cont_basic Cont BasicDB4 RUNVM
Fift: flags RUNVM
Description: 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.
Category: cont_basic Cont BasicED0 RETURNARGS
Fift: [p] RETURNARGS
Description: 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 StackED4 PUSHCTR
Fift: c[i] PUSHCTR
c[i] PUSH
Description: 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
Alias: PUSHROOT Pushes the ”global data root” cell reference, thus enabling access to persistent smart-contract data.ED5 POPCTR
Fift: c[i] POPCTR
c[i] POP
Description: 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
Alias: POPROOT Sets the ”global data root” cell reference, thus allowing modification of persistent smart-contract data.ED6 SETCONTCTR
Fift: c[i] SETCONT
c[i] SETCONTCTR
Description: 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 RegistersED7 SETRETCTR
Fift: c[i] SETRETCTR
Description: Equivalent to c0 PUSHCTR c[i] SETCONTCTR c0 POPCTR.
Category: cont_registers Cont RegistersED8 SETALTCTR
Fift: c[i] SETALTCTR
Description: Equivalent to c1 PUSHCTR c[i] SETCONTCTR c1 POPCTR.
Category: cont_registers Cont RegistersED9 POPSAVE
Fift: c[i] POPSAVE
c[i] POPCTRSAVE
Description: 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 RegistersEDA SAVE
Fift: c[i] SAVE
c[i] SAVECTR
Description: 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 RegistersEDB SAVEALT
Fift: c[i] SAVEALT
c[i] SAVEALTCTR
Description: Similar to c[i] SAVE, but saves the current value of c[i] into the savelist of c1, not c0.
Category: cont_registers Cont RegistersEDC SAVEBOTH
Fift: c[i] SAVEBOTH
c[i] SAVEBOTHCTR
Description: Equivalent to c[i] SAVE c[i] SAVEALT.
Category: cont_registers Cont RegistersF82 GETPARAM
Fift: [i] GETPARAM
Description: 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
Alias: NOW Returns the current Unix time as an Integer. If it is impossible to recover the requested value starting from c7, throws a type checking or range checking exception as appropriate.
Equivalent to 3 GETPARAM.
Alias: BLOCKLT Returns the starting logical time of the current block.
Equivalent to 4 GETPARAM.
Alias: LTIME Returns the logical time of the current transaction.
Equivalent to 5 GETPARAM.
Alias: RANDSEED Returns the current random seed as an unsigned 256-bit Integer.
Equivalent to 6 GETPARAM.
Alias: 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 to 7 GETPARAM.
Note that RAW primitives such as SENDRAWMSG do not update this field.
Alias: MYADDR Returns the internal address of the current smart contract as a Slice with a MsgAddressInt. If necessary, it can be parsed further using primitives such as PARSEMSGADDR or REWRITESTDADDR.
Equivalent to 8 GETPARAM.
Alias: CONFIGROOT Returns the Maybe Cell D with the current global configuration dictionary. Equivalent to 9 GETPARAM .
Alias: MYCODE Retrieves code of smart-contract from c7. Equivalent to 10 GETPARAM .
Alias: INCOMINGVALUE Retrieves value of incoming message from c7. Equivalent to 11 GETPARAM .
Alias: STORAGEFEES Retrieves value of storage phase fees from c7. Equivalent to 12 GETPARAM .
Alias: PREVBLOCKSINFOTUPLE Retrives PrevBlocksInfo: [last_mc_blocks, prev_key_block] from c7. Equivalent to 13 GETPARAM .FEF DEBUGSTR
Fift: {string} DEBUGSTR
{string} {x} DEBUGSTRI
Description: 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 DebugFFF SETCP_SPECIAL
Fift: [z-16] SETCP
Description: 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 Codepage6F80 TUPLEVAR
Fift: TUPLEVAR
Description: Creates a new Tuple t of length n similarly to TUPLE, but with 0 <= n <= 255 taken from the stack.
Category: tuple Tuple6F81 INDEXVAR
Fift: INDEXVAR
Description: Similar to k INDEX, but with 0 <= k <= 254 taken from the stack.
Category: tuple Tuple6F82 UNTUPLEVAR
Fift: UNTUPLEVAR
Description: Similar to n UNTUPLE, but with 0 <= n <= 255 taken from the stack.
Category: tuple Tuple6F83 UNPACKFIRSTVAR
Fift: UNPACKFIRSTVAR
Description: Similar to n UNPACKFIRST, but with 0 <= n <= 255 taken from the stack.
Category: tuple Tuple6F84 EXPLODEVAR
Fift: EXPLODEVAR
Description: Similar to n EXPLODE, but with 0 <= n <= 255 taken from the stack.
Category: tuple Tuple6F85 SETINDEXVAR
Fift: SETINDEXVAR
Description: Similar to k SETINDEX, but with 0 <= k <= 254 taken from the stack.
Category: tuple Tuple6F86 INDEXVARQ
Fift: INDEXVARQ
Description: Similar to n INDEXQ, but with 0 <= k <= 254 taken from the stack.
Category: tuple Tuple6F87 SETINDEXVARQ
Fift: SETINDEXVARQ
Description: Similar to k SETINDEXQ, but with 0 <= k <= 254 taken from the stack.
Category: tuple Tuple6F88 TLEN
Fift: TLEN
Description: Returns the length of a Tuple.
Category: tuple Tuple6F89 QTLEN
Fift: QTLEN
Description: Similar to TLEN, but returns -1 if t is not a Tuple.
Category: tuple Tuple6F8A ISTUPLE
Fift: ISTUPLE
Description: Returns -1 or 0 depending on whether t is a Tuple.
Category: tuple Tuple6F8B LAST
Fift: LAST
Description: Returns the last element of a non-empty Tuple t.
Category: tuple Tuple6F8C TPUSH
Fift: TPUSH
COMMA
Description: 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 Tuple6F8D TPOP
Fift: TPOP
Description: 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 Tuple6FA0 NULLSWAPIF
Fift: NULLSWAPIF
Description: Pushes a Null under the topmost Integer x, but only if x!=0.
Category: tuple Tuple6FA1 NULLSWAPIFNOT
Fift: NULLSWAPIFNOT
Description: 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 Tuple6FA2 NULLROTRIF
Fift: NULLROTRIF
Description: Pushes a Null under the second stack entry from the top, but only if the topmost Integer y is non-zero.
Category: tuple Tuple6FA3 NULLROTRIFNOT
Fift: NULLROTRIFNOT
Description: 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 Tuple6FA4 NULLSWAPIF2
Fift: NULLSWAPIF2
Description: Pushes two nulls under the topmost Integer x, but only if x!=0.
Equivalent to NULLSWAPIF NULLSWAPIF.
Category: tuple Tuple6FA5 NULLSWAPIFNOT2
Fift: NULLSWAPIFNOT2
Description: Pushes two nulls under the topmost Integer x, but only if x=0.
Equivalent to NULLSWAPIFNOT NULLSWAPIFNOT.
Category: tuple Tuple6FA6 NULLROTRIF2
Fift: NULLROTRIF2
Description: 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 Tuple6FA7 NULLROTRIFNOT2
Fift: NULLROTRIFNOT2
Description: 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 Tuple83FF PUSHNAN
Fift: PUSHNAN
Description: Pushes a NaN.
Category: const_int Const IntA900 ADDDIVMOD
Fift: ADDDIVMOD
Description:
Category: arithm_div Arithm DivA901 ADDDIVMODR
Fift: ADDDIVMODR
Description:
Category: arithm_div Arithm DivA902 ADDDIVMODC
Fift: ADDDIVMODC
Description:
Category: arithm_div Arithm DivA904 DIV
Fift: DIV
Description: q=floor(x/y), r=x-y*q
Category: arithm_div Arithm DivA905 DIVR
Fift: DIVR
Description: q'=round(x/y), r'=x-y*q'
Category: arithm_div Arithm DivA906 DIVC
Fift: DIVC
Description: q''=ceil(x/y), r''=x-y*q''
Category: arithm_div Arithm DivA908 MOD
Fift: MOD
Description:
Category: arithm_div Arithm DivA909 MODR
Fift: MODR
Description:
Category: arithm_div Arithm DivA90A MODC
Fift: MODC
Description:
Category: arithm_div Arithm DivA90C DIVMOD
Fift: DIVMOD
Description:
Category: arithm_div Arithm DivA90D DIVMODR
Fift: DIVMODR
Description:
Category: arithm_div Arithm DivA90E DIVMODC
Fift: DIVMODC
Description:
Category: arithm_div Arithm DivA920 ADDRSHIFTMOD_VAR
Fift: ADDRSHIFTMOD
Description:
Category: arithm_div Arithm DivA921 ADDRSHIFTMODR
Fift: ADDRSHIFTMODR
Description:
Category: arithm_div Arithm DivA922 ADDRSHIFTMODC
Fift: ADDRSHIFTMODC
Description:
Category: arithm_div Arithm DivA925 RSHIFTR_VAR
Fift: RSHIFTR
Description:
Category: arithm_div Arithm DivA926 RSHIFTC_VAR
Fift: RSHIFTC
Description:
Category: arithm_div Arithm DivA928 MODPOW2_VAR
Fift: MODPOW2
Description:
Category: arithm_div Arithm DivA929 MODPOW2R_VAR
Fift: MODPOW2R
Description:
Category: arithm_div Arithm DivA92A MODPOW2C_VAR
Fift: MODPOW2C
Description:
Category: arithm_div Arithm DivA92C RSHIFTMOD_VAR
Fift: RSHIFTMOD
Description:
Category: arithm_div Arithm DivA92D RSHIFTMODR_VAR
Fift: RSHIFTMODR
Description:
Category: arithm_div Arithm DivA92E RSHIFTMODC_VAR
Fift: RSHIFTMODC
Description:
Category: arithm_div Arithm DivA930 ADDRSHIFTMOD
Fift: [tt+1] ADDRSHIFT#MOD
Description:
Category: arithm_div Arithm DivA931 ADDRSHIFTRMOD
Fift: [tt+1] ADDRSHIFTR#MOD
Description:
Category: arithm_div Arithm DivA932 ADDRSHIFTCMOD
Fift: [tt+1] ADDRSHIFTC#MOD
Description:
Category: arithm_div Arithm DivA935 RSHIFTR
Fift: [tt+1] RSHIFTR#
Description:
Category: arithm_div Arithm DivA936 RSHIFTC
Fift: [tt+1] RSHIFTC#
Description:
Category: arithm_div Arithm DivA938 MODPOW2
Fift: [tt+1] MODPOW2#
Description:
Category: arithm_div Arithm DivA939 MODPOW2R
Fift: [tt+1] MODPOW2R#
Description:
Category: arithm_div Arithm DivA93A MODPOW2C
Fift: [tt+1] MODPOW2C#
Description:
Category: arithm_div Arithm DivA93C RSHIFTMOD
Fift: [tt+1] RSHIFT#MOD
Description:
Category: arithm_div Arithm DivA93D RSHIFTRMOD
Fift: [tt+1] RSHIFTR#MOD
Description:
Category: arithm_div Arithm DivA93E RSHIFTCMOD
Fift: [tt+1] RSHIFTC#MOD
Description:
Category: arithm_div Arithm DivA980 MULADDDIVMOD
Fift: MULADDDIVMOD
Description:
Category: arithm_div Arithm DivA981 MULADDDIVMODR
Fift: MULADDDIVMODR
Description:
Category: arithm_div Arithm DivA982 MULADDDIVMODC
Fift: MULADDDIVMODC
Description:
Category: arithm_div Arithm DivA984 MULDIV
Fift: MULDIV
Description: q=floor(x*y/z)
Category: arithm_div Arithm DivA985 MULDIVR
Fift: MULDIVR
Description: q'=round(x*y/z)
Category: arithm_div Arithm DivA986 MULDIVC
Fift: MULDIVC
Description: q'=ceil(x*y/z)
Category: arithm_div Arithm DivA988 MULMOD
Fift: MULMOD
Description:
Category: arithm_div Arithm DivA989 MULMODR
Fift: MULMODR
Description:
Category: arithm_div Arithm DivA98A MULMODC
Fift: MULMODC
Description:
Category: arithm_div Arithm DivA98C MULDIVMOD
Fift: MULDIVMOD
Description: q=floor(x*y/z), r=x*y-z*q
Category: arithm_div Arithm DivA98D MULDIVMODR
Fift: MULDIVMODR
Description: q=round(x*y/z), r=x*y-z*q
Category: arithm_div Arithm DivA98E MULDIVMODC
Fift: MULDIVMODC
Description: q=ceil(x*y/z), r=x*y-z*q
Category: arithm_div Arithm DivA9A0 MULADDRSHIFTMOD_VAR
Fift: MULADDRSHIFTMOD
Description:
Category: arithm_div Arithm DivA9A1 MULADDRSHIFTRMOD_VAR
Fift: MULADDRSHIFTRMOD
Description:
Category: arithm_div Arithm DivA9A2 MULADDRSHIFTCMOD_VAR
Fift: MULADDRSHIFTCMOD
Description:
Category: arithm_div Arithm DivA9A4 MULRSHIFT_VAR
Fift: MULRSHIFT
Description: 0 <= z <= 256
Category: arithm_div Arithm DivA9A5 MULRSHIFTR_VAR
Fift: MULRSHIFTR
Description: 0 <= z <= 256
Category: arithm_div Arithm DivA9A6 MULRSHIFTC_VAR
Fift: MULRSHIFTC
Description: 0 <= z <= 256
Category: arithm_div Arithm DivA9A8 MULMODPOW2_VAR
Fift: MULMODPOW2_VAR
Description:
Category: arithm_div Arithm DivA9A9 MULMODPOW2R_VAR
Fift: MULMODPOW2R_VAR
Description:
Category: arithm_div Arithm DivA9AA MULMODPOW2C_VAR
Fift: MULMODPOW2C_VAR
Description:
Category: arithm_div Arithm DivA9AC MULRSHIFTMOD_VAR
Fift: MULRSHIFTMOD_VAR
Description:
Category: arithm_div Arithm DivA9AD MULRSHIFTRMOD_VAR
Fift: MULRSHIFTRMOD_VAR
Description:
Category: arithm_div Arithm DivA9AE MULRSHIFTCMOD_VAR
Fift: MULRSHIFTCMOD_VAR
Description:
Category: arithm_div Arithm DivA9B0 MULADDRSHIFTMOD
Fift: [tt+1] MULADDRSHIFT#MOD
Description:
Category: arithm_div Arithm DivA9B1 MULADDRSHIFTRMOD
Fift: [tt+1] MULADDRSHIFTR#MOD
Description:
Category: arithm_div Arithm DivA9B2 MULADDRSHIFTCMOD
Fift: [tt+1] MULADDRSHIFTC#MOD
Description:
Category: arithm_div Arithm DivA9B4 MULRSHIFT
Fift: [tt+1] MULRSHIFT#
Description:
Category: arithm_div Arithm DivA9B5 MULRSHIFTR
Fift: [tt+1] MULRSHIFTR#
Description:
Category: arithm_div Arithm DivA9B6 MULRSHIFTC
Fift: [tt+1] MULRSHIFTC#
Description:
Category: arithm_div Arithm DivA9B8 MULMODPOW2
Fift: [tt+1] MULMODPOW2#
Description:
Category: arithm_div Arithm DivA9B9 MULMODPOW2R
Fift: [tt+1] MULMODPOW2R#
Description:
Category: arithm_div Arithm DivA9BA MULMODPOW2C
Fift: [tt+1] MULMODPOW2C#
Description:
Category: arithm_div Arithm DivA9BC MULRSHIFTMOD
Fift: MULRSHIFT#MOD
Description:
Category: arithm_div Arithm DivA9BD MULRSHIFTRMOD
Fift: MULRSHIFTR#MOD
Description:
Category: arithm_div Arithm DivA9BE MULRSHIFTCMOD
Fift: MULRSHIFTC#MOD
Description:
Category: arithm_div Arithm DivA9C0 LSHIFTADDDIVMOD_VAR
Fift: LSHIFTADDDIVMOD
Description:
Category: arithm_div Arithm DivA9C1 LSHIFTADDDIVMODR_VAR
Fift: LSHIFTADDDIVMODR
Description:
Category: arithm_div Arithm DivA9C2 LSHIFTADDDIVMODC_VAR
Fift: LSHIFTADDDIVMODC
Description:
Category: arithm_div Arithm DivA9C4 LSHIFTDIV_VAR
Fift: LSHIFTDIV
Description: 0 <= z <= 256
Category: arithm_div Arithm DivA9C5 LSHIFTDIVR_VAR
Fift: LSHIFTDIVR
Description: 0 <= z <= 256
Category: arithm_div Arithm DivA9C6 LSHIFTDIVC_VAR
Fift: LSHIFTDIVC
Description: 0 <= z <= 256
Category: arithm_div Arithm DivA9C8 LSHIFTMOD_VAR
Fift: LSHIFTMOD
Description:
Category: arithm_div Arithm DivA9C9 LSHIFTMODR_VAR
Fift: LSHIFTMODR
Description:
Category: arithm_div Arithm DivA9CA LSHIFTMODC_VAR
Fift: LSHIFTMODC
Description:
Category: arithm_div Arithm DivA9CC LSHIFTDIVMOD_VAR
Fift: LSHIFTDIVMOD
Description:
Category: arithm_div Arithm DivA9CD LSHIFTDIVMODR_VAR
Fift: LSHIFTDIVMODR
Description:
Category: arithm_div Arithm DivA9CE LSHIFTDIVMODC_VAR
Fift: LSHIFTDIVMODC
Description:
Category: arithm_div Arithm DivA9D0 LSHIFTADDDIVMOD
Fift: [tt+1] LSHIFT#ADDDIVMOD
Description:
Category: arithm_div Arithm DivA9D1 LSHIFTADDDIVMODR
Fift: [tt+1] LSHIFT#ADDDIVMODR
Description:
Category: arithm_div Arithm DivA9D2 LSHIFTADDDIVMODC
Fift: [tt+1] LSHIFT#ADDDIVMODC
Description:
Category: arithm_div Arithm DivA9D4 LSHIFTDIV
Fift: [tt+1] LSHIFT#DIV
Description:
Category: arithm_div Arithm DivA9D5 LSHIFTDIVR
Fift: [tt+1] LSHIFT#DIVR
Description:
Category: arithm_div Arithm DivA9D6 LSHIFTDIVC
Fift: [tt+1] LSHIFT#DIVC
Description:
Category: arithm_div Arithm DivA9D8 LSHIFTMOD
Fift: [tt+1] LSHIFT#MOD
Description:
Category: arithm_div Arithm DivA9D9 LSHIFTMODR
Fift: [tt+1] LSHIFT#MODR
Description:
Category: arithm_div Arithm DivA9DA LSHIFTMODC
Fift: [tt+1] LSHIFT#MODC
Description:
Category: arithm_div Arithm DivA9DC LSHIFTDIVMOD
Fift: [tt+1] LSHIFT#DIVMOD
Description:
Category: arithm_div Arithm DivA9DD LSHIFTDIVMODR
Fift: [tt+1] LSHIFT#DIVMODR
Description:
Category: arithm_div Arithm DivA9DE LSHIFTDIVMODC
Fift: [tt+1] LSHIFT#DIVMODC
Description:
Category: arithm_div Arithm DivB600 FITSX
Fift: FITSX
Description: Checks whether x is a c-bit signed integer for 0 <= c <= 1023.
Category: arithm_logical Arithm LogicalB601 UFITSX
Fift: UFITSX
Description: Checks whether x is a c-bit unsigned integer for 0 <= c <= 1023.
Category: arithm_logical Arithm LogicalB602 BITSIZE
Fift: BITSIZE
Description: 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 LogicalB603 UBITSIZE
Fift: UBITSIZE
Description: 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 LogicalB608 MIN
Fift: MIN
Description: Computes the minimum of two integers x and y.
Category: arithm_logical Arithm LogicalB609 MAX
Fift: MAX
Description: Computes the maximum of two integers x and y.
Category: arithm_logical Arithm LogicalB60A MINMAX
Fift: MINMAX
INTSORT2
Description: Sorts two integers. Quiet version of this operation returns two NaNs if any of the arguments are NaNs.
Category: arithm_logical Arithm LogicalB60B ABS
Fift: ABS
Description: Computes the absolute value of an integer x.
Category: arithm_logical Arithm LogicalB7A0 QADD
Fift: QADD
Description:
Category: arithm_quiet Arithm QuietB7A1 QSUB
Fift: QSUB
Description:
Category: arithm_quiet Arithm QuietB7A2 QSUBR
Fift: QSUBR
Description:
Category: arithm_quiet Arithm QuietB7A3 QNEGATE
Fift: QNEGATE
Description:
Category: arithm_quiet Arithm QuietB7A4 QINC
Fift: QINC
Description:
Category: arithm_quiet Arithm QuietB7A5 QDEC
Fift: QDEC
Description:
Category: arithm_quiet Arithm QuietB7A8 QMUL
Fift: QMUL
Description:
Category: arithm_quiet Arithm QuietB7AA QLSHIFT
Fift: [cc+1] QLSHIFT#
Description: 0 <= cc <= 255
Category: arithm_quiet Arithm QuietB7AB QRSHIFT
Fift: [cc+1] QRSHIFT#
Description: 0 <= cc <= 255
Category: arithm_quiet Arithm QuietB7AC QLSHIFT_VAR
Fift: QLSHIFT
Description:
Category: arithm_quiet Arithm QuietB7AD QRSHIFT_VAR
Fift: QRSHIFT
Description:
Category: arithm_quiet Arithm QuietB7AE QPOW2
Fift: QPOW2
Description:
Category: arithm_quiet Arithm QuietB7B0 QAND
Fift: QAND
Description:
Category: arithm_quiet Arithm QuietB7B1 QOR
Fift: QOR
Description:
Category: arithm_quiet Arithm QuietB7B2 QXOR
Fift: QXOR
Description:
Category: arithm_quiet Arithm QuietB7B3 QNOT
Fift: QNOT
Description:
Category: arithm_quiet Arithm QuietB7B4 QFITS
Fift: [cc+1] QFITS
Description: Replaces x with a NaN if x is not a cc+1-bit signed integer, leaves it intact otherwise.
Category: arithm_quiet Arithm QuietB7B5 QUFITS
Fift: [cc+1] QUFITS
Description: Replaces x with a NaN if x is not a cc+1-bit unsigned integer, leaves it intact otherwise.
Category: arithm_quiet Arithm QuietC700 SEMPTY
Fift: SEMPTY
Description: Checks whether a Slice s is empty (i.e., contains no bits of data and no cell references).
Category: compare_other Compare OtherC701 SDEMPTY
Fift: SDEMPTY
Description: Checks whether Slice s has no bits of data.
Category: compare_other Compare OtherC702 SREMPTY
Fift: SREMPTY
Description: Checks whether Slice s has no references.
Category: compare_other Compare OtherC703 SDFIRST
Fift: SDFIRST
Description: Checks whether the first bit of Slice s is a one.
Category: compare_other Compare OtherC704 SDLEXCMP
Fift: SDLEXCMP
Description: Compares the data of s lexicographically with the data of s', returning -1, 0, or 1 depending on the result.
Category: compare_other Compare OtherC705 SDEQ
Fift: SDEQ
Description: Checks whether the data parts of s and s' coincide, equivalent to SDLEXCMP ISZERO.
Category: compare_other Compare OtherC708 SDPFX
Fift: SDPFX
Description: Checks whether s is a prefix of s'.
Category: compare_other Compare OtherC709 SDPFXREV
Fift: SDPFXREV
Description: Checks whether s' is a prefix of s, equivalent to SWAP SDPFX.
Category: compare_other Compare OtherC70A SDPPFX
Fift: SDPPFX
Description: Checks whether s is a proper prefix of s' (i.e., a prefix distinct from s').
Category: compare_other Compare OtherC70B SDPPFXREV
Fift: SDPPFXREV
Description: Checks whether s' is a proper prefix of s.
Category: compare_other Compare OtherC70C SDSFX
Fift: SDSFX
Description: Checks whether s is a suffix of s'.
Category: compare_other Compare OtherC70D SDSFXREV
Fift: SDSFXREV
Description: Checks whether s' is a suffix of s.
Category: compare_other Compare OtherC70E SDPSFX
Fift: SDPSFX
Description: Checks whether s is a proper suffix of s'.
Category: compare_other Compare OtherC70F SDPSFXREV
Fift: SDPSFXREV
Description: Checks whether s' is a proper suffix of s.
Category: compare_other Compare OtherC710 SDCNTLEAD0
Fift: SDCNTLEAD0
Description: Returns the number of leading zeroes in s.
Category: compare_other Compare OtherC711 SDCNTLEAD1
Fift: SDCNTLEAD1
Description: Returns the number of leading ones in s.
Category: compare_other Compare OtherC712 SDCNTTRAIL0
Fift: SDCNTTRAIL0
Description: Returns the number of trailing zeroes in s.
Category: compare_other Compare OtherC713 SDCNTTRAIL1
Fift: SDCNTTRAIL1
Description: Returns the number of trailing ones in s.
Category: compare_other Compare OtherCF00 STIX
Fift: STIX
Description: Stores a signed l-bit integer x into b for 0 <= l <= 257.
Category: cell_build Cell BuildCF01 STUX
Fift: STUX
Description: Stores an unsigned l-bit integer x into b for 0 <= l <= 256.
Category: cell_build Cell BuildCF02 STIXR
Fift: STIXR
Description: Similar to STIX, but with arguments in a different order.
Category: cell_build Cell BuildCF03 STUXR
Fift: STUXR
Description: Similar to STUX, but with arguments in a different order.
Category: cell_build Cell BuildCF04 STIXQ
Fift: STIXQ
Description: 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 BuildCF05 STUXQ
Fift: STUXQ
Description: A quiet version of STUX.
Category: cell_build Cell BuildCF06 STIXRQ
Fift: STIXRQ
Description: A quiet version of STIXR.
Category: cell_build Cell BuildCF07 STUXRQ
Fift: STUXRQ
Description: A quiet version of STUXR.
Category: cell_build Cell BuildCF08 STI_ALT
Fift: [cc+1] STI_l
Description: A longer version of [cc+1] STI.
Category: cell_build Cell BuildCF09 STU_ALT
Fift: [cc+1] STU_l
Description: A longer version of [cc+1] STU.
Category: cell_build Cell BuildCF0A STIR
Fift: [cc+1] STIR
Description: Equivalent to SWAP [cc+1] STI.
Category: cell_build Cell BuildCF0B STUR
Fift: [cc+1] STUR
Description: Equivalent to SWAP [cc+1] STU.
Category: cell_build Cell BuildCF0C STIQ
Fift: [cc+1] STIQ
Description: A quiet version of STI.
Category: cell_build Cell BuildCF0D STUQ
Fift: [cc+1] STUQ
Description: A quiet version of STU.
Category: cell_build Cell BuildCF0E STIRQ
Fift: [cc+1] STIRQ
Description: A quiet version of STIR.
Category: cell_build Cell BuildCF0F STURQ
Fift: [cc+1] STURQ
Description: A quiet version of STUR.
Category: cell_build Cell BuildCF10 STREF_ALT
Fift: STREF_l
Description: A longer version of STREF.
Category: cell_build Cell BuildCF11 STBREF
Fift: STBREF
Description: Equivalent to SWAP STBREFR.
Category: cell_build Cell BuildCF12 STSLICE_ALT
Fift: STSLICE_l
Description: A longer version of STSLICE.
Category: cell_build Cell BuildCF13 STB
Fift: STB
Description: Appends all data from Builder b' to Builder b.
Category: cell_build Cell BuildCF14 STREFR
Fift: STREFR
Description: Equivalent to SWAP STREF.
Category: cell_build Cell BuildCF15 STBREFR_ALT
Fift: STBREFR_l
Description: A longer encoding of STBREFR.
Category: cell_build Cell BuildCF16 STSLICER
Fift: STSLICER
Description: Equivalent to SWAP STSLICE.
Category: cell_build Cell BuildCF17 STBR
Fift: STBR
BCONCAT
Description: Concatenates two builders.
Equivalent to SWAP STB.
Category: cell_build Cell BuildCF18 STREFQ
Fift: STREFQ
Description: Quiet version of STREF.
Category: cell_build Cell BuildCF19 STBREFQ
Fift: STBREFQ
Description: Quiet version of STBREF.
Category: cell_build Cell BuildCF1A STSLICEQ
Fift: STSLICEQ
Description: Quiet version of STSLICE.
Category: cell_build Cell BuildCF1B STBQ
Fift: STBQ
Description: Quiet version of STB.
Category: cell_build Cell BuildCF1C STREFRQ
Fift: STREFRQ
Description: Quiet version of STREFR.
Category: cell_build Cell BuildCF1D STBREFRQ
Fift: STBREFRQ
Description: Quiet version of STBREFR.
Category: cell_build Cell BuildCF1E STSLICERQ
Fift: STSLICERQ
Description: Quiet version of STSLICER.
Category: cell_build Cell BuildCF1F STBRQ
Fift: STBRQ
BCONCATQ
Description: Quiet version of STBR.
Category: cell_build Cell BuildCF20 STREFCONST
Fift: [ref] STREFCONST
Description: Equivalent to PUSHREF STREFR.
Category: cell_build Cell BuildCF21 STREF2CONST
Fift: [ref] [ref] STREF2CONST
Description: Equivalent to STREFCONST STREFCONST.
Category: cell_build Cell BuildCF23 ENDXC
Fift: ENDXC
Description: 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 BuildCF28 STILE4
Fift: STILE4
Description: Stores a little-endian signed 32-bit integer.
Category: cell_build Cell BuildCF29 STULE4
Fift: STULE4
Description: Stores a little-endian unsigned 32-bit integer.
Category: cell_build Cell BuildCF2A STILE8
Fift: STILE8
Description: Stores a little-endian signed 64-bit integer.
Category: cell_build Cell BuildCF2B STULE8
Fift: STULE8
Description: Stores a little-endian unsigned 64-bit integer.
Category: cell_build Cell BuildCF30 BDEPTH
Fift: BDEPTH
Description: 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 BuildCF31 BBITS
Fift: BBITS
Description: Returns the number of data bits already stored in Builder b.
Category: cell_build Cell BuildCF32 BREFS
Fift: BREFS
Description: Returns the number of cell references already stored in b.
Category: cell_build Cell BuildCF33 BBITREFS
Fift: BBITREFS
Description: Returns the numbers of both data bits and cell references in b.
Category: cell_build Cell BuildCF35 BREMBITS
Fift: BREMBITS
Description: Returns the number of data bits that can still be stored in b.
Category: cell_build Cell BuildCF36 BREMREFS
Fift: BREMREFS
Description: Returns the number of references that can still be stored in b.
Category: cell_build Cell BuildCF37 BREMBITREFS
Fift: BREMBITREFS
Description: Returns the numbers of both data bits and references that can still be stored in b.
Category: cell_build Cell BuildCF38 BCHKBITS
Fift: [cc+1] BCHKBITS#
Description: Checks whether cc+1 bits can be stored into b, where 0 <= cc <= 255.
Category: cell_build Cell BuildCF39 BCHKBITS_VAR
Fift: BCHKBITS
Description: 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 BuildCF3A BCHKREFS
Fift: BCHKREFS
Description: Checks whether y references can be stored into b, 0 <= y <= 7.
Category: cell_build Cell BuildCF3B BCHKBITREFS
Fift: BCHKBITREFS
Description: Checks whether x bits and y references can be stored into b, 0 <= x <= 1023, 0 <= y <= 7.
Category: cell_build Cell BuildCF3C BCHKBITSQ
Fift: [cc+1] BCHKBITSQ#
Description: Checks whether cc+1 bits can be stored into b, where 0 <= cc <= 255.
Category: cell_build Cell BuildCF3D BCHKBITSQ_VAR
Fift: BCHKBITSQ
Description: Checks whether x bits can be stored into b, 0 <= x <= 1023.
Category: cell_build Cell BuildCF3E BCHKREFSQ
Fift: BCHKREFSQ
Description: Checks whether y references can be stored into b, 0 <= y <= 7.
Category: cell_build Cell BuildCF3F BCHKBITREFSQ
Fift: BCHKBITREFSQ
Description: Checks whether x bits and y references can be stored into b, 0 <= x <= 1023, 0 <= y <= 7.
Category: cell_build Cell BuildCF40 STZEROES
Fift: STZEROES
Description: Stores n binary zeroes into Builder b.
Category: cell_build Cell BuildCF41 STONES
Fift: STONES
Description: Stores n binary ones into Builder b.
Category: cell_build Cell BuildCF42 STSAME
Fift: STSAME
Description: Stores n binary xes (0 <= x <= 1) into Builder b.
Category: cell_build Cell BuildD700 LDIX
Fift: LDIX
Description: 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 ParseD701 LDUX
Fift: LDUX
Description: Loads an unsigned l-bit integer x from (the first l bits of) s, with 0 <= l <= 256.
Category: cell_parse Cell ParseD702 PLDIX
Fift: PLDIX
Description: Preloads a signed l-bit integer from Slice s, for 0 <= l <= 257.
Category: cell_parse Cell ParseD703 PLDUX
Fift: PLDUX
Description: Preloads an unsigned l-bit integer from s, for 0 <= l <= 256.
Category: cell_parse Cell ParseD704 LDIXQ
Fift: LDIXQ
Description: 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 ParseD705 LDUXQ
Fift: LDUXQ
Description: Quiet version of LDUX.
Category: cell_parse Cell ParseD706 PLDIXQ
Fift: PLDIXQ
Description: Quiet version of PLDIX.
Category: cell_parse Cell ParseD707 PLDUXQ
Fift: PLDUXQ
Description: Quiet version of PLDUX.
Category: cell_parse Cell ParseD708 LDI_ALT
Fift: [cc+1] LDI_l
Description: A longer encoding for LDI.
Category: cell_parse Cell ParseD709 LDU_ALT
Fift: [cc+1] LDU_l
Description: A longer encoding for LDU.
Category: cell_parse Cell ParseD70A PLDI
Fift: [cc+1] PLDI
Description: Preloads a signed cc+1-bit integer from Slice s.
Category: cell_parse Cell ParseD70B PLDU
Fift: [cc+1] PLDU
Description: Preloads an unsigned cc+1-bit integer from s.
Category: cell_parse Cell ParseD70C LDIQ
Fift: [cc+1] LDIQ
Description: A quiet version of LDI.
Category: cell_parse Cell ParseD70D LDUQ
Fift: [cc+1] LDUQ
Description: A quiet version of LDU.
Category: cell_parse Cell ParseD70E PLDIQ
Fift: [cc+1] PLDIQ
Description: A quiet version of PLDI.
Category: cell_parse Cell ParseD70F PLDUQ
Fift: [cc+1] PLDUQ
Description: A quiet version of PLDU.
Category: cell_parse Cell ParseD718 LDSLICEX
Fift: LDSLICEX
Description: 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 ParseD719 PLDSLICEX
Fift: PLDSLICEX
Description: Returns the first 0 <= l <= 1023 bits of s as s''.
Category: cell_parse Cell ParseD71A LDSLICEXQ
Fift: LDSLICEXQ
Description: A quiet version of LDSLICEX.
Category: cell_parse Cell ParseD71B PLDSLICEXQ
Fift: PLDSLICEXQ
Description: A quiet version of LDSLICEXQ.
Category: cell_parse Cell ParseD71C LDSLICE_ALT
Fift: [cc+1] LDSLICE_l
Description: A longer encoding for LDSLICE.
Category: cell_parse Cell ParseD71D PLDSLICE
Fift: [cc+1] PLDSLICE
Description: Returns the first 0 < cc+1 <= 256 bits of s as s''.
Category: cell_parse Cell ParseD71E LDSLICEQ
Fift: [cc+1] LDSLICEQ
Description: A quiet version of LDSLICE.
Category: cell_parse Cell ParseD71F PLDSLICEQ
Fift: [cc+1] PLDSLICEQ
Description: A quiet version of PLDSLICE.
Category: cell_parse Cell ParseD720 SDCUTFIRST
Fift: SDCUTFIRST
Description: Returns the first 0 <= l <= 1023 bits of s. It is equivalent to PLDSLICEX.
Category: cell_parse Cell ParseD721 SDSKIPFIRST
Fift: SDSKIPFIRST
Description: Returns all but the first 0 <= l <= 1023 bits of s. It is equivalent to LDSLICEX NIP.
Category: cell_parse Cell ParseD722 SDCUTLAST
Fift: SDCUTLAST
Description: Returns the last 0 <= l <= 1023 bits of s.
Category: cell_parse Cell ParseD723 SDSKIPLAST
Fift: SDSKIPLAST
Description: Returns all but the last 0 <= l <= 1023 bits of s.
Category: cell_parse Cell ParseD724 SDSUBSTR
Fift: SDSUBSTR
Description: 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 ParseD726 SDBEGINSX
Fift: SDBEGINSX
Description: 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 ParseD727 SDBEGINSXQ
Fift: SDBEGINSXQ
Description: A quiet version of SDBEGINSX.
Category: cell_parse Cell ParseD730 SCUTFIRST
Fift: SCUTFIRST
Description: Returns the first 0 <= l <= 1023 bits and first 0 <= r <= 4 references of s.
Category: cell_parse Cell ParseD731 SSKIPFIRST
Fift: SSKIPFIRST
Description: Returns all but the first l bits of s and r references of s.
Category: cell_parse Cell ParseD732 SCUTLAST
Fift: SCUTLAST
Description: Returns the last 0 <= l <= 1023 data bits and last 0 <= r <= 4 references of s.
Category: cell_parse Cell ParseD733 SSKIPLAST
Fift: SSKIPLAST
Description: Returns all but the last l bits of s and r references of s.
Category: cell_parse Cell ParseD734 SUBSLICE
Fift: SUBSLICE
Description: 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 ParseD736 SPLIT
Fift: SPLIT
Description: 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 ParseD737 SPLITQ
Fift: SPLITQ
Description: A quiet version of SPLIT.
Category: cell_parse Cell ParseD739 XCTOS
Fift: XCTOS
Description: 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 ParseD73A XLOAD
Fift: XLOAD
Description: 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 ParseD73B XLOADQ
Fift: XLOADQ
Description: 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 ParseD741 SCHKBITS
Fift: SCHKBITS
Description: Checks whether there are at least l data bits in Slice s. If this is not the case, throws a cell deserialization (i.e., cell underflow) exception.
Category: cell_parse Cell ParseD742 SCHKREFS
Fift: SCHKREFS
Description: Checks whether there are at least r references in Slice s.
Category: cell_parse Cell ParseD743 SCHKBITREFS
Fift: SCHKBITREFS
Description: Checks whether there are at least l data bits and r references in Slice s.
Category: cell_parse Cell ParseD745 SCHKBITSQ
Fift: SCHKBITSQ
Description: Checks whether there are at least l data bits in Slice s.
Category: cell_parse Cell ParseD746 SCHKREFSQ
Fift: SCHKREFSQ
Description: Checks whether there are at least r references in Slice s.
Category: cell_parse Cell ParseD747 SCHKBITREFSQ
Fift: SCHKBITREFSQ
Description: Checks whether there are at least l data bits and r references in Slice s.
Category: cell_parse Cell ParseD748 PLDREFVAR
Fift: PLDREFVAR
Description: Returns the n-th cell reference of Slice s for 0 <= n <= 3.
Category: cell_parse Cell ParseD749 SBITS
Fift: SBITS
Description: Returns the number of data bits in Slice s.
Category: cell_parse Cell ParseD74A SREFS
Fift: SREFS
Description: Returns the number of references in Slice s.
Category: cell_parse Cell ParseD74B SBITREFS
Fift: SBITREFS
Description: Returns both the number of data bits and the number of references in s.
Category: cell_parse Cell ParseD750 LDILE4
Fift: LDILE4
Description: Loads a little-endian signed 32-bit integer.
Category: cell_parse Cell ParseD751 LDULE4
Fift: LDULE4
Description: Loads a little-endian unsigned 32-bit integer.
Category: cell_parse Cell ParseD752 LDILE8
Fift: LDILE8
Description: Loads a little-endian signed 64-bit integer.
Category: cell_parse Cell ParseD753 LDULE8
Fift: LDULE8
Description: Loads a little-endian unsigned 64-bit integer.
Category: cell_parse Cell ParseD754 PLDILE4
Fift: PLDILE4
Description: Preloads a little-endian signed 32-bit integer.
Category: cell_parse Cell ParseD755 PLDULE4
Fift: PLDULE4
Description: Preloads a little-endian unsigned 32-bit integer.
Category: cell_parse Cell ParseD756 PLDILE8
Fift: PLDILE8
Description: Preloads a little-endian signed 64-bit integer.
Category: cell_parse Cell ParseD757 PLDULE8
Fift: PLDULE8
Description: Preloads a little-endian unsigned 64-bit integer.
Category: cell_parse Cell ParseD758 LDILE4Q
Fift: LDILE4Q
Description: Quietly loads a little-endian signed 32-bit integer.
Category: cell_parse Cell ParseD759 LDULE4Q
Fift: LDULE4Q
Description: Quietly loads a little-endian unsigned 32-bit integer.
Category: cell_parse Cell ParseD75A LDILE8Q
Fift: LDILE8Q
Description: Quietly loads a little-endian signed 64-bit integer.
Category: cell_parse Cell ParseD75B LDULE8Q
Fift: LDULE8Q
Description: Quietly loads a little-endian unsigned 64-bit integer.
Category: cell_parse Cell ParseD75C PLDILE4Q
Fift: PLDILE4Q
Description: Quietly preloads a little-endian signed 32-bit integer.
Category: cell_parse Cell ParseD75D PLDULE4Q
Fift: PLDULE4Q
Description: Quietly preloads a little-endian unsigned 32-bit integer.
Category: cell_parse Cell ParseD75E PLDILE8Q
Fift: PLDILE8Q
Description: Quietly preloads a little-endian signed 64-bit integer.
Category: cell_parse Cell ParseD75F PLDULE8Q
Fift: PLDULE8Q
Description: Quietly preloads a little-endian unsigned 64-bit integer.
Category: cell_parse Cell ParseD760 LDZEROES
Fift: LDZEROES
Description: Returns the count n of leading zero bits in s, and removes these bits from s.
Category: cell_parse Cell ParseD761 LDONES
Fift: LDONES
Description: Returns the count n of leading one bits in s, and removes these bits from s.
Category: cell_parse Cell ParseD762 LDSAME
Fift: LDSAME
Description: Returns the count n of leading bits equal to 0 <= x <= 1 in s, and removes these bits from s.
Category: cell_parse Cell ParseD764 SDEPTH
Fift: SDEPTH
Description: 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 ParseD765 CDEPTH
Fift: CDEPTH
Description: 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 ParseD766 CLEVEL
Fift: CLEVEL
Description: Returns level of the cell.
Category: cell_parse Cell ParseD767 CLEVELMASK
Fift: CLEVELMASK
Description: Returns level mask of the cell.
Category: cell_parse Cell ParseD770 CHASHIX
Fift: CHASHIX
Description: Returns ith hash of the cell.
Category: cell_parse Cell ParseD771 CDEPTHIX
Fift: CDEPTHIX
Description: Returns ith depth of the cell.
Category: cell_parse Cell ParseDB30 RET
Fift: RET
RETTRUE
Description: 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 BasicDB31 RETALT
Fift: RETALT
RETFALSE
Description: Returns to the continuation at c1.
Approximately equivalent to c1 PUSHCTR JMPX.
Category: cont_basic Cont BasicDB32 BRANCH
Fift: BRANCH
RETBOOL
Description: Performs RETTRUE if integer f!=0, or RETFALSE if f=0.
Category: cont_basic Cont BasicDB34 CALLCC
Fift: CALLCC
Description: 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 BasicDB35 JMPXDATA
Fift: JMPXDATA
Description: 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 BasicDB36 CALLCCARGS
Fift: [p] [r] CALLCCARGS
Description: 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 BasicDB38 CALLXVARARGS
Fift: CALLXVARARGS
Description: 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 BasicDB39 RETVARARGS
Fift: RETVARARGS
Description: Similar to RETARGS.
Category: cont_basic Cont BasicDB3A JMPXVARARGS
Fift: JMPXVARARGS
Description: Similar to JMPXARGS.
Category: cont_basic Cont BasicDB3B CALLCCVARARGS
Fift: CALLCCVARARGS
Description: Similar to CALLCCARGS.
Category: cont_basic Cont BasicDB3C CALLREF
Fift: [ref] CALLREF
Description: Equivalent to PUSHREFCONT CALLX.
Category: cont_basic Cont BasicDB3D JMPREF
Fift: [ref] JMPREF
Description: Equivalent to PUSHREFCONT JMPX.
Category: cont_basic Cont BasicDB3E JMPREFDATA
Fift: [ref] JMPREFDATA
Description: Equivalent to PUSHREFCONT JMPXDATA.
Category: cont_basic Cont BasicDB3F RETDATA
Fift: RETDATA
Description: 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 BasicDB50 RUNVMX
Fift: RUNVMX
Description: 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.
Category: cont_basic Cont BasicE300 IFREF
Fift: [ref] IFREF
Description: 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 ConditionalE301 IFNOTREF
Fift: [ref] IFNOTREF
Description: Equivalent to PUSHREFCONT IFNOT.
Category: cont_conditional Cont ConditionalE302 IFJMPREF
Fift: [ref] IFJMPREF
Description: Equivalent to PUSHREFCONT IFJMP.
Category: cont_conditional Cont ConditionalE303 IFNOTJMPREF
Fift: [ref] IFNOTJMPREF
Description: Equivalent to PUSHREFCONT IFNOTJMP.
Category: cont_conditional Cont ConditionalE304 CONDSEL
Fift: CONDSEL
Description: 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 ConditionalE305 CONDSELCHK
Fift: CONDSELCHK
Description: Same as CONDSEL, but first checks whether x and y have the same type.
Category: cont_conditional Cont ConditionalE308 IFRETALT
Fift: IFRETALT
Description: Performs RETALT if integer f!=0.
Category: cont_conditional Cont ConditionalE309 IFNOTRETALT
Fift: IFNOTRETALT
Description: Performs RETALT if integer f=0.
Category: cont_conditional Cont ConditionalE30D IFREFELSE
Fift: [ref] IFREFELSE
Description: 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 ConditionalE30E IFELSEREF
Fift: [ref] IFELSEREF
Description: Equivalent to PUSHREFCONT IFELSE.
Category: cont_conditional Cont ConditionalE30F IFREFELSEREF
Fift: [ref] [ref] IFREFELSEREF
Description: Equivalent to PUSHREFCONT PUSHREFCONT IFELSE.
Category: cont_conditional Cont ConditionalE314 REPEATBRK
Fift: REPEATBRK
Description: 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 LoopsE315 REPEATENDBRK
Fift: REPEATENDBRK
Description: 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 LoopsE316 UNTILBRK
Fift: UNTILBRK
Description: Similar to UNTIL, but also modifies c1 in the same way as REPEATBRK.
Category: cont_loops Cont LoopsE317 UNTILENDBRK
Fift: UNTILENDBRK
UNTILBRK:
Description: Equivalent to SAMEALTSAVE UNTILEND.
Category: cont_loops Cont LoopsE318 WHILEBRK
Fift: WHILEBRK
Description: Similar to WHILE, but also modifies c1 in the same way as REPEATBRK.
Category: cont_loops Cont LoopsE319 WHILEENDBRK
Fift: WHILEENDBRK
Description: Equivalent to SAMEALTSAVE WHILEEND.
Category: cont_loops Cont LoopsE31A AGAINBRK
Fift: AGAINBRK
Description: Similar to AGAIN, but also modifies c1 in the same way as REPEATBRK.
Category: cont_loops Cont LoopsE31B AGAINENDBRK
Fift: AGAINENDBRK
AGAINBRK:
Description: Equivalent to SAMEALTSAVE AGAINEND.
Category: cont_loops Cont LoopsED10 RETURNVARARGS
Fift: RETURNVARARGS
Description: Similar to RETURNARGS, but with Integer 0 <= p <= 255 taken from the stack.
Category: cont_stack Cont StackED11 SETCONTVARARGS
Fift: SETCONTVARARGS
Description: Similar to SETCONTARGS, but with 0 <= r <= 255 and -1 <= n <= 255 taken from the stack.
Category: cont_stack Cont StackED12 SETNUMVARARGS
Fift: SETNUMVARARGS
Description: -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 StackED1E BLESS
Fift: BLESS
Description: Transforms a Slice s into a simple ordinary continuation c, with c.code=s and an empty stack and savelist.
Category: cont_create Cont CreateED1F BLESSVARARGS
Fift: BLESSVARARGS
Description: Equivalent to ROT BLESS ROTREV SETCONTVARARGS.
Category: cont_create Cont CreateEDE0 PUSHCTRX
Fift: PUSHCTRX
Description: 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 RegistersEDE1 POPCTRX
Fift: POPCTRX
Description: Similar to c[i] POPCTR, but with 0 <= i <= 255 from the stack.
Category: cont_registers Cont RegistersEDE2 SETCONTCTRX
Fift: SETCONTCTRX
Description: Similar to c[i] SETCONTCTR, but with 0 <= i <= 255 from the stack.
Category: cont_registers Cont RegistersEDF0 COMPOS
Fift: COMPOS
BOOLAND
Description: 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 RegistersEDF1 COMPOSALT
Fift: COMPOSALT
BOOLOR
Description: 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 RegistersEDF2 COMPOSBOTH
Fift: COMPOSBOTH
Description: 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 RegistersEDF3 ATEXIT
Fift: ATEXIT
Description: Sets c0 to compose0(c, c0). In other words, c will be executed before exiting current subroutine.
Category: cont_registers Cont RegistersEDF4 ATEXITALT
Fift: ATEXITALT
Description: 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 RegistersEDF5 SETEXITALT
Fift: SETEXITALT
Description: 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 RegistersEDF6 THENRET
Fift: THENRET
Description: Computes compose0(c, c0).
Category: cont_registers Cont RegistersEDF7 THENRETALT
Fift: THENRETALT
Description: Computes compose0(c, c1)
Category: cont_registers Cont RegistersEDF8 INVERT
Fift: INVERT
Description: Interchanges c0 and c1.
Category: cont_registers Cont RegistersEDF9 BOOLEVAL
Fift: BOOLEVAL
Description: 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 RegistersEDFA SAMEALT
Fift: SAMEALT
Description: Sets c1 to c0. Equivalent to c0 PUSHCTR c1 POPCTR.
Category: cont_registers Cont RegistersEDFB SAMEALTSAVE
Fift: SAMEALTSAVE
Description: 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 RegistersF2F0 THROWANY
Fift: THROWANY
Description: Throws exception 0 <= n < 2^16 with parameter zero.
Approximately equivalent to ZERO SWAP THROWARGANY.
Category: exceptions ExceptionsF2F1 THROWARGANY
Fift: THROWARGANY
Description: 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 ExceptionsF2F2 THROWANYIF
Fift: THROWANYIF
Description: Throws exception 0 <= n < 2^16 with parameter zero only if f!=0.
Category: exceptions ExceptionsF2F3 THROWARGANYIF
Fift: THROWARGANYIF
Description: Throws exception 0 <= n<2^16 with parameter x only if f!=0.
Category: exceptions ExceptionsF2F4 THROWANYIFNOT
Fift: THROWANYIFNOT
Description: Throws exception 0 <= n<2^16 with parameter zero only if f=0.
Category: exceptions ExceptionsF2F5 THROWARGANYIFNOT
Fift: THROWARGANYIFNOT
Description: Throws exception 0 <= n<2^16 with parameter x only if f=0.
Category: exceptions ExceptionsF2FF TRY
Fift: TRY
Description: 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 ExceptionsF400 STDICT
Fift: STDICT
STOPTREF
Description: 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 SerialF401 SKIPDICT
Fift: SKIPDICT
SKIPOPTREF
Description: Equivalent to LDDICT NIP.
Category: dict_serial Dict SerialF402 LDDICTS
Fift: LDDICTS
Description: 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 SerialF403 PLDDICTS
Fift: PLDDICTS
Description: Preloads a (Slice-represented) dictionary s' from Slice s.
Approximately equivalent to LDDICTS DROP.
Category: dict_serial Dict SerialF404 LDDICT
Fift: LDDICT
LDOPTREF
Description: 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 SerialF405 PLDDICT
Fift: PLDDICT
PLDOPTREF
Description: Preloads a dictionary D from Slice s.
Approximately equivalent to LDDICT DROP.
Category: dict_serial Dict SerialF406 LDDICTQ
Fift: LDDICTQ
Description: A quiet version of LDDICT.
Category: dict_serial Dict SerialF407 PLDDICTQ
Fift: PLDDICTQ
Description: A quiet version of PLDDICT.
Category: dict_serial Dict SerialF40A DICTGET
Fift: DICTGET
Description: 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 GetF40B DICTGETREF
Fift: DICTGETREF
Description: 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 GetF40C DICTIGET
Fift: DICTIGET
Description: 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 GetF40D DICTIGETREF
Fift: DICTIGETREF
Description: 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 GetF40E DICTUGET
Fift: DICTUGET
Description: Similar to DICTIGET, but with unsigned (big-endian) n-bit Integer i used as a key.
Category: dict_get Dict GetF40F DICTUGETREF
Fift: DICTUGETREF
Description: Similar to DICTIGETREF, but with an unsigned n-bit Integer key i.
Category: dict_get Dict GetF412 DICTSET
Fift: DICTSET
Description: 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 SetF413 DICTSETREF
Fift: DICTSETREF
Description: Similar to DICTSET, but with the value set to a reference to Cell c.
Category: dict_set Dict SetF414 DICTISET
Fift: DICTISET
Description: 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 SetF415 DICTISETREF
Fift: DICTISETREF
Description: Similar to DICTSETREF, but with the key a signed n-bit integer as in DICTISET.
Category: dict_set Dict SetF416 DICTUSET
Fift: DICTUSET
Description: Similar to DICTISET, but with i an unsigned n-bit integer.
Category: dict_set Dict SetF417 DICTUSETREF
Fift: DICTUSETREF
Description: Similar to DICTISETREF, but with i unsigned.
Category: dict_set Dict SetF41A DICTSETGET
Fift: DICTSETGET
Description: 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 SetF41B DICTSETGETREF
Fift: DICTSETGETREF
Description: Combines DICTSETREF with DICTGETREF similarly to DICTSETGET.
Category: dict_set Dict SetF41C DICTISETGET
Fift: DICTISETGET
Description: DICTISETGET, but with i a signed n-bit integer.
Category: dict_set Dict SetF41D DICTISETGETREF
Fift: DICTISETGETREF
Description: DICTISETGETREF, but with i a signed n-bit integer.
Category: dict_set Dict SetF41E DICTUSETGET
Fift: DICTUSETGET
Description: DICTISETGET, but with i an unsigned n-bit integer.
Category: dict_set Dict SetF41F DICTUSETGETREF
Fift: DICTUSETGETREF
Description: DICTISETGETREF, but with i an unsigned n-bit integer.
Category: dict_set Dict SetF422 DICTREPLACE
Fift: DICTREPLACE
Description: 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 SetF423 DICTREPLACEREF
Fift: DICTREPLACEREF
Description: A Replace counterpart of DICTSETREF.
Category: dict_set Dict SetF424 DICTIREPLACE
Fift: DICTIREPLACE
Description: DICTREPLACE, but with i a signed n-bit integer.
Category: dict_set Dict SetF425 DICTIREPLACEREF
Fift: DICTIREPLACEREF
Description: DICTREPLACEREF, but with i a signed n-bit integer.
Category: dict_set Dict SetF426 DICTUREPLACE
Fift: DICTUREPLACE
Description: DICTREPLACE, but with i an unsigned n-bit integer.
Category: dict_set Dict SetF427 DICTUREPLACEREF
Fift: DICTUREPLACEREF
Description: DICTREPLACEREF, but with i an unsigned n-bit integer.
Category: dict_set Dict SetF42A DICTREPLACEGET
Fift: DICTREPLACEGET
Description: A Replace counterpart of DICTSETGET: on success, also returns the old value associated with the key in question.
Category: dict_set Dict SetF42B DICTREPLACEGETREF
Fift: DICTREPLACEGETREF
Description: A Replace counterpart of DICTSETGETREF.
Category: dict_set Dict SetF42C DICTIREPLACEGET
Fift: DICTIREPLACEGET
Description: DICTREPLACEGET, but with i a signed n-bit integer.
Category: dict_set Dict SetF42D DICTIREPLACEGETREF
Fift: DICTIREPLACEGETREF
Description: DICTREPLACEGETREF, but with i a signed n-bit integer.
Category: dict_set Dict SetF42E DICTUREPLACEGET
Fift: DICTUREPLACEGET
Description: DICTREPLACEGET, but with i an unsigned n-bit integer.
Category: dict_set Dict SetF42F DICTUREPLACEGETREF
Fift: DICTUREPLACEGETREF
Description: DICTREPLACEGETREF, but with i an unsigned n-bit integer.
Category: dict_set Dict SetF432 DICTADD
Fift: DICTADD
Description: 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 SetF433 DICTADDREF
Fift: DICTADDREF
Description: An Add counterpart of DICTSETREF.
Category: dict_set Dict SetF434 DICTIADD
Fift: DICTIADD
Description: DICTADD, but with i a signed n-bit integer.
Category: dict_set Dict SetF435 DICTIADDREF
Fift: DICTIADDREF
Description: DICTADDREF, but with i a signed n-bit integer.
Category: dict_set Dict SetF436 DICTUADD
Fift: DICTUADD
Description: DICTADD, but with i an unsigned n-bit integer.
Category: dict_set Dict SetF437 DICTUADDREF
Fift: DICTUADDREF
Description: DICTADDREF, but with i an unsigned n-bit integer.
Category: dict_set Dict SetF43A DICTADDGET
Fift: DICTADDGET
Description: 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 SetF43B DICTADDGETREF
Fift: DICTADDGETREF
Description: An Add counterpart of DICTSETGETREF.
Category: dict_set Dict SetF43C DICTIADDGET
Fift: DICTIADDGET
Description: DICTADDGET, but with i a signed n-bit integer.
Category: dict_set Dict SetF43D DICTIADDGETREF
Fift: DICTIADDGETREF
Description: DICTADDGETREF, but with i a signed n-bit integer.
Category: dict_set Dict SetF43E DICTUADDGET
Fift: DICTUADDGET
Description: DICTADDGET, but with i an unsigned n-bit integer.
Category: dict_set Dict SetF43F DICTUADDGETREF
Fift: DICTUADDGETREF
Description: DICTADDGETREF, but with i an unsigned n-bit integer.
Category: dict_set Dict SetF441 DICTSETB
Fift: DICTSETB
Description:
Category: dict_set_builder Dict Set BuilderF442 DICTISETB
Fift: DICTISETB
Description:
Category: dict_set_builder Dict Set BuilderF443 DICTUSETB
Fift: DICTUSETB
Description:
Category: dict_set_builder Dict Set BuilderF445 DICTSETGETB
Fift: DICTSETGETB
Description:
Category: dict_set_builder Dict Set BuilderF446 DICTISETGETB
Fift: DICTISETGETB
Description:
Category: dict_set_builder Dict Set BuilderF447 DICTUSETGETB
Fift: DICTUSETGETB
Description:
Category: dict_set_builder Dict Set BuilderF449 DICTREPLACEB
Fift: DICTREPLACEB
Description:
Category: dict_set_builder Dict Set BuilderF44A DICTIREPLACEB
Fift: DICTIREPLACEB
Description:
Category: dict_set_builder Dict Set BuilderF44B DICTUREPLACEB
Fift: DICTUREPLACEB
Description:
Category: dict_set_builder Dict Set BuilderF44D DICTREPLACEGETB
Fift: DICTREPLACEGETB
Description:
Category: dict_set_builder Dict Set BuilderF44E DICTIREPLACEGETB
Fift: DICTIREPLACEGETB
Description:
Category: dict_set_builder Dict Set BuilderF44F DICTUREPLACEGETB
Fift: DICTUREPLACEGETB
Description:
Category: dict_set_builder Dict Set BuilderF451 DICTADDB
Fift: DICTADDB
Description:
Category: dict_set_builder Dict Set BuilderF452 DICTIADDB
Fift: DICTIADDB
Description:
Category: dict_set_builder Dict Set BuilderF453 DICTUADDB
Fift: DICTUADDB
Description:
Category: dict_set_builder Dict Set BuilderF455 DICTADDGETB
Fift: DICTADDGETB
Description:
Category: dict_set_builder Dict Set BuilderF456 DICTIADDGETB
Fift: DICTIADDGETB
Description:
Category: dict_set_builder Dict Set BuilderF457 DICTUADDGETB
Fift: DICTUADDGETB
Description:
Category: dict_set_builder Dict Set BuilderF459 DICTDEL
Fift: DICTDEL
Description: 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 DeleteF45A DICTIDEL
Fift: DICTIDEL
Description: 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 DeleteF45B DICTUDEL
Fift: DICTUDEL
Description: Similar to DICTIDEL, but with i an unsigned n-bit integer.
Category: dict_delete Dict DeleteF462 DICTDELGET
Fift: DICTDELGET
Description: 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 DeleteF463 DICTDELGETREF
Fift: DICTDELGETREF
Description: 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 DeleteF464 DICTIDELGET
Fift: DICTIDELGET
Description: DICTDELGET, but with i a signed n-bit integer.
Category: dict_delete Dict DeleteF465 DICTIDELGETREF
Fift: DICTIDELGETREF
Description: DICTDELGETREF, but with i a signed n-bit integer.
Category: dict_delete Dict DeleteF466 DICTUDELGET
Fift: DICTUDELGET
Description: DICTDELGET, but with i an unsigned n-bit integer.
Category: dict_delete Dict DeleteF467 DICTUDELGETREF
Fift: DICTUDELGETREF
Description: DICTDELGETREF, but with i an unsigned n-bit integer.
Category: dict_delete Dict DeleteF469 DICTGETOPTREF
Fift: DICTGETOPTREF
Description: 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 MayberefF46A DICTIGETOPTREF
Fift: DICTIGETOPTREF
Description: DICTGETOPTREF, but with i a signed n-bit integer. If the key i is out of range, also returns Null.
Category: dict_mayberef Dict MayberefF46B DICTUGETOPTREF
Fift: DICTUGETOPTREF
Description: DICTGETOPTREF, but with i an unsigned n-bit integer. If the key i is out of range, also returns Null.
Category: dict_mayberef Dict MayberefF46D DICTSETGETOPTREF
Fift: DICTSETGETOPTREF
Description: 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 MayberefF46E DICTISETGETOPTREF
Fift: DICTISETGETOPTREF
Description: 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 MayberefF46F DICTUSETGETOPTREF
Fift: DICTUSETGETOPTREF
Description: Similar to primitive DICTSETGETOPTREF, but using unsigned n-bit Integer i as a key.
Category: dict_mayberef Dict MayberefF470 PFXDICTSET
Fift: PFXDICTSET
Description:
Category: dict_prefix Dict PrefixF471 PFXDICTREPLACE
Fift: PFXDICTREPLACE
Description:
Category: dict_prefix Dict PrefixF472 PFXDICTADD
Fift: PFXDICTADD
Description:
Category: dict_prefix Dict PrefixF473 PFXDICTDEL
Fift: PFXDICTDEL
Description:
Category: dict_prefix Dict PrefixF474 DICTGETNEXT
Fift: DICTGETNEXT
Description: 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 NextF475 DICTGETNEXTEQ
Fift: DICTGETNEXTEQ
Description: Similar to DICTGETNEXT, but computes the minimal key k' that is lexicographically greater than or equal to k.
Category: dict_next Dict NextF476 DICTGETPREV
Fift: DICTGETPREV
Description: Similar to DICTGETNEXT, but computes the maximal key k' lexicographically smaller than k.
Category: dict_next Dict NextF477 DICTGETPREVEQ
Fift: DICTGETPREVEQ
Description: Similar to DICTGETPREV, but computes the maximal key k' lexicographically smaller than or equal to k.
Category: dict_next Dict NextF478 DICTIGETNEXT
Fift: DICTIGETNEXT
Description: 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 NextF479 DICTIGETNEXTEQ
Fift: DICTIGETNEXTEQ
Description: Similar to DICTGETNEXTEQ, but interprets keys as signed n-bit integers.
Category: dict_next Dict NextF47A DICTIGETPREV
Fift: DICTIGETPREV
Description: Similar to DICTGETPREV, but interprets keys as signed n-bit integers.
Category: dict_next Dict NextF47B DICTIGETPREVEQ
Fift: DICTIGETPREVEQ
Description: Similar to DICTGETPREVEQ, but interprets keys as signed n-bit integers.
Category: dict_next Dict NextF47C DICTUGETNEXT
Fift: DICTUGETNEXT
Description: 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 NextF47D DICTUGETNEXTEQ
Fift: DICTUGETNEXTEQ
Description: Similar to DICTGETNEXTEQ, but interprets keys as unsigned n-bit integers.
Category: dict_next Dict NextF47E DICTUGETPREV
Fift: DICTUGETPREV
Description: Similar to DICTGETPREV, but interprets keys as unsigned n-bit integers.
Category: dict_next Dict NextF47F DICTUGETPREVEQ
Fift: DICTUGETPREVEQ
Description: Similar to DICTGETPREVEQ, but interprets keys a unsigned n-bit integers.
Category: dict_next Dict NextF482 DICTMIN
Fift: DICTMIN
Description: 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 MinF483 DICTMINREF
Fift: DICTMINREF
Description: Similar to DICTMIN, but returns the only reference in the value as a Cell c.
Category: dict_min Dict MinF484 DICTIMIN
Fift: DICTIMIN
Description: 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 MinF485 DICTIMINREF
Fift: DICTIMINREF
Description: Similar to DICTIMIN, but returns the only reference in the value.
Category: dict_min Dict MinF486 DICTUMIN
Fift: DICTUMIN
Description: Similar to DICTMIN, but returns the key as an unsigned n-bit Integer i.
Category: dict_min Dict MinF487 DICTUMINREF
Fift: DICTUMINREF
Description: Similar to DICTUMIN, but returns the only reference in the value.
Category: dict_min Dict MinF48A DICTMAX
Fift: DICTMAX
Description: 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 MinF48B DICTMAXREF
Fift: DICTMAXREF
Description: Similar to DICTMAX, but returns the only reference in the value.
Category: dict_min Dict MinF48C DICTIMAX
Fift: DICTIMAX
Description: 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 MinF48D DICTIMAXREF
Fift: DICTIMAXREF
Description: Similar to DICTIMAX, but returns the only reference in the value.
Category: dict_min Dict MinF48E DICTUMAX
Fift: DICTUMAX
Description: Similar to DICTMAX, but returns the key as an unsigned n-bit Integer i.
Category: dict_min Dict MinF48F DICTUMAXREF
Fift: DICTUMAXREF
Description: Similar to DICTUMAX, but returns the only reference in the value.
Category: dict_min Dict MinF492 DICTREMMIN
Fift: DICTREMMIN
Description: 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 MinF493 DICTREMMINREF
Fift: DICTREMMINREF
Description: Similar to DICTREMMIN, but returns the only reference in the value as a Cell c.
Category: dict_min Dict MinF494 DICTIREMMIN
Fift: DICTIREMMIN
Description: 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 MinF495 DICTIREMMINREF
Fift: DICTIREMMINREF
Description: Similar to DICTIREMMIN, but returns the only reference in the value.
Category: dict_min Dict MinF496 DICTUREMMIN
Fift: DICTUREMMIN
Description: Similar to DICTREMMIN, but returns the key as an unsigned n-bit Integer i.
Category: dict_min Dict MinF497 DICTUREMMINREF
Fift: DICTUREMMINREF
Description: Similar to DICTUREMMIN, but returns the only reference in the value.
Category: dict_min Dict MinF49A DICTREMMAX
Fift: DICTREMMAX
Description: 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 MinF49B DICTREMMAXREF
Fift: DICTREMMAXREF
Description: Similar to DICTREMMAX, but returns the only reference in the value as a Cell c.
Category: dict_min Dict MinF49C DICTIREMMAX
Fift: DICTIREMMAX
Description: 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 MinF49D DICTIREMMAXREF
Fift: DICTIREMMAXREF
Description: Similar to DICTIREMMAX, but returns the only reference in the value.
Category: dict_min Dict MinF49E DICTUREMMAX
Fift: DICTUREMMAX
Description: Similar to DICTREMMAX, but returns the key as an unsigned n-bit Integer i.
Category: dict_min Dict MinF49F DICTUREMMAXREF
Fift: DICTUREMMAXREF
Description: Similar to DICTUREMMAX, but returns the only reference in the value.
Category: dict_min Dict MinF4A0 DICTIGETJMP
Fift: DICTIGETJMP
Description: 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 SpecialF4A1 DICTUGETJMP
Fift: DICTUGETJMP
Description: Similar to DICTIGETJMP, but performs DICTUGET instead of DICTIGET.
Category: dict_special Dict SpecialF4A2 DICTIGETEXEC
Fift: DICTIGETEXEC
Description: Similar to DICTIGETJMP, but with EXECUTE instead of JMPX.
Category: dict_special Dict SpecialF4A3 DICTUGETEXEC
Fift: DICTUGETEXEC
Description: Similar to DICTUGETJMP, but with EXECUTE instead of JMPX.
Category: dict_special Dict SpecialF4A8 PFXDICTGETQ
Fift: PFXDICTGETQ
Description: 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 SpecialF4A9 PFXDICTGET
Fift: PFXDICTGET
Description: Similar to PFXDICTGET, but throws a cell deserialization failure exception on failure.
Category: dict_special Dict SpecialF4AA PFXDICTGETJMP
Fift: PFXDICTGETJMP
Description: 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 SpecialF4AB PFXDICTGETEXEC
Fift: PFXDICTGETEXEC
Description: Similar to PFXDICTGETJMP, but EXECutes the continuation found instead of jumping to it. On failure, throws a cell deserialization exception.
Category: dict_special Dict SpecialF4B1 SUBDICTGET
Fift: SUBDICTGET
Description: 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 SubF4B2 SUBDICTIGET
Fift: SUBDICTIGET
Description: Variant of SUBDICTGET with the prefix represented by a signed big-endian l-bit Integer x, where necessarily l <= 257.
Category: dict_sub Dict SubF4B3 SUBDICTUGET
Fift: SUBDICTUGET
Description: Variant of SUBDICTGET with the prefix represented by an unsigned big-endian l-bit Integer x, where necessarily l <= 256.
Category: dict_sub Dict SubF4B5 SUBDICTRPGET
Fift: SUBDICTRPGET
Description: 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 SubF4B6 SUBDICTIRPGET
Fift: SUBDICTIRPGET
Description: Variant of SUBDICTRPGET with the prefix represented by a signed big-endian l-bit Integer x, where necessarily l <= 257.
Category: dict_sub Dict SubF4B7 SUBDICTURPGET
Fift: SUBDICTURPGET
Description: Variant of SUBDICTRPGET with the prefix represented by an unsigned big-endian l-bit Integer x, where necessarily l <= 256.
Category: dict_sub Dict SubF4BC DICTIGETJMPZ
Fift: DICTIGETJMPZ
Description: A variant of DICTIGETJMP that returns index i on failure.
Category: dict_special Dict SpecialF4BD DICTUGETJMPZ
Fift: DICTUGETJMPZ
Description: A variant of DICTUGETJMP that returns index i on failure.
Category: dict_special Dict SpecialF4BE DICTIGETEXECZ
Fift: DICTIGETEXECZ
Description: A variant of DICTIGETEXEC that returns index i on failure.
Category: dict_special Dict SpecialF4BF DICTUGETEXECZ
Fift: DICTUGETEXECZ
Description: A variant of DICTUGETEXEC that returns index i on failure.
Category: dict_special Dict SpecialF800 ACCEPT
Fift: ACCEPT
Description: 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 GasF801 SETGASLIMIT
Fift: SETGASLIMIT
Description: 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 GasF807 GASCONSUMED
Fift: GASCONSUMED
Description: Returns gas consumed by VM so far (including this instruction).
Category: app_gas App GasF80F COMMIT
Fift: COMMIT
Description: 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 GasF810 RANDU256
Fift: RANDU256
Description: 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 RndF811 RAND
Fift: RAND
Description: 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 RndF814 SETRAND
Fift: SETRAND
Description: Sets the random seed to unsigned 256-bit Integer x.
Category: app_rnd App RndF815 ADDRAND
Fift: ADDRAND
RANDOMIZE
Description: 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 RndF830 CONFIGDICT
Fift: CONFIGDICT
Description: Returns the global configuration dictionary along with its key length (32).
Equivalent to CONFIGROOT 32 PUSHINT.
Category: app_config App ConfigF832 CONFIGPARAM
Fift: CONFIGPARAM
Description: 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 ConfigF833 CONFIGOPTPARAM
Fift: CONFIGOPTPARAM
Description: 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 ConfigF835 GLOBALID
Fift: GLOBALID
Description: Retrieves global_id from 19 network config.
Category: app_config App ConfigF836 GETGASFEE
Fift: GETGASFEE
Description: Calculates gas fee
Category: app_config App ConfigF837 GETSTORAGEFEE
Fift: GETSTORAGEFEE
Description: Calculates storage fees (only current StoragePrices entry is used).
Category: app_config App ConfigF838 GETFORWARDFEE
Fift: GETFORWARDFEE
Description: Calculates forward fee.
Category: app_config App ConfigF839 GETPRECOMPILEDGAS
Fift: GETPRECOMPILEDGAS
Description: Returns gas usage for the current contract if it is precompiled, null otherwise.
Category: app_config App ConfigF83A GETORIGINALFWDFEE
Fift: GETORIGINALFWDFEE
Description: Calculate fwd_fee * 2^16 / first_frac. Can be used to get the original fwd_fee of the message.
Category: app_config App ConfigF83B GETGASFEESIMPLE
Fift: GETGASFEESIMPLE
Description: Same as GETGASFEE, but without flat price (just (gas_used * price) / 2^16).
Category: app_config App ConfigF83C GETFORWARDFEESIMPLE
Fift: GETFORWARDFEESIMPLE
Description: Same as GETFORWARDFEE, but without lump price (just (bits*bit_price + cells*cell_price) / 2^16).
Category: app_config App ConfigF840 GETGLOBVAR
Fift: GETGLOBVAR
Description: Returns the k-th global variable for 0 <= k < 255.
Equivalent to c7 PUSHCTR SWAP INDEXVARQ.
Category: app_global App GlobalF860 SETGLOBVAR
Fift: SETGLOBVAR
Description: Assigns x to the k-th global variable for 0 <= k < 255.
Equivalent to c7 PUSHCTR ROTREV SETINDEXVARQ c7 POPCTR.
Category: app_global App GlobalF900 HASHCU
Fift: HASHCU
Description: 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 CryptoF901 HASHSU
Fift: HASHSU
Description: 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 CryptoF902 SHA256U
Fift: SHA256U
Description: 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 CryptoF910 CHKSIGNU
Fift: CHKSIGNU
Description: 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 CryptoF911 CHKSIGNS
Fift: CHKSIGNS
Description: 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 CryptoF912 ECRECOVER
Fift: ECRECOVER
Description: 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 CryptoF914 P256_CHKSIGNU
Fift: P256_CHKSIGNU
Description: 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 CryptoF915 P256_CHKSIGNS
Fift: P256_CHKSIGNS
Description: 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 CryptoF920 RIST255_FROMHASH
Fift: RIST255_FROMHASH
Description: Deterministically generates a valid point x from a 512-bit hash (given as two 256-bit integers).
Category: app_crypto App CryptoF921 RIST255_VALIDATE
Fift: RIST255_VALIDATE
Description: Checks that integer x is a valid representation of some curve point. Throws range_chk on error.
Category: app_crypto App CryptoF922 RIST255_ADD
Fift: RIST255_ADD
Description: Addition of two points on a curve.
Category: app_crypto App CryptoF923 RIST255_SUB
Fift: RIST255_SUB
Description: Subtraction of two points on curve.
Category: app_crypto App CryptoF924 RIST255_MUL
Fift: RIST255_MUL
Description: Multiplies point x by a scalar n. Any n is valid, including negative.
Category: app_crypto App CryptoF925 RIST255_MULBASE
Fift: RIST255_MULBASE
Description: Multiplies the generator point g by a scalar n. Any n is valid, including negative.
Category: app_crypto App CryptoF926 RIST255_PUSHL
Fift: RIST255_PUSHL
Description: Pushes integer l=2^252+27742317777372353535851937790883648493, which is the order of the group.
Category: app_crypto App CryptoF940 CDATASIZEQ
Fift: CDATASIZEQ
Description: 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 MiscF941 CDATASIZE
Fift: CDATASIZE
Description: A non-quiet version of CDATASIZEQ that throws a cell overflow exception (8) on failure.
Category: app_misc App MiscF942 SDATASIZEQ
Fift: SDATASIZEQ
Description: 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 MiscF943 SDATASIZE
Fift: SDATASIZE
Description: A non-quiet version of SDATASIZEQ that throws a cell overflow exception (8) on failure.
Category: app_misc App MiscFA00 LDGRAMS
Fift: LDGRAMS
LDVARUINT16
Description: 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 CurrencyFA01 LDVARINT16
Fift: LDVARINT16
Description: Similar to LDVARUINT16, but loads a signed Integer x.
Approximately equivalent to 4 LDU SWAP 3 LSHIFT# LDIX.
Category: app_currency App CurrencyFA02 STGRAMS
Fift: STGRAMS
STVARUINT16
Description: 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 CurrencyFA03 STVARINT16
Fift: STVARINT16
Description: Similar to STVARUINT16, but serializes a signed Integer x in the range -2^119...2^119-1.
Category: app_currency App CurrencyFA04 LDVARUINT32
Fift: LDVARUINT32
Description: 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 CurrencyFA05 LDVARINT32
Fift: LDVARINT32
Description: Similar to LDVARUINT32, but loads a signed Integer x.
Approximately equivalent to 5 LDU SWAP 3 LSHIFT# LDIX.
Category: app_currency App CurrencyFA06 STVARUINT32
Fift: STVARUINT32
Description: 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 CurrencyFA07 STVARINT32
Fift: STVARINT32
Description: Similar to STVARUINT32, but serializes a signed Integer x in the range -2^247...2^247-1.
Category: app_currency App CurrencyFA40 LDMSGADDR
Fift: LDMSGADDR
Description: 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 AddrFA41 LDMSGADDRQ
Fift: LDMSGADDRQ
Description: A quiet version of LDMSGADDR: on success, pushes an extra -1; on failure, pushes the original s and a zero.
Category: app_addr App AddrFA42 PARSEMSGADDR
Fift: PARSEMSGADDR
Description: 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 AddrFA43 PARSEMSGADDRQ
Fift: PARSEMSGADDRQ
Description: A quiet version of PARSEMSGADDR: returns a zero on error instead of throwing an exception.
Category: app_addr App AddrFA44 REWRITESTDADDR
Fift: REWRITESTDADDR
Description: 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 AddrFA45 REWRITESTDADDRQ
Fift: REWRITESTDADDRQ
Description: A quiet version of primitive REWRITESTDADDR.
Category: app_addr App AddrFA46 REWRITEVARADDR
Fift: REWRITEVARADDR
Description: A variant of REWRITESTDADDR that returns the (rewritten) address as a Slice s, even if it is not exactly 256 bit long (represented by a msg_addr_var).
Category: app_addr App AddrFA47 REWRITEVARADDRQ
Fift: REWRITEVARADDRQ
Description: A quiet version of primitive REWRITEVARADDR.
Category: app_addr App AddrFB00 SENDRAWMSG
Fift: SENDRAWMSG
Description: 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 ActionsFB02 RAWRESERVE
Fift: RAWRESERVE
Description: 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 ActionsFB03 RAWRESERVEX
Fift: RAWRESERVEX
Description: 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 ActionsFB04 SETCODE
Fift: SETCODE
Description: 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 ActionsFB06 SETLIBCODE
Fift: SETLIBCODE
Description: 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 ActionsFB07 CHANGELIB
Fift: CHANGELIB
Description: 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 ActionsFB08 SENDMSG
Fift: SENDMSG
Description: 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 ActionsFFF0 SETCPX
Fift: SETCPX
Description: Selects codepage c with -2^15 <= c < 2^15 passed in the top of the stack.
Category: codepage CodepageB7A900 QADDDIVMOD
Fift: QADDDIVMOD
Description:
Category: arithm_quiet Arithm QuietB7A901 QADDDIVMODR
Fift: QADDDIVMODR
Description:
Category: arithm_quiet Arithm QuietB7A902 QADDDIVMODC
Fift: QADDDIVMODC
Description:
Category: arithm_quiet Arithm QuietB7A904 QDIV
Fift: QDIV
Description: Division returns NaN if y=0.
Category: arithm_quiet Arithm QuietB7A905 QDIVR
Fift: QDIVR
Description:
Category: arithm_quiet Arithm QuietB7A906 QDIVC
Fift: QDIVC
Description:
Category: arithm_quiet Arithm QuietB7A908 QMOD
Fift: QMOD
Description:
Category: arithm_quiet Arithm QuietB7A909 QMODR
Fift: QMODR
Description:
Category: arithm_quiet Arithm QuietB7A90A QMODC
Fift: QMODC
Description:
Category: arithm_quiet Arithm QuietB7A90C QDIVMOD
Fift: QDIVMOD
Description:
Category: arithm_quiet Arithm QuietB7A90D QDIVMODR
Fift: QDIVMODR
Description:
Category: arithm_quiet Arithm QuietB7A90E QDIVMODC
Fift: QDIVMODC
Description:
Category: arithm_quiet Arithm QuietB7A920 QADDRSHIFTMOD
Fift: QADDRSHIFTMOD
Description:
Category: arithm_quiet Arithm QuietB7A921 QADDRSHIFTMODR
Fift: QADDRSHIFTMODR
Description:
Category: arithm_quiet Arithm QuietB7A922 QADDRSHIFTMODC
Fift: QADDRSHIFTMODC
Description:
Category: arithm_quiet Arithm QuietB7A925 QRSHIFTR_VAR
Fift: QRSHIFTR
Description:
Category: arithm_quiet Arithm QuietB7A926 QRSHIFTC_VAR
Fift: QRSHIFTC
Description:
Category: arithm_quiet Arithm QuietB7A928 QMODPOW2_VAR
Fift: QMODPOW2
Description:
Category: arithm_quiet Arithm QuietB7A929 QMODPOW2R_VAR
Fift: QMODPOW2R
Description:
Category: arithm_quiet Arithm QuietB7A92A QMODPOW2C_VAR
Fift: QMODPOW2C
Description:
Category: arithm_quiet Arithm QuietB7A92C QRSHIFTMOD_VAR
Fift: QRSHIFTMOD
Description:
Category: arithm_quiet Arithm QuietB7A92D QRSHIFTMODR_VAR
Fift: QRSHIFTMODR
Description:
Category: arithm_quiet Arithm QuietB7A92E QRSHIFTMODC_VAR
Fift: QRSHIFTMODC
Description:
Category: arithm_quiet Arithm QuietB7A930 QADDRSHIFTMOD
Fift: [tt+1] QADDRSHIFT#MOD
Description:
Category: arithm_quiet Arithm QuietB7A931 QADDRSHIFTRMOD
Fift: [tt+1] QADDRSHIFTR#MOD
Description:
Category: arithm_quiet Arithm QuietB7A932 QADDRSHIFTCMOD
Fift: [tt+1] QADDRSHIFTC#MOD
Description:
Category: arithm_quiet Arithm QuietB7A935 QRSHIFTR
Fift: [tt+1] QRSHIFTR#
Description:
Category: arithm_quiet Arithm QuietB7A936 QRSHIFTC
Fift: [tt+1] QRSHIFTC#
Description:
Category: arithm_quiet Arithm QuietB7A938 QMODPOW2
Fift: [tt+1] QMODPOW2#
Description:
Category: arithm_quiet Arithm QuietB7A939 QMODPOW2R
Fift: [tt+1] QMODPOW2R#
Description:
Category: arithm_quiet Arithm QuietB7A93A QMODPOW2C
Fift: [tt+1] QMODPOW2C#
Description:
Category: arithm_quiet Arithm QuietB7A93C QRSHIFTMOD
Fift: [tt+1] QRSHIFT#MOD
Description:
Category: arithm_quiet Arithm QuietB7A93D QRSHIFTRMOD
Fift: [tt+1] QRSHIFTR#MOD
Description:
Category: arithm_quiet Arithm QuietB7A93E QRSHIFTCMOD
Fift: [tt+1] QRSHIFTC#MOD
Description:
Category: arithm_quiet Arithm QuietB7A980 QMULADDDIVMOD
Fift: QMULADDDIVMOD
Description:
Category: arithm_quiet Arithm QuietB7A981 QMULADDDIVMODR
Fift: QMULADDDIVMODR
Description:
Category: arithm_quiet Arithm QuietB7A982 QMULADDDIVMODC
Fift: QMULADDDIVMODC
Description:
Category: arithm_quiet Arithm QuietB7A984 QMULDIV
Fift: QMULDIV
Description: q=floor(x*y/z)
Category: arithm_quiet Arithm QuietB7A985 QMULDIVR
Fift: QMULDIVR
Description:
Category: arithm_quiet Arithm QuietB7A986 QMULDIVC
Fift: QMULDIVC
Description: q'=ceil(x*y/z)
Category: arithm_quiet Arithm QuietB7A988 QMULMOD
Fift: QMULMOD
Description:
Category: arithm_quiet Arithm QuietB7A989 QMULMODR
Fift: QMULMODR
Description:
Category: arithm_quiet Arithm QuietB7A98A QMULMODC
Fift: QMULMODC
Description:
Category: arithm_quiet Arithm QuietB7A98C QMULDIVMOD
Fift: QMULDIVMOD
Description:
Category: arithm_quiet Arithm QuietB7A98D QMULDIVMODR
Fift: QMULDIVMODR
Description: q=round(x*y/z), r=x*y-z*q
Category: arithm_quiet Arithm QuietB7A98E QMULDIVMODC
Fift: QMULDIVMODC
Description: q=ceil(x*y/z), r=x*y-z*q
Category: arithm_quiet Arithm QuietB7A9A0 QMULADDRSHIFTMOD_VAR
Fift: QMULADDRSHIFTMOD
Description:
Category: arithm_quiet Arithm QuietB7A9A1 QMULADDRSHIFTRMOD_VAR
Fift: QMULADDRSHIFTRMOD
Description:
Category: arithm_quiet Arithm QuietB7A9A2 QMULADDRSHIFTCMOD_VAR
Fift: QMULADDRSHIFTCMOD
Description:
Category: arithm_quiet Arithm QuietB7A9A4 QMULRSHIFT_VAR
Fift: QMULRSHIFT
Description: 0 <= z <= 256
Category: arithm_quiet Arithm QuietB7A9A5 QMULRSHIFTR_VAR
Fift: QMULRSHIFTR
Description: 0 <= z <= 256
Category: arithm_quiet Arithm QuietB7A9A6 QMULRSHIFTC_VAR
Fift: QMULRSHIFTC
Description: 0 <= z <= 256
Category: arithm_quiet Arithm QuietB7A9A8 QMULMODPOW2_VAR
Fift: QMULMODPOW2_VAR
Description:
Category: arithm_quiet Arithm QuietB7A9A9 QMULMODPOW2R_VAR
Fift: QMULMODPOW2R_VAR
Description:
Category: arithm_quiet Arithm QuietB7A9AA QMULMODPOW2C_VAR
Fift: QMULMODPOW2C_VAR
Description:
Category: arithm_quiet Arithm QuietB7A9AC QMULRSHIFTMOD_VAR
Fift: QMULRSHIFTMOD_VAR
Description:
Category: arithm_quiet Arithm QuietB7A9AD QMULRSHIFTRMOD_VAR
Fift: QMULRSHIFTRMOD_VAR
Description:
Category: arithm_quiet Arithm QuietB7A9AE QMULRSHIFTCMOD_VAR
Fift: QMULRSHIFTCMOD_VAR
Description:
Category: arithm_quiet Arithm QuietB7A9B0 QMULADDRSHIFTMOD
Fift: [tt+1] QMULADDRSHIFT#MOD
Description:
Category: arithm_quiet Arithm QuietB7A9B1 QMULADDRSHIFTRMOD
Fift: [tt+1] QMULADDRSHIFTR#MOD
Description:
Category: arithm_quiet Arithm QuietB7A9B2 QMULADDRSHIFTCMOD
Fift: [tt+1] QMULADDRSHIFTC#MOD
Description:
Category: arithm_quiet Arithm QuietB7A9B4 QMULRSHIFT
Fift: [tt+1] QMULRSHIFT#
Description:
Category: arithm_quiet Arithm QuietB7A9B5 QMULRSHIFTR
Fift: [tt+1] QMULRSHIFTR#
Description:
Category: arithm_quiet Arithm QuietB7A9B6 QMULRSHIFTC
Fift: [tt+1] QMULRSHIFTC#
Description:
Category: arithm_quiet Arithm QuietB7A9B8 QMULMODPOW2
Fift: [tt+1] QMULMODPOW2#
Description:
Category: arithm_quiet Arithm QuietB7A9B9 QMULMODPOW2R
Fift: [tt+1] QMULMODPOW2R#
Description:
Category: arithm_quiet Arithm QuietB7A9BA QMULMODPOW2C
Fift: [tt+1] QMULMODPOW2C#
Description:
Category: arithm_quiet Arithm QuietB7A9BC QMULRSHIFTMOD
Fift: QMULRSHIFT#MOD
Description:
Category: arithm_quiet Arithm QuietB7A9BD QMULRSHIFTRMOD
Fift: QMULRSHIFTR#MOD
Description:
Category: arithm_quiet Arithm QuietB7A9BE QMULRSHIFTCMOD
Fift: QMULRSHIFTC#MOD
Description:
Category: arithm_quiet Arithm QuietB7A9C0 QLSHIFTADDDIVMOD_VAR
Fift: QLSHIFTADDDIVMOD
Description:
Category: arithm_quiet Arithm QuietB7A9C1 QLSHIFTADDDIVMODR_VAR
Fift: QLSHIFTADDDIVMODR
Description:
Category: arithm_quiet Arithm QuietB7A9C2 QLSHIFTADDDIVMODC_VAR
Fift: QLSHIFTADDDIVMODC
Description:
Category: arithm_quiet Arithm QuietB7A9C4 QLSHIFTDIV_VAR
Fift: QLSHIFTDIV
Description: 0 <= z <= 256
Category: arithm_quiet Arithm QuietB7A9C5 QLSHIFTDIVR_VAR
Fift: QLSHIFTDIVR
Description: 0 <= z <= 256
Category: arithm_quiet Arithm QuietB7A9C6 QLSHIFTDIVC_VAR
Fift: QLSHIFTDIVC
Description: 0 <= z <= 256
Category: arithm_quiet Arithm QuietB7A9C8 QLSHIFTMOD_VAR
Fift: QLSHIFTMOD
Description:
Category: arithm_quiet Arithm QuietB7A9C9 QLSHIFTMODR_VAR
Fift: QLSHIFTMODR
Description:
Category: arithm_quiet Arithm QuietB7A9CA QLSHIFTMODC_VAR
Fift: QLSHIFTMODC
Description:
Category: arithm_quiet Arithm QuietB7A9CC QLSHIFTDIVMOD_VAR
Fift: QLSHIFTDIVMOD
Description:
Category: arithm_quiet Arithm QuietB7A9CD QLSHIFTDIVMODR_VAR
Fift: QLSHIFTDIVMODR
Description:
Category: arithm_quiet Arithm QuietB7A9CE QLSHIFTDIVMODC_VAR
Fift: QLSHIFTDIVMODC
Description:
Category: arithm_quiet Arithm QuietB7A9D0 QLSHIFTADDDIVMOD
Fift: [tt+1] QLSHIFT#ADDDIVMOD
Description:
Category: arithm_quiet Arithm QuietB7A9D1 QLSHIFTADDDIVMODR
Fift: [tt+1] QLSHIFT#ADDDIVMODR
Description:
Category: arithm_quiet Arithm QuietB7A9D2 QLSHIFTADDDIVMODC
Fift: [tt+1] QLSHIFT#ADDDIVMODC
Description:
Category: arithm_quiet Arithm QuietB7A9D4 QLSHIFTDIV
Fift: [tt+1] QLSHIFT#DIV
Description:
Category: arithm_quiet Arithm QuietB7A9D5 QLSHIFTDIVR
Fift: [tt+1] QLSHIFT#DIVR
Description:
Category: arithm_quiet Arithm QuietB7A9D6 QLSHIFTDIVC
Fift: [tt+1] QLSHIFT#DIVC
Description:
Category: arithm_quiet Arithm QuietB7A9D8 QLSHIFTMOD
Fift: [tt+1] QLSHIFT#MOD
Description:
Category: arithm_quiet Arithm QuietB7A9D9 QLSHIFTMODR
Fift: [tt+1] QLSHIFT#MODR
Description:
Category: arithm_quiet Arithm QuietB7A9DA QLSHIFTMODC
Fift: [tt+1] QLSHIFT#MODC
Description:
Category: arithm_quiet Arithm QuietB7A9DC QLSHIFTDIVMOD
Fift: [tt+1] QLSHIFT#DIVMOD
Description:
Category: arithm_quiet Arithm QuietB7A9DD QLSHIFTDIVMODR
Fift: [tt+1] QLSHIFT#DIVMODR
Description:
Category: arithm_quiet Arithm QuietB7A9DE QLSHIFTDIVMODC
Fift: [tt+1] QLSHIFT#DIVMODC
Description:
Category: arithm_quiet Arithm QuietB7B600 QFITSX
Fift: QFITSX
Description: Replaces x with a NaN if x is not a c-bit signed integer, leaves it intact otherwise.
Category: arithm_quiet Arithm QuietB7B601 QUFITSX
Fift: QUFITSX
Description: Replaces x with a NaN if x is not a c-bit unsigned integer, leaves it intact otherwise.
Category: arithm_quiet Arithm QuietB7F921 RIST255_QVALIDATE
Fift: RIST255_QVALIDATE
Description: Checks that integer x is a valid representation of some curve point. Returns -1 on success and 0 on failure.
Category: app_crypto App CryptoB7F922 RIST255_QADD
Fift: RIST255_QADD
Description: Addition of two points on a curve. Returns -1 on success and 0 on failure.
Category: app_crypto App CryptoB7F923 RIST255_QSUB
Fift: RIST255_QSUB
Description: Subtraction of two points on curve. Returns -1 on success and 0 on failure.
Category: app_crypto App CryptoB7F924 RIST255_QMUL
Fift: RIST255_QMUL
Description: 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 CryptoB7F925 RIST255_QMULBASE
Fift: RIST255_QMULBASE
Description: Multiplies the generator point g by a scalar n. Any n is valid, including negative.
Category: app_crypto App CryptoF83400 PREVMCBLOCKS
Fift: PREVMCBLOCKS
Description: Retrives last_mc_blocks part of PrevBlocksInfo from c7 (parameter 13).
Category: app_config App ConfigF83401 PREVKEYBLOCK
Fift: PREVKEYBLOCK
Description: Retrives prev_key_block part of PrevBlocksInfo from c7 (parameter 13).
Category: app_config App ConfigF90400 HASHEXT_SHA256
Fift: HASHEXT_SHA256
Description: Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: app_crypto App CryptoF90401 HASHEXT_SHA512
Fift: HASHEXT_SHA512
Description: Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: app_crypto App CryptoF90402 HASHEXT_BLAKE2B
Fift: HASHEXT_BLAKE2B
Description: Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: app_crypto App CryptoF90403 HASHEXT_KECCAK256
Fift: HASHEXT_KECCAK256
Description: Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: app_crypto App CryptoF90404 HASHEXT_KECCAK512
Fift: HASHEXT_KECCAK512
Description: Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: app_crypto App CryptoF90500 HASHEXTR_SHA256
Fift: HASHEXTR_SHA256
Description: Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: app_crypto App CryptoF90501 HASHEXTR_SHA512
Fift: HASHEXTR_SHA512
Description: Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: app_crypto App CryptoF90502 HASHEXTR_BLAKE2B
Fift: HASHEXTR_BLAKE2B
Description: Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: app_crypto App CryptoF90503 HASHEXTR_KECCAK256
Fift: HASHEXTR_KECCAK256
Description: Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: app_crypto App CryptoF90504 HASHEXTR_KECCAK512
Fift: HASHEXTR_KECCAK512
Description: Calculates and returns hash of the concatenation of slices (or builders) s_1...s_n.
Category: app_crypto App CryptoF90600 HASHEXTA_SHA256
Fift: HASHEXTA_SHA256
Description: 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 CryptoF90601 HASHEXTA_SHA512
Fift: HASHEXTA_SHA512
Description: 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 CryptoF90602 HASHEXTA_BLAKE2B
Fift: HASHEXTA_BLAKE2B
Description: 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 CryptoF90603 HASHEXTA_KECCAK256
Fift: HASHEXTA_KECCAK256
Description: 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 CryptoF90604 HASHEXTA_KECCAK512
Fift: HASHEXTA_KECCAK512
Description: 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 CryptoF90700 HASHEXTAR_SHA256
Fift: HASHEXTAR_SHA256
Description: 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 CryptoF90701 HASHEXTAR_SHA512
Fift: HASHEXTAR_SHA512
Description: 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 CryptoF90702 HASHEXTAR_BLAKE2B
Fift: HASHEXTAR_BLAKE2B
Description: 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 CryptoF90703 HASHEXTAR_KECCAK256
Fift: HASHEXTAR_KECCAK256
Description: 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 CryptoF90704 HASHEXTAR_KECCAK512
Fift: HASHEXTAR_KECCAK512
Description: 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 CryptoF93000 BLS_VERIFY
Fift: BLS_VERIFY
Description: Checks BLS signature, return true on success, false otherwise.
Category: app_crypto App CryptoF93001 BLS_AGGREGATE
Fift: BLS_AGGREGATE
Description: Aggregates signatures. n>0. Throw exception if n=0 or if some sig_i is not a valid signature.
Category: app_crypto App CryptoF93002 BLS_FASTAGGREGATEVERIFY
Fift: BLS_FASTAGGREGATEVERIFY
Description: 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 CryptoF93003 BLS_AGGREGATEVERIFY
Fift: BLS_AGGREGATEVERIFY
Description: 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 CryptoF93010 BLS_G1_ADD
Fift: BLS_G1_ADD
Description: Addition on G1.
Category: app_crypto App CryptoF93011 BLS_G1_SUB
Fift: BLS_G1_SUB
Description: Subtraction on G1.
Category: app_crypto App CryptoF93012 BLS_G1_NEG
Fift: BLS_G1_NEG
Description: Negation on G1.
Category: app_crypto App CryptoF93013 BLS_G1_MUL
Fift: BLS_G1_MUL
Description: Multiplies G1 point x by scalar s. Any s is valid, including negative.
Category: app_crypto App CryptoF93014 BLS_G1_MULTIEXP
Fift: BLS_G1_MULTIEXP
Description: 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 CryptoF93015 BLS_G1_ZERO
Fift: BLS_G1_ZERO
Description: Pushes zero point in G1.
Category: app_crypto App CryptoF93016 BLS_MAP_TO_G1
Fift: BLS_MAP_TO_G1
Description: Converts FP element f to a G1 point.
Category: app_crypto App CryptoF93017 BLS_G1_INGROUP
Fift: BLS_G1_INGROUP
Description: Checks that slice x represents a valid element of G1.
Category: app_crypto App CryptoF93018 BLS_G1_ISZERO
Fift: BLS_G1_ISZERO
Description: Checks that G1 point x is equal to zero.
Category: app_crypto App CryptoF93020 BLS_G2_ADD
Fift: BLS_G2_ADD
Description: Addition on G2.
Category: app_crypto App CryptoF93021 BLS_G2_SUB
Fift: BLS_G2_SUB
Description: Subtraction on G2.
Category: app_crypto App CryptoF93022 BLS_G2_NEG
Fift: BLS_G2_NEG
Description: Negation on G2.
Category: app_crypto App CryptoF93023 BLS_G2_MUL
Fift: BLS_G2_MUL
Description: Multiplies G2 point x by scalar s. Any s is valid, including negative.
Category: app_crypto App CryptoF93024 BLS_G2_MULTIEXP
Fift: BLS_G2_MULTIEXP
Description: 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 CryptoF93025 BLS_G2_ZERO
Fift: BLS_G2_ZERO
Description: Pushes zero point in G2.
Category: app_crypto App CryptoF93026 BLS_MAP_TO_G2
Fift: BLS_MAP_TO_G2
Description: Converts FP2 element f to a G2 point.
Category: app_crypto App CryptoF93027 BLS_G2_INGROUP
Fift: BLS_G2_INGROUP
Description: Checks that slice x represents a valid element of G2.
Category: app_crypto App CryptoF93028 BLS_G2_ISZERO
Fift: BLS_G2_ISZERO
Description: Checks that G2 point x is equal to zero.
Category: app_crypto App CryptoF93030 BLS_PAIRING
Fift: BLS_PAIRING
Description: 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 CryptoF93031 BLS_PUSHR
Fift: BLS_PUSHR
Description: Pushes the order of G1 and G2 (approx. 2^255).
Category: app_crypto App CryptoF12_ CALLDICT_LONG
Fift: [n] CALL
[n] CALLDICT
Description: For 0 <= n < 2^14, an encoding of [n] CALL for larger values of n.
Category: cont_dict Cont DictD76E_ CDEPTHI
Fift: [i] CDEPTHI
Description: Returns ith depth of the cell.
Category: cell_parse Cell ParseD76A_ CHASHI
Fift: [i] CHASHI
Description: Returns ith hash of the cell.
Category: cell_parse Cell ParseF4A6_ DICTPUSHCONST
Fift: [ref] [n] DICTPUSHCONST
Description: 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 SpecialF85_ GETGLOB
Fift: [k] GETGLOB
Description: Returns the k-th global variable for 1 <= k <= 31.
Equivalent to c7 PUSHCTR [k] INDEXQ.
Category: app_global App GlobalE39_ IFBITJMP
Fift: [n] IFBITJMP
Description: 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 ConditionalE3D_ IFBITJMPREF
Fift: [ref] [n] IFBITJMPREF
Description: Performs a JMPREF if bit 0 <= n <= 31 is set in integer x.
Category: cont_conditional Cont ConditionalE3B_ IFNBITJMP
Fift: [n] IFNBITJMP
Description: Jumps to c if bit 0 <= n <= 31 is not set in integer x.
Category: cont_conditional Cont ConditionalE3F_ IFNBITJMPREF
Fift: [ref] [n] IFNBITJMPREF
Description: Performs a JMPREF if bit 0 <= n <= 31 is not set in integer x.
Category: cont_conditional Cont Conditional6FE_ INDEX3
Fift: [i] [j] [k] INDEX3
Description: Recovers x=t_{i+1}_{j+1}_{k+1}.
0 <= i,j,k <= 3
Equivalent to [i] [j] INDEX2 [k] INDEX.
Category: tuple Tuple
Alias: CADDR Recovers x=t_2_2_1.
Alias: CDDDR Recovers x=t_2_2_2.F16_ JMPDICT
Fift: [n] JMP
Description: 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 DictF4AE_ PFXDICTCONSTGETJMP
Fift: [ref] [n] PFXDICTCONSTGETJMP
[ref] [n] PFXDICTSWITCH
Description: Combines [n] DICTPUSHCONST for 0 <= n <= 1023 with PFXDICTGETJMP.
Category: dict_special Dict SpecialD74E_ PLDREFIDX
Fift: [n] PLDREFIDX
Description: Returns the n-th cell reference of Slice s, where 0 <= n <= 3.
Category: cell_parse Cell Parse
Alias: PLDREF Preloads the first cell reference of a Slice.D714_ PLDUZ
Fift: [32(c+1)] PLDUZ
Description: 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 ParseF1A_ PREPAREDICT
Fift: [n] PREPARE
[n] PREPAREDICT
Description: 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 Dict8F_ PUSHCONT
Fift: [builder] PUSHCONT
[builder] CONT
Description: 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 DataD72A_ SDBEGINS
Fift: [slice] SDBEGINS
Description: 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 ParseD72E_ SDBEGINSQ
Fift: [slice] SDBEGINSQ
Description: A quiet version of SDBEGINS.
Category: cell_parse Cell ParseF87_ SETGLOB
Fift: [k] SETGLOB
Description: 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 GlobalCFC0_ STSLICECONST
Fift: [slice] STSLICECONST
Description: 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
Alias: STZERO Stores one binary zero.
Alias: STONE Stores one binary one.F2C4_ THROW
Fift: [n] THROW
Description: For 0 <= n < 2^11, an encoding of [n] THROW for larger values of n.
Category: exceptions ExceptionsF2CC_ THROWARG
Fift: [n] THROWARG
Description: 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 ExceptionsF2DC_ THROWARGIF
Fift: [n] THROWARGIF
Description: Throws exception 0 <= nn < 2^11 with parameter x only if integer f!=0.
Category: exceptions ExceptionsF2EC_ THROWARGIFNOT
Fift: [n] THROWARGIFNOT
Description: Throws exception 0 <= n < 2^11 with parameter x only if integer f=0.
Category: exceptions ExceptionsF2D4_ THROWIF
Fift: [n] THROWIF
Description: For 0 <= n < 2^11, an encoding of [n] THROWIF for larger values of n.
Category: exceptions ExceptionsF2E4_ THROWIFNOT
Fift: [n] THROWIFNOT
Description: For 0 <= n < 2^11, an encoding of [n] THROWIFNOT for larger values of n.
Category: exceptions ExceptionsF2A_ THROWIFNOT_SHORT
Fift: [n] THROWIFNOT
Description: Throws exception 0 <= n <= 63 with parameter zero only if integer f=0.
Category: exceptions ExceptionsF26_ THROWIF_SHORT
Fift: [n] THROWIF
Description: Throws exception 0 <= n <= 63 with parameter zero only if integer f!=0.
Category: exceptions ExceptionsF22_ THROW_SHORT
Fift: [n] THROW
Description: 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