title: Why would I want to use the TRAP instruction?
body: <p>I study the trap instruction but to me it makes as little sense and lookssimilar to <code>throws exception</code> in Java or likewse, is it similar or what does it do? It just says that the <code>TRAP</code> instruction always generates an exception, why would I want to do that? There is not enough info for me to understand why and where I would want to use <code>TRAP</code>.</p>
  
  <p><img src="https://i.stack.imgur.com/THz4j.png" alt="enter image description here"></p>