>>80
Examples of such usages:
1) Writing some code hook library. This means you have to assemble some call's/jump's at specific places, as well as possibly disassemble some code which was replaced by the jump/call and reassemble it someplace else.
2) Adding a new VOP(a sort of instruction which will get translated to native code) to a compiler for efficienty purposes. For example you want to make a compiler use some specific FPU instructions for floating point calculations, or maybe you want to add support for MMX/SSE/...
3) Calling an interrupt directly or writing an interrupt handler. Such code can arise both on user-mode and in kernel-mode(driver).
4) Writing a custom boot loader.
Most of the time I have to do this is when I'm interoperating with proprietary code which I don't have the source code to, but it can be needed even outside of such situations.