Code: Select all
cop_handler:
; temporary testing
sei ; disable interrupts
sep #$20 ; force 8-bit accumulator
lda #'$' ; debug character
jsr print_char_serial ; output to serial
jsr print_char_lcd
...
.org $FFE0
; ;65C816 Interrupt Vectors
; ;Status bit E = 0 (Native mode, 16 bit mode)
.word badVec ; $FFE0 - IRQRVD4(816)
.word badVec ; $FFE2 - IRQRVD5(816)
.word cop_handler ; $FFE4 - COP(816)http://sbc.bcstechnology.net/65c816interrupts.html also lists PBR being set to zero, but it also states that COP is being misused if for an operating system service call -- which is what I'm trying to do.
Should this work? If yes, why is it a bad idea to use COP for operating system service calls? Is it due to the stack mess?
Thanks!
Rich