In start167.a66 file, I find following assembler instruction:
MOV STKOV,#(_BOS+6*2) ; INITIALIZE STACK OVFL REGISTER
Why the 6*2?
I could understand 4*2 because of automatic push/pop of PSW, CSP and IP (when interrupting) and one extra because of non-inclusive aspect.
Can anyone give explanation or reference to a manual?
Thanks, Bjorn
As an answer to my own post:
You need to reserve space for 2 interrupt routines being the stack overflow interrupt routing and the NMI interrupt routine. The NMI interrupt routine is the only interrupt routine that can interrupt the stack overflow interrupt routine.
Details found in C167CR user manual.
PS: This assumes that no system stack is used (no calls made) in stack overflow and NMI interrupt implementation.
Regards, Bjorn