Idle is a masterclass example why DOS is NOT an operating system.
In a real operating system, there would be ONE method to tell the OS that "I am currently out of work", not a dozen possibilities to do that. > 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 support mainly PRINT. > 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. Exactly. And the protected mode hosts responsibility to behave accordingly. There are a couple of other instructions that don't do what you think when executed from a real mode client in protected mode (CLI, STI, POPF, RDTSC, and more) > Of course you could always try SEVERAL of those methods, nope > but that will take CPU itself Who cares? we have nothing to do anyway! >>> if (!no_multiplex_int) { >>> r.w.ax = 0x1680; >>> intr(0x2f, &r); >>> no_multiplex_int = r.h.al; >>> } >>> else { >>> cpu_hlt(); >>> } I'd recommend Bernd's method. It's the best we have. Tom _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel