great minds think alike. I looked at the ASM for just that and it didn't seem to go wrong, but when you posted, I double checked it to be sure, nd realised that I forgot to add the 1 to the case. That's exactly what happened. SDCC creates temporary variables to handle functions, called r0x00, r0x01, etc. in this case up to r0x37, and where it flips back to the first one, is where it goes awry (mclock.asm line 2686). Just for comparison, the vX uses 37 of these variables too.... but that's for 5 files. The most in any file is 12, the least two. SDCC really made unclean code of that switch statement. LMAO you'll be right about that I swear... Although timing is almost surely going to become an issue I think. But the split-switch should work...