I want to do something similar to
if ((current-array_size)<0) first_sample=0; else first_sample = current-array_size;
But it is inefficient (even with optimization) and doesn't work with unsigned variables.
However I know that the check and zeroing can be done very easily at the end before storing the registers to the RAM with a single negative status register check and a few load immediates in the asm generated from a simple
first_sample = current-array_size
line. However it looks to me like going through the lss file and changing things after every compile then compiling the asm seems a pain. Any simple, and efficient, way of doing the above?