[Scummvm-devel] Decompiler survey: Jump opcodes

Torbjörn Andersson eriktorbjorn at telia.com
Wed Jun 16 08:13:45 CEST 2010


On 2010-06-12 14:47, Michael Madsen wrote:

> If the argument to your jump opcodes is anything other than an absolute
 > address, or an address relative to the PC, I would like to hear about
 > that as well.

I think that all jump instructions in Broken Sword 2 are to relative 
addresses. Usually, the relative address is part of the jump opcode 
itself, be it "skip on true", "skip on false", "skip always" or a 
switch. There is a "skip to whatever the previous opcode function 
returned" mechanism (which is still a relative jump), and a "remember 
this point in the script, because we'll resume from here later" 
mechanism (usually for pausing the script briefly, but apparently it can 
also be used for subroutines) that's used all the time.

But I think that's pretty much it.

Torbjörn Andersson




More information about the Scummvm-devel mailing list