Opcodes · función · habilitado
OP_DEFINE (0x89)
Guarda el cuerpo de una función (bytecode) en la tabla de funciones bajo un identificador de 0–7 bytes. Las funciones son inmutables: redefinir un identificador falla. Este byte era OP_RESERVED1 antes de mayo de 2026.
Verificado
- Pila: entrada → salida
- body id → ∅
- Costo
- Base instruction cost 100 plus the byte length of the function body. Defined functions share the 1,000 memory-slot limit with stack and altstack items.
- Estado en Bitcoin
- No existe en Bitcoin (BTC)0x89 is OP_RESERVED1 in BTC; an OP_SUCCESS code in Tapscript.
Ejemplo
<OP_DUP OP_MUL> OP_0 OP_DEFINE OP_3 OP_0 OP_INVOKE OP_9 OP_EQUAL Recórrelo opcode por opcode en Bitauth IDE, el depurador de la VM de BCH en el navegador.