2 ms·
heh this reminds me of when I did some runtime patching in my own hobby OS kernel. I used it specifically for interrupt routines so that I didn't have to repeat
by earlz 11y ago
heh this reminds me of when I did some runtime patching in my own hobby OS kernel. I used it specifically for interrupt routines so that I didn't have to repeat this monstrosity header and footer for every interrupt handler.
Also, another thing begging for runtime modification is the `int` instruction (used to create an interrupt). There is literally no way to choose a random number of an interrupt to call. You're only option for that is to either do runtime modification to construct the 2 byte opcode on the fly (with the second byte being which interrupt to call), or to make a big table like `int 1; ret; int 2; ret; int 3; ret` and call into that manually. It is quite infuriating