Am Sonntag, dem 29. Okt 2017 schrieb Mateusz Viste: > On Sat, 28 Oct 2017 21:56:22 +0200, Andreas K. Foerster wrote: > > The old version did a "busy-waiting". That was bad, when you run it on > > top of a multi-tasking system in an emulator. It waists cpu-cycles. > > Even on a single-user DOS it is bad: increased power consumption, heat, > less battery time...
Oh, I always was aware of that. I was only struggeling with finding a good solution. > > The new version makes use of the hlt instruction. > > Not good either. You should rather issue a proper 'idle' int and let the > task scheduler or power manager do its job. "task scheduler"? "power manager"? There must be a misunderstanding somewhere. I am talking only about the DOS version. The hlt instruction is only used when you compile the DOS program with bcc ("row4t.com"). The ports to other systems use other system-specific APIs for the user interface. (Even the code for DJGPP is different.) To me DOS is a single-tasking system and I treat it like that. When you run the DOS program on top of a multi-tasking system, you run it in a virtualized or emulated machine. So the hlt instruction only pauses the virtualized cpu, not the real one. It shouldn't affect the rest of the system. I am aware that there are some TSR-programs that might not work with that, but that has always been a problem with games, if I remember correctly. -- AKFoerster <https://AKFoerster.de/> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel