There are multiple basic opcodes that take up 1 byte (00-FA) and the bigger 2-byte opcodes starting with a prefix byte from the FB-FF range that are used less frequently. Here are some examples of the most common p-code instructions that are generally seen when exploring VB disassembly:
- Data storage and movement:
- LitStr/LitVarStr: Initializes a string
- LitI2/LitI4/...: Pushes an integer value to the stack (often used to pass arguments)
- FMemLdI2/FMemLdRf/...: Loads values of a particular type (memory)
- Ary1StI2/Ary1StI4/...: Puts values of a particular type into an array
- Ary1LdI2/Ary1LdI4/...: Loads values of a particular type from an array
- FStI2/FStI4/...: Puts a variable value into the stack
- FLdI2/FLdI4/...: Loads a value into a variable from the stack
- FFreeStr: Frees a string
- ConcatStr: Concatenates a string
- NewIfNullPr: Allocates space if null
- Arithmetic operations:
- AddI2/AddI4/...: Adding operation
- SubI2/SubI4/...: Subtraction operation
- MulI2/MulI4/....