Open main menu

Difference between revisions of "SCUMM/V5 opcodes"

3 bytes added ,  12:10, 26 March 2009
m
Line 1,089: Line 1,089:
===Operation===
===Operation===
  for (i = 0; i < number; i++) {
  for (i = 0; i < number; i++) {
&#42;result + i := values[i];
  &#42;result + i := values[i];
}
}


This sets a number of variables to the given parameters. The starting variable is given as "result", and the number of variables to modify is given as "number". This is followed by the same number of values, which will be put into the variable locations. The values are constants, and can be either 16-bit, if the highest bit of the opcode is set, i.e. $A6; or 8-bit, if the highest bit of the opcode is not set, i.e. $26. Note that all values are affected by the opcode's high bit; you can't mix 8 and 16-bit values.
This sets a number of variables to the given parameters. The starting variable is given as "result", and the number of variables to modify is given as "number". This is followed by the same number of values, which will be put into the variable locations. The values are constants, and can be either 16-bit, if the highest bit of the opcode is set, i.e. $A6; or 8-bit, if the highest bit of the opcode is not set, i.e. $26. Note that all values are affected by the opcode's high bit; you can't mix 8 and 16-bit values.
125

edits