@mel_zoomy
Yes they must be written and/or assembled and/or compiled a certain way.
Since you are coding C... which compiler are you using?
Technically a pure program must place ALL global variables in allocated memory or on the stack. For example local variables go on the stack in C so they are 100% pure. But normal variables just go into regular memory and that is impure. But if you do an AllocMem() and store the vars in that memory then that is pure.
PURE means that the code can be executed multiple times simultaneously.