Posted By
 SukkoPera on 2025-06-23 16:16:07
| Re: Vectored kernal routines
The reason is portability: If they need to fix a bug in a routine, or add functionality in a following version, they might need to move stuff around, and if your code jumps directly to the function, it will stop working. If instead you jump to the vector, they will just put the new address there and your code will still work perfectly.
And while today it is rather unlikely that a new ROM version will come out, the added level of indirection also helps with porting the code among different platforms: for instance, $FFD2 works the same on VIC20, C64, +4 and (I guess) C128. If you write clever code, it can run everywhere (to some extent, of course!).
BTW, no need to look at the disassembly, the original sources are available.
1 |