Is threre an opcode which disables and enables the On button in a normal basic program?
There's a program called onblock on ticalc.org that will help you with that.
Additionally, if you're interested in these kind of assembly libraries, we have a compilation of links to a few of them here.
Opcode… do you mean assembly?
I'm pretty sure Assembly would be able to disable the button, although be careful. If you stick the calculator in a perma-loop with the button disabled, you'll have to clear your RAM and all your programs that are opened in-order to recover the calculator.