4 ms·
It's just an ugly ass syscall extension mechanism (so it has no direct equivalent in Linux lets say), it definitely looks bizarre in modern times. Int 2F is in
by epcoa 2y ago
It's just an ugly ass syscall extension mechanism (so it has no direct equivalent in Linux lets say), it definitely looks bizarre in modern times.
Int 2F is initially handled by DOS as a stub, but additional programs (like drivers and TSRs) can override INT 2F, put their bucket of functionality and then fallback to whatever the previous installed handler was (called chaining) for whatever they don't handle.
This gives a glimpse into how much various crap could end up installed as an Int 2F handler:
https://www.minuszerodegrees.net/websitecopies/Linux.old/docs/interrupts/int-html/int-2f-1.htm https://www.minuszerodegrees.net/websitecopies/Linux.old/doc...
It was often used for feature/presence checks and usually nothing time critical as that chaining setup was most definitely not timing friendly.
- skissane 2y ago> This gives a glimpse into how much various crap could end up installed as an Int 2F handler: Lot's of crap in INT 21 too: https://fd.lod.bz/rbil/zint/index_21.html https://fd.lod.bz/rbil/zint/index_21.html (on the whole I like this HTMLified version of Ralf Brown's Interrupt List better) But I suppose they invented INT 2F to discourage people from doing that to INT 21. And then Ralf Brown also proposed an alternative multiplex interrupt, INT 2D: https://fd.lod.bz/rbil/interrup/tsr/2d.html#4258 https://fd.lod.bz/rbil/interrup/tsr/2d.html#4258
- astrobe_ 2y agoINT 21 was for DOS what INT 80 was for Linux: the gateway to the OS kernel. Overriding software interrupt handlers was a common mechanism, applied to BIOS interrupts as well (e.g. there was a BIOS timer interrupt that was there just for that). The idea was that programs would take over the interrupt vector then chain-call the previous handlers. One can still see something similar at play in certain scenarios with e.g. callbacks. The system/library doesn't have to maintain a list of clients.