Jump anywhere: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) |
Puppydrum64 (talk | contribs) |
||
Line 129: | Line 129: | ||
This is all very complicated, and luckily if you're programming for the 16-bit 65816 you don't have to do this. The 65816 (which was used in the Super Nintendo) has a special command just for doing this. <code>JSR ($####,x)</code> can be used for selecting from a list of functions to call. |
This is all very complicated, and luckily if you're programming for the 16-bit 65816 you don't have to do this. The 65816 (which was used in the Super Nintendo) has a special command just for doing this. <code>JSR ($####,x)</code> can be used for selecting from a list of functions to call. |
||
==Long Jump== |
|||
This is only available on the 65816 thanks to its extended 24-bit address space. A standard <code>JMP</code> on the 65816 is confined to <code>$nn0000-$nnFFFF</code>. To break free of this limitation, you'll need to use <code>JML $xxxxxx</code> to go to a different bank. <code>JSL $xxxxxx</code> can call a subroutine in a different bank, and you'll need to use <code>RTL</code> to safely return from a <code>JSL</code>. |
|||
=={{header|68000 Assembly}}== |
=={{header|68000 Assembly}}== |