polling (Announce)
Ninho - I appreciate the back and forth of the discussion - this is an area I am not very familiar with.
Lets consider the case of 2F/1680 first. I think that the only concern with 2F is ensuring that it is installed first. On a bare system with no TSRs the interrupt vector might not be in use; at best if you invoke it there is an IRET there and nothing happens. At worse the interrupt vector is zero, and the machine blows up. If 2F is installed then the convention is to not alter registers unless a particular TSR chained from 2F detects it's signature was used. This all makes sense.
The only concern I have is that 2F has been around since DOS 2.x; I wonder if the behavior is the same going all of the way back to those early releases. (I can test this.) While PRINT.COM used 2F back then I doubt the concept of the multiplex interrupt was fully architected/understood so I am expecting that it does not work well with older TSRs.
INT 28h is much more interesting ...
I think you misread me earlier. I don't want to install an INT28 handler. I just want to invoke INT28 from my idle loop and if there is an INT28 handler installed it can do whatever it needs to do.
Everything that I can find says that DOS issues it while waiting for keyboard input, and as you pointed out this is something that TSRs might want to monitor. Applications normally have no use for this.
My applications are ill-behaved in that they are constantly polling for I/O outside of DOS so this interrupt will never be called. That gives the illusion of never having any idle time because I never called DOS functions to read the keyboard. This clearly is not the case - I'm just not using DOS when my application is in its idle loop.
Some of what I have read says that only DOS should use this, but explains that DOS just uses it to give TSRs time to run if DOS is idle. One reference I saw was talking about older application switchers, and that using this interrupt in your application IDLE loop would improve system performance. I presume that is because the older application switchers were monitoring it. In my testing with FDAPM calling INT28 reduced overall VM utilization; I suspect that FDAPM is monitoring INT28 and using halt instructions to reduce power consumption.
Clearly if 2F/1680 is working that is the better way to indicate that the application is idle. But in the absence of 2F/1680 I know that 28 is still available, and it has been in place since DOS 2.x. (It still might not do anything useful - that depends on if there is something monitoring it.)
-Mike
---
mTCP - TCP/IP apps for vintage DOS machines!
http://www.brutman.com/mTCP
Complete thread:
- mTCP Open Source release - mbbrutman, 27.05.2011, 23:47 (Announce)
- mTCP GPL - ecm, 27.05.2011, 23:58
- GPLv3 - mbbrutman, 28.05.2011, 00:20
- GPL: either version 3 of the license, or any later version - ecm, 28.05.2011, 00:55
- GPL: either version 3 of the license, or any later version - mbbrutman, 28.05.2011, 01:09
- GPL: either version 3 of the license, or any later version - ecm, 28.05.2011, 01:18
- GPL: either version 3 of the license, or any later version - mbbrutman, 28.05.2011, 01:25
- download, compile, ... - ecm, 28.05.2011, 01:30
- GPL: either version 3 of the license, or any later version - mbbrutman, 28.05.2011, 01:25
- GPL: either version 3 of the license, or any later version - marcov, 30.05.2011, 09:37
- GPL: either version 3 of the license, or any later version - mbbrutman, 30.05.2011, 15:32
- What does the GPL allow? - ecm, 30.05.2011, 16:08
- What does the GPL allow? - mbbrutman, 30.05.2011, 16:30
- GPL something - ecm, 30.05.2011, 17:08
- GPL something - mbbrutman, 30.05.2011, 18:05
- theoretical licensing problems and such - ecm, 30.05.2011, 18:28
- licensing again... executables - ecm, 30.05.2011, 22:34
- licensing again... executables - mbbrutman, 31.05.2011, 03:33
- licensing again... executables - ecm, 31.05.2011, 13:59
- licensing again... executables - mbbrutman, 01.06.2011, 01:16
- licensing again... executables - ecm, 01.06.2011, 01:53
- licensing again... executables - mbbrutman, 01.06.2011, 02:17
- licensing again... executables - ecm, 01.06.2011, 15:49
- licensing again... executables - mbbrutman, 01.06.2011, 02:17
- licensing again... executables - ecm, 01.06.2011, 01:53
- licensing again... executables - mbbrutman, 01.06.2011, 01:16
- licensing again... executables - ecm, 31.05.2011, 13:59
- licensing again... executables - mbbrutman, 31.05.2011, 03:33
- GPL something - mbbrutman, 30.05.2011, 18:05
- What does the GPL allow? - Rugxulo, 30.05.2011, 18:14
- mTCP in DOSEMU; Linux kernel developers' GPLv2-only reasons - ecm, 30.05.2011, 22:38
- What does the GPL allow? - marcov, 30.05.2011, 22:49
- What does the GPL allow? - mbbrutman, 31.05.2011, 03:41
- What does the GPL allow? - mbbrutman, 31.05.2011, 04:18
- What does the GPL allow? - Japheth, 30.05.2011, 18:47
- Gift trolls and other curiosities - ecm, 30.05.2011, 19:20
- Gift trolls and other curiosities - mbbrutman, 30.05.2011, 19:54
- editing - ecm, 30.05.2011, 20:03
- Gift trolls and other curiosities - mbbrutman, 30.05.2011, 19:54
- Gift trolls and other curiosities - ecm, 30.05.2011, 19:20
- What does the GPL allow? - marcov, 30.05.2011, 22:38
- GPL something - ecm, 30.05.2011, 17:08
- What does the GPL allow? - marcov, 30.05.2011, 22:37
- What does the GPL allow? - mbbrutman, 30.05.2011, 16:30
- GPL: either version 3 of the license, or any later version - marcov, 30.05.2011, 22:35
- GPL: either version 3 of the license, or any later version - mbbrutman, 30.05.2011, 22:56
- GPL: either version 3 of the license, or any later version - marcov, 02.06.2011, 16:10
- GPL: either version 3 of the license, or any later version - mbbrutman, 03.06.2011, 04:12
- GPL: either version 3 of the license, or any later version - marcov, 03.06.2011, 13:36
- GPL: either version 3 of the license, or any later version - Rugxulo, 03.06.2011, 16:45
- GPL: either version 3 of the license, or any later version - marcov, 03.06.2011, 13:36
- GPL: either version 3 of the license, or any later version - mbbrutman, 03.06.2011, 04:12
- GPL: either version 3 of the license, or any later version - marcov, 02.06.2011, 16:10
- GPL: either version 3 of the license, or any later version - mbbrutman, 30.05.2011, 22:56
- What does the GPL allow? - ecm, 30.05.2011, 16:08
- GPL: either version 3 of the license, or any later version - mbbrutman, 30.05.2011, 15:32
- GPL: either version 3 of the license, or any later version - ecm, 28.05.2011, 01:18
- GPL: either version 3 of the license, or any later version - mbbrutman, 28.05.2011, 01:09
- GPL: either version 3 of the license, or any later version - ecm, 28.05.2011, 00:55
- GPLv3 - mbbrutman, 28.05.2011, 00:20
- mTCP and SwsVPkt - Japheth, 31.05.2011, 09:03
- mTCP and SwsVPkt - mbbrutman, 01.06.2011, 03:11
- mTCP and SwsVPkt - Japheth, 01.06.2011, 13:14
- mTCP and SwsVPkt - mbbrutman, 01.06.2011, 15:04
- polling - ecm, 01.06.2011, 16:07
- polling - Japheth, 01.06.2011, 17:12
- polling - ecm, 01.06.2011, 17:27
- polling - Japheth, 01.06.2011, 17:50
- polling - ecm, 01.06.2011, 17:55
- polling - Japheth, 01.06.2011, 18:39
- polling - ecm, 01.06.2011, 18:49
- polling - Japheth, 01.06.2011, 18:39
- polling - ecm, 01.06.2011, 17:55
- polling - Japheth, 01.06.2011, 17:50
- polling - ecm, 01.06.2011, 17:27
- polling - Japheth, 01.06.2011, 17:12
- mTCP and SwsVPkt - Japheth, 01.06.2011, 13:14
- mTCP and SwsVPkt - mbbrutman, 01.06.2011, 03:11
- mTCP GPL - ecm, 27.05.2011, 23:58