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 (Call Chaining: Having One Function Return for Another)
m (Simple Call/Return)
Line 382: Line 382:
<BR/>
<BR/>
Each of the [[JSR]] instructions take two arguments:  A register and a label (or address).  The CPU puts the <I>return address</I> in the specified register and then jumps to the specified label.  The return address is the address of the word following the [[JSR]] instruction.  The <CODE>CALL label</CODE> instruction is a pseudonym for <CODE>JSR R5, label</CODE>.
Each of the [[JSR]] instructions take two arguments:  A register and a label (or address).  The CPU puts the <I>return address</I> in the specified register and then jumps to the specified label.  The return address is the address of the word following the [[JSR]] instruction.  The <CODE>CALL label</CODE> instruction is a pseudonym for <CODE>JSR R5, label</CODE>.
 +
 +
== Simple Call/Return ==
== Simple Call/Return ==
Line 424: Line 426:
The <CODE>[[PSHR]] R5</CODE> instruction saves the return address on the stack.  The <CODE>[[PULR]] PC</CODE> pops the top item off the stack, and puts it in the program counter.  (Note that PC is just a synonym for R7.)
The <CODE>[[PSHR]] R5</CODE> instruction saves the return address on the stack.  The <CODE>[[PULR]] PC</CODE> pops the top item off the stack, and puts it in the program counter.  (Note that PC is just a synonym for R7.)
-
 
-
 
== Nested Call/Return ==
== Nested Call/Return ==

Revision as of 00:26, 7 November 2007

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox