Talk:RTS Trick: Difference between revisions
From NESdev Wiki
Jump to navigationJump to search
(Created page with 'is there an advantage over using JMP ($0200), where $0200 has been loaded from the same kind of jump-table? that's what I wonder, but I'm not gonna count up the cpu cycles neede...') |
MetalSlime (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
is there an advantage over using JMP ($0200), where $0200 has been loaded from the same kind of jump-table? that's what I wonder, but I'm not gonna count up the cpu cycles needed for either method right now. | is there an advantage over using JMP ($0200), where $0200 has been loaded from the same kind of jump-table? that's what I wonder, but I'm not gonna count up the cpu cycles needed for either method right now. | ||
[[User:MetalSlime|MetalSlime]]: Not sure. Seems like a pick'em to me. Here are some things that come to mind: | |||
* RTS Trick doesn't require any RAM. | |||
* I personally think the RTS Trick is more readable. If I see a table of pointers in my (or somebody else's) code and they all have a "-1" after them, I immediately know their purpose and how they are used. | |||
* PHA, PHA, RTS requires less bytes than STA, STA, JMP (3 vs. 9). |
Revision as of 07:08, 26 June 2009
is there an advantage over using JMP ($0200), where $0200 has been loaded from the same kind of jump-table? that's what I wonder, but I'm not gonna count up the cpu cycles needed for either method right now.
MetalSlime: Not sure. Seems like a pick'em to me. Here are some things that come to mind:
- RTS Trick doesn't require any RAM.
- I personally think the RTS Trick is more readable. If I see a table of pointers in my (or somebody else's) code and they all have a "-1" after them, I immediately know their purpose and how they are used.
- PHA, PHA, RTS requires less bytes than STA, STA, JMP (3 vs. 9).