3 ms·
If you don't know anything about the environment the code runs in, you can't rely on what action the undefined opcode handler will take either. (same for any ot
by rep_lodsb 21d ago
If you don't know anything about the environment the code runs in, you can't rely on what action the undefined opcode handler will take either. (same for any other exception)
Some operating systems used them for syscalls.
- fsckboy 21d ago1. you can use the opcode, it's guaranteed. if it does something else, that's not on you. 2. you might know everything about the environments and that's how you know that different environments use different interrupt tables, but you want a code snippet that will not rely on that, so you use this guaranteed opcode.
- rep_lodsb 19d agoUsually, you do know something about the environment that your code runs in. But in the case that you don't, causing an exception (whether "undefined opcode" or anything else) can't be guaranteed to terminate the process, because some operating systems actually did use it for other purposes. The assembly language equivalent of nasal demons :) https://devblogs.microsoft.com/oldnewthing/20041215-00/?p=37003 https://devblogs.microsoft.com/oldnewthing/20041215-00/?p=37...