Jump anywhere: Difference between revisions

m
Line 130:
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>.
 
1,489

edits