Difference between revisions of "Jump"
Line 1: | Line 1: | ||
[[Category:CP1610]] | [[Category:CP1610]] | ||
− | Jump is a three-decle opcode that is represented as one of several different possible mnemonics, depending on the flags indicated in the second | + | Jump is a three-decle opcode that is represented as one of several different possible mnemonics, depending on the flags indicated in the second decle of the opcode. The opcode breaks down as follows. |
Format - Decle #1 Format - Decle #2 Format - Decle #3 | Format - Decle #1 Format - Decle #2 Format - Decle #3 | ||
Line 20: | Line 20: | ||
aaaaaaaaaaaaaaaa indicates the address to where the [[CP1610]] should Jump | aaaaaaaaaaaaaaaa indicates the address to where the [[CP1610]] should Jump | ||
− | This opcode is often represented as many different mnemonics, to make life a little easier for the programmer. The mnemonic used depends on the combination of the rr and ff parameters mentioned above, according to the following chart.<br/> | + | This opcode is often represented as many different mnemonics, to make life a little easier for the programmer. The mnemonic used depends on the combination of the rr and ff parameters mentioned above, according to the following chart.<br/><br/> |
<table border> | <table border> | ||
Line 27: | Line 27: | ||
<tr><td>ff == 01</td><td>JSRE R4, $aaaa</td><td>JSRE R5, $aaaa</td><td>JSRE R6, $aaaa</td><td>JE $aaaa</td></tr> | <tr><td>ff == 01</td><td>JSRE R4, $aaaa</td><td>JSRE R5, $aaaa</td><td>JSRE R6, $aaaa</td><td>JE $aaaa</td></tr> | ||
<tr><td>ff == 10</td><td>JSRD R4, $aaaa</td><td>JSRD R5, $aaaa</td><td>JSRD R6, $aaaa</td><td>JD $aaaa</td></tr> | <tr><td>ff == 10</td><td>JSRD R4, $aaaa</td><td>JSRD R5, $aaaa</td><td>JSRD R6, $aaaa</td><td>JD $aaaa</td></tr> | ||
− | <tr><td>ff == 11</td><td align=center colspan=4> | + | <tr><td>ff == 11</td><td align=center colspan=4>unknown opcodes</td></tr> |
</table> | </table> |
Revision as of 16:37, 11 January 2005
Jump is a three-decle opcode that is represented as one of several different possible mnemonics, depending on the flags indicated in the second decle of the opcode. The opcode breaks down as follows.
Format - Decle #1 Format - Decle #2 Format - Decle #3 0000:0000:0000:0100 0000:00rr:aaaa:aaff 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 a Jump without return
ff indicates how to affect the Interrupt (I) flag in the CP1610 such that: ff == 00 indicates not to affect the Interrupt flag ff == 01 indicates to set the Interrupt flag ff == 10 indicates to clear the Interrupt flag ff == 11 unknown opcode (behavior unknown!!)
aaaaaaaaaaaaaaaa indicates the address to where the CP1610 should Jump
This opcode is often represented as many different mnemonics, to make life a little easier for the programmer. The mnemonic used depends on the combination of the rr and ff parameters mentioned above, according to the following chart.
rr == 00 | rr == 01 | rr == 10 | rr == 11 | |
ff == 00 | JSR R4, $aaaa | JSR R5, $aaaa | JSR R6, $aaaa | J $aaaa |
ff == 01 | JSRE R4, $aaaa | JSRE R5, $aaaa | JSRE R6, $aaaa | JE $aaaa |
ff == 10 | JSRD R4, $aaaa | JSRD R5, $aaaa | JSRD R6, $aaaa | JD $aaaa |
ff == 11 | unknown opcodes |