1
Mega Tokyo SCI Archive / Sq5, hoc, etc pic resources
« on: April 24, 2004, 05:31:33 AM »
can anyone direct me to where I might be able to get a program to view the pictures from these games?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Else and Goto Statements
Code 0xFE is a bit unusual in that it can act as a goto statement, but is also used in conjunction with the if statement to act as an else statement. The operation that AGI performs when it encounters the 0xFE value is to read the next two bytes as an offset, then jump to that new position. This is why this code is referred to as the goto statement.
When used in conjunction with an if statement, this code acts as an else statement. To create an if ... else construct, the programmer includes a goto statement at the end of the commands to be evaluated if the condition is true. The offset value of this goto statement is the length of commands that are executed if the condition is false (i.e., the else block). An example illustrates this concept best:Code: [Select]FF 07 E7 FF if(isset(f231))
This is functionally equivalent to:
05 00 {
65 0F print("The door is already open.");
FE 11 00 goto END
}
0C 24 set(f36);
77 prevent.input();
3B 05 start.update(o5);
03 98 03 assignn(v152, 3);
4C 05 98 cycle.time(o5, v152);
49 05 E8 end.of.loop(o5, f232);
63 46 9A sound(70, f154);
END:Code: [Select]
FF 07 E7 FF if(isset(f231))
05 00 {
65 0F print("The door is already open.");
}
FE else
11 00 {
0C 24 set(f36);
77 prevent.input();
3B 05 start.update(o5);
03 98 03 assignn(v152, 3);
4C 05 98 cycle.time(o5, v152);
49 05 E8 end.of.loop(o5, f232);
63 46 9A sound(70, f154);
END: }
if (isset(f233))
{
print("You are already fishing.");
goto(Label2);
}
ff 07 e9 ff if (isset(f233)
05 00 (block is 5 bytes long)
65 7e print message 126 ("You are already fishing.")
fe 5d 07 else/goto 1885 bytes (blocksize/offset)
SMF 2.0.19 |
SMF © 2021, Simple Machines
Simple Audio Video Embedder
Page created in 0.049 seconds with 20 queries.