How to implement bareback interrupts?

All aspects of programming on the Commander X16.
tim1724
Posts: 14
Joined: Thu Jun 22, 2023 5:50 pm

Re: How to implement bareback interrupts?

Post by tim1724 »

mgkaiser wrote: Wed Mar 26, 2025 1:12 pm Will the interrupt not trigger on a 65816 while in native mode?
Interrupts can occur in either native 65C816 mode or in 6502 emulation mode. There are separate interrupt vectors for each mode. Looking at the CX16 KERNAL source code, the native mode interrupt handlers just switch to emulation mode and then jump to the emulation mode interrupt handlers.

This is also mentioned in Appendix F of the documentation:
The Commander X16 operates mostly in emulation mode, so native mode interrupts on the X16 will switch to emulation mode, then simply call the 8-bit interrupt handlers.
mgkaiser
Posts: 72
Joined: Sat Dec 02, 2023 6:49 pm

Re: How to implement bareback interrupts?

Post by mgkaiser »

Thanks. I did ultimately figure that out. I'm trying to do pre-emptive multitasking on the 65816, targeted to the X16GS. I've decided to completely replace the ROM with a minimal ROM kernal and load the rest of the OS in RAM. I'm thinking sort of like the Apple II GS, where "Apple II" Mode runs in emulation, mostly out of ROM and the GUI loads into RAM and is a completely separate OS.
Post Reply