Difference between revisions of "JSRD"

From Intellivision Wiki
Jump to: navigation, search
Line 7: Line 7:
 
<tr><td>Opcode Range</td><td>$0004</td></tr>
 
<tr><td>Opcode Range</td><td>$0004</td></tr>
 
</table><br/>
 
</table><br/>
The Jump to Subroutine and Disable Interrupts opcode (JSRE) is a three-decle opcode that is a part of the [[Jump]] family of opcodes.  The Jump to Subroutine and Disable Interrupts causes the [[CP1610]] to clear the [[Interrupt Enable Flag]], store the return address in the register specified, and then unconditionally jump to the address specified in the following parameters.<br/>
+
The Jump to Subroutine and Disable Interrupts opcode (JSRD) is a three-decle opcode that is a part of the [[Jump]] family of opcodes.  The Jump to Subroutine and Disable Interrupts causes the [[CP1610]] to clear the [[Interrupt Enable Flag]], store the return address in the register specified, and then unconditionally jump to the address specified in the following parameters.<br/>
  
 
     Format - Decle #1    Format - Decle #2    Format - Decle #3
 
     Format - Decle #1    Format - Decle #2    Format - Decle #3

Revision as of 23:26, 2 June 2005

Instruction NameJump to Subroutine and Disable Interrupts
MnemonicsJSRD
CP1610 Clock Cycles12
InterruptibleYes
Opcode Range$0004

The Jump to Subroutine and Disable Interrupts opcode (JSRD) is a three-decle opcode that is a part of the Jump family of opcodes. The Jump to Subroutine and Disable Interrupts causes the CP1610 to clear the Interrupt Enable Flag, store the return address in the register specified, and then unconditionally jump to the address specified in the following parameters.

   Format - Decle #1     Format - Decle #2     Format - Decle #3
   0000:0000:0000:0100  0000:00rr:aaaa:aa10  0000:00aa:aaaa:aaaa
where:
rr indicates the register into which to store the return address such that: rr == 00 indicates to store return address in register R4 rr == 01 indicates register R5 rr == 10 indicates register R6 rr == 11 indicates that the CP1610 should not store the return address, signaling an Unconditional Jump rather than a Jump to Subrouting (JSR)
aaaaaaaaaaaaaaaa indicates the address to where the CP1610 should Jump

Note that if the address stored in the specified register is the address that is exactly 3 addresses after the start of the Jump opcode, so that the subroutine will return to the next opcode immediately following Jump opcode.

See the Jump opcode family documentation for more information.