Vassili Skarine

how to fix "format error" due to improper stack frame?

Discussion created by Vassili Skarine on Jul 4, 2007
Latest reply on Jul 4, 2007 by Paul McConkey
I need the timer to interrupt currently running subroutine and switch it to another. I change the SR and PC before I call RTE in the stack. In the manual it is says that before RTE is called the stack should look like :
SR  <- 4bytes
PC <-- 4bytes
but when I test it the stack pointer is misaligned by 8 bytes and it gives me error "fromat error"
Could anyone please help and tell me how RTE works and what I need to change to get my program to work properly?
Thank you very much.