Well, you can run multitasking in TSRs & keyboard interrupt handlers (the original event loop)… implementing a window manager and TCP stack is left as an exercise to the reader…
> implementing a window manager and TCP stack is left as an exercise to the reader…
I'm pretty sure both of those have implementations available for DOS already.
I recalled something from distant past - MSDOS multitasking with DESQView (apparently the same vendor who built QEMM):