Hello, There is an issue related to context switches that I do not understand. I have written the most simple interrupt handler: void foo() interrupt 0x20 using f_regs { } The generated assembly code was as follows: ; FUNCTION foo (BEGIN RMASK = @0x4000) ; SOURCE LINE # 11 0000 F6F00000 R MOV f_regs,R0 0004 C60800C0 R SCXT CP,#f_regs 0008 CC00 NOP ; SOURCE LINE # 13 000A FC08 POP CP 000C FB88 RETI ; FUNCTION foo (END RMASK = @0x4000) The bank switch seems to ignore the CPU registers that are not part of a register bank (MDL, PSW and so forth). What is happening here? Why is this a valid context switch? Kind regards, Tamir Michael
"the bank switch could have been optimized out as well, since there is no code in the function" Ah that old chestnut - Beware the Trivial Test-Case! ;-)