I tried writing a simple OS decades ago as an EXE you'd run from MSDOS. It would rewrite all the ISR vectors and take over all the memory including the space that was previously used by MSDOS. I was told that because I relied on DOS, whatever I wrote was not an operating system. I politely disagreed.