Register Modifiers¶
In the previous chapters we already saw instructions that modified the XCVM registers. This chapter contains more instructions that change the XCVM registers. We will discuss the following instructions:
SetErrorHandlerSetAppendixHandlerClearErrorClearTransactStatusSetTopicClearTopic
SetErrorHandler¶
SetErrorHandler(Xcm<Call>)
The SetErrorHandler instructions is used to set the Error Handler Register. As discussed in the
XCVM chapter, the Error Handler is executed when an error is thrown
during the regular instruction execution.
SetAppendix¶
SetAppendix(Xcm<Call>)
The SetAppendix instruction is used to set the Appendix Register. As discussed in the
XCVM chapter, the Appendix instructions are executed after the regular
and error handler instruction are executed. These instructions are executed regardless of whether an
error occurred.
ClearError¶
ClearError
The ClearError instruction clears the Error Register by setting it to None.
ClearTransactStatus¶
ClearTransactStatus
The ClearTransactStatus instruction sets the Transact Status Register to its default, cleared,
value.
SetTopic¶
SetTopic([u8; 32])
The SetTopic instruction sets the Topic Register.
ClearTopic¶
ClearTopic
The ClearTopic instruction clears the Topic Register.