Skip to main content
TVM registers hold special values, such as contract storage, list of output actions, or exception handler Only c4 (new state) and c5 (final actions) represent durable effects of a successful on‑chain run. Everything else is transient.

c0 — return continuation

Type: Continuation Initial value: Quit — extraordinary continuation which terminates TVM with exit code 0. When RET is called or the current continuation remains no instructions (implicit ret), c0 is invoked. Call-like instructions use it to store the current continuation in order to return to it after executing the inner function.

c1 — alternative return continuation

Type: Continuation Initial value: Quit — extraordinary continuation which terminates TVM with exit code 1. Both exit codes 0 and 1 are considered successful terminations of TVM. Same as c0, but invoked only in special control flow instructions, such as RETALT, IFRETALT, and others.

c2 — exception handler

Type: Continuation Initial value: ExcQuit — extraordinary continuation which terminates TVM with an exception. In this case, the exit code is an exception number. Invoked implicitly on any exception that occurs during TVM execution. Can be invoked explicitly by THROW-like instructions. To set a custom exception handler, use TRY.

c3 — function selector

Type: Continuation Initial value: Root cell of code currently executing in TVM. Invoked by CALLDICT instruction with a function id (integer) passed on the stack. The function selector should jump to a function with that ID. Fift-ASM assembler constructs following function selector (Asm.fif:1624):
Fift

c4 — persistent account storage

Type: Cell Initial value: Root cell of account data. This register helps to store some information between smart contract invocations. When the transaction succeeds, the final value of c4 is saved as new account data.

c5 — outbound actions accumulator

Type: Cell Initial value: Empty cell. List of actions to perform in the action phase after TVM execution: send a message, reserve funds, update code, and install libraries. c5 has an OutList structure:
TLB
The previous action is always the first reference of the next one. If action itself has a reference, it is stored as the second reference in the list. At the beginning of the list, an empty cell is stored as the first reference of the first action.

c7 — environment information and global variables

Type: Tuple Initial value: Tuple[Tuple[0x076ef1ea, 0, 0, ...]]. The zero element of the c7 tuple is an environment information (which itself is also a tuple). The remaining 255 slots are used for global variables. [i] SETGLOB modifies c7, inserting an element with index i, [i] GETGLOB reads i-th element from c7.

Structure of environment information tuple