Hi! To explain EDIT 0.7d a bit:
#if 0 /* int 2f is often quite crowded */ r.x.ax = 0x1680; /* release multitasker timeslice */ int86(0x2f, &r, &r); /* multiplexer call */ #else r.h.ah = 0x84; /* "network" idle call */ int86(0x2a, &r, &r); /* network interfaces */ #endif
The idea is that int 2f.1680 is from the Windows world. So it is nice for a DOS window running inside Windows. Other DPMI hosts besides Windows implement it as well. But it is not what I would use as default in DOS apps. Int 2a.84, on the other hand, is the keyboard busy loop in network context. In other words, while apps (or DOS) are just waiting for keyboard input, they can call this interrupt function to keep network stuff going, or to indicate that they are idle and waiting for keypresses. Int 28 is vaguely similar, it is the DOS idle interrupt called by DOS itself, to give TSR hooking it a chance to do stuff while DOS is waiting for keyboard input. To return to the multitasking topic: In protected mode, you cannot just invoke HLT. Your protected mode host will get notified that you tried and for example EMM386 (which often is your protected mode host if no Win3 runs) might proceed to do an actual HLT - or just do nothing. Of course you could always try SEVERAL of those methods, but that will take CPU itself and if several do succeed, you might end up waiting too long, slowing down your app. Regards, Eric PS: DOSEMU used to always provide DPMI (you actually could not run apps in real mode, only "EMM386 compatible" ones) so int 2f.1680 might be a nice default for it. But it also implements all those other interfaces, I would assume :-)
https://www.vogons.org/viewtopic.php?f=24&t=43384#p438763
if (!no_multiplex_int) { r.w.ax = 0x1680; intr(0x2f, &r); no_multiplex_int = r.h.al; } else { cpu_hlt(); }
_______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel