1,079
edits
m (fine-tuning) |
|||
Line 99: | Line 99: | ||
{| border="1" cellpadding="2" width=10% | {| border="1" cellpadding="2" width=10% | ||
|- | |- | ||
|7||6 0 | |7||6 ... 0 | ||
|- style="background:silver" | |- style="background:silver" | ||
|p1||$5A | |p1||$5A | ||
Line 107: | Line 107: | ||
If the ''p1'' bit is set, then the parameter is evaluated as a pointer and dereferenced. Otherwise it is treated as a constant. If multiple parameters are present, the bits work down from the MSB to the LSB. | If the ''p1'' bit is set, then the parameter is evaluated as a pointer and dereferenced. Otherwise it is treated as a constant. If multiple parameters are present, the bits work down from the MSB to the LSB. | ||
However, many instructions are exceptions to this rule. For example, instructions such as '''actorSet''' that take an auxiliary opcode will put it somewhere in the instruction stream; '''actorSet''' puts it after the first parameter, and then the other parameters vary according to the particular operation. '''jumpRelative''' puts the jump target immediately after the opcode encoded as a constant. Some opcodes (such as '''drawBox''') take too many parameters and have a supplementary opcode byte to contain the extra parameter bits. You have been warned. | However, many instructions are exceptions to this rule. For example, instructions such as '''actorSet''' that take an auxiliary opcode will put it somewhere in the instruction stream; '''actorSet''' puts it after the first parameter, and then the other parameters vary according to the particular operation. '''jumpRelative''' puts the jump target immediately after the opcode encoded as a constant. Some opcodes (such as '''drawBox''') take too many parameters and have a supplementary opcode byte to contain the extra parameter bits. You have been warned. | ||
== Version 6 instruction encoding == | == Version 6 instruction encoding == |
edits