Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 722

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 722

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 700

Warning: Invalid argument supplied for foreach() in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 701

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 705

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 700

Warning: Invalid argument supplied for foreach() in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 701

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 705

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 700

Warning: Invalid argument supplied for foreach() in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 701

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 705

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 700

Warning: Invalid argument supplied for foreach() in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 701

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 705

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 722

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 722

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 722

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 722

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 722
Introducing the Instruction Set Part 3 - Intellivision Wiki

Introducing the Instruction Set Part 3


Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/content/30/6867330/html/intellivision/wiki/includes/MagicWord.php on line 722
From Intellivision Wiki

Jump to: navigation, search
m (Nested Call/Return)
m (Jump Vectors)
Line 582: Line 582:
<BR/><BR/>
<BR/><BR/>
These sorts of branches are useful for many things.  You can implement multi-way branches similar to C's <CODE>switch</CODE>/<CODE>case</CODE> construct (or BASIC's <CODE>ON .. GOTO</CODE>), or call-backs and so on.  The following sections explore some of these uses.
These sorts of branches are useful for many things.  You can implement multi-way branches similar to C's <CODE>switch</CODE>/<CODE>case</CODE> construct (or BASIC's <CODE>ON .. GOTO</CODE>), or call-backs and so on.  The following sections explore some of these uses.
 +
 +
== Jump Vectors ==
== Jump Vectors ==
Line 609: Line 611:
[http://spacepatrol.info Space Patrol] uses a variation on this technique to manage the "bad guys."  Instead of storing the address of the "thinker" associated with each bad guy, it instead stores a small integer index saying which thinker to call.  A separate table expands that small integer into an actual thinker address.  That blends the jump-vector idea with the next topic, jump tables.
[http://spacepatrol.info Space Patrol] uses a variation on this technique to manage the "bad guys."  Instead of storing the address of the "thinker" associated with each bad guy, it instead stores a small integer index saying which thinker to call.  A separate table expands that small integer into an actual thinker address.  That blends the jump-vector idea with the next topic, jump tables.
-
 
-
 
== Simple Jump Tables ==
== Simple Jump Tables ==

Revision as of 00:27, 7 November 2007

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox