Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

polling (Announce)

posted by mbbrutman Homepage, Washington, USA, 17.07.2011, 23:05

> Hello Mike
> I don't think you got it right. Int 28 isn't something you CALL, (the
> handler is just an IRET anyway), it's something your TSR may HOOK and DOS
> itself calls it to signal it is basically idle - as in waiting for keyboard
> entry, and the like. It doesn't look like what your polling app wants to
> do.

If DOS calls INT 0x28 to indicate that it is idle (between keystrokes presumable) then it is perfectly reasonable for an application to do the same and for the same reason - especially if it is not using DOS services.

An example: my IRC program under FreeDOS loops polling for keyboard and Ethernet traffic hard enough to cause VMWare to burn an entire CPU core. (In effect it is busy that time.) That is with FPADM running. If I make INT 0x28 calls the CPU utilization of the VM that FreeDOS and IRCjr are running in drops to almost nothing, but everything is still responsive.


>
> > Then there is INT 0x2F,1680 (the idle call). This is supported in DOS 5
> > and later versions of Windows,
>
> The bit about "DOS 5" is a misunderstanding of R. Brown's list, forget it.
> What int 2F/1680 is, is a DPMI/Windows/Task Switcher thing (hence supported
> by DOS 5's "DOSSHELL", NOT supported by DOS 5 or any DOS's kernel).
>
> How it works is your app calls int 2F/1680 in order to tell the multitasker
> "I think I have nothing useful to do for a while", thus allowing the
> multitasker to pass control to other tasks; In other words yielding.

Ok, that explains why I need to test to see if it is enabled. On XP in a command window it is enabled, but it might not be available in on a pure DOS machine.

So for machines with INT 0x2f installed I can test function 1680 once to see if it is working, and then make a decision on if to keep using it or not. If it is not available I think that INT 0x28 still makes sense, unless I am wrong with my reasoning above.

---
mTCP - TCP/IP apps for vintage DOS machines!
http://www.brutman.com/mTCP

 

Complete thread:

Back to the forum
Board view  Mix view
22778 Postings in 2122 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum