https://github.com/platformio/platform-sifive/blob/168f42be5fd87b6333e0e13cb358e27610485a74/examples/native-blink_asm/src/setLED.S#L32 To just set the bit specified, you should use `or`, not `xor`. Using xor will unset the bit if it was set.