This exact IVT-hooking technique (save old vector, write new segment:offset, chain back when done) is how real DOS TSR utilities like early antivirus tools and screen savers embedded themselves into a running system, and it is also how DOS-era games hooked the IRQ0 timer for custom-rate game loops. Using RET instead of IRET in a handler is a classic real bug — it fails to restore FLAGS, silently corrupting the interrupt-enable state of the entire system.