The control flow assumes different behavior, at least two.
In the main function, the case instruction for time-slice (voic.c line 74) some times is reached, some times not.
I’ve looking for a program bug and have rewrited this logic many times in different ways, sorry but is possible there are a program bug that I can’t see.
Compiler version is
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.6.3 #4543 (Dec 31 2006) (MINGW32)
With Bug #1683515 fixed by program code (FSR saving).