Let’s talk kernel API.
On the 6502, normally your kernel is just a bunch of library routines and an interrupt handler. You access it by the JSR instruction. That’s not really practical on the 65816, though, because of the program and data bank registers and movable stack and direct pages.
So what you want is an interrupt based API. 16 bit CP/M, DOS, and Linux on x86 use software interrupts to trigger kernel functions. The specifics differ, of course.