A friend sent me that code and alleges that it could damage the processor. Is that true?
void damage_processor() {
while (true) {
// Assembly code th
Sorry, the code doesn't run on an ARM processor.
In many processors, instructions that set the status word or affect the processor are restricted to "supervisor" mode. Good operating systems run User code in a "protected" mode that does not have the same capabilities as "supervisor" mode. Executing privileged instructions on modern processors in User mode generates exceptions.
You and your friend could always look up the instructions in an assembly language reference manual and verify the operation.