| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | DOS OS/2 Advice ?? |
Hi Lee,
You wrote to David Noon:
LA>LA> I don't see it that way....what I want to do is relinquish the
LA>LA> remainder of a slice, when I don't need *all* of it.....that's
LA>LA> different from saying you have *no* usefull work to do...DV could
LA>LA> do this, why not OS/2 ?
As I understand it OS/2 does it the same way as DV...
LA> Dave, I appreciate the advice, but this was concerning a DOS app.
LA> What I'm looking for is an Int call that OS/2 will interprete as
LA> a priority downgrade, without totally shutting the application
LA> off.
I don't know of a way of altering the DOS programs priority from within
the program. I've just looked through Ralf Brown's Interrupt list (I
trust you do have a copy? It's invaluable for this sort of thing!).
LA> It's a DOS app, not an event-driven specialty OS app...it *has*
LA> to poll for input at some point.
LA> My app uses internal multi-tasking to compensate for being
LA> portable. It knows when it's busy, and when it's wasting
LA> processor time waiting for a keystroke.
LA> This is a DOS app, because it's the closest thing there is right
LA> now to a portable exe format....it'll run under any OS, while
LA> still taking advantage of specific OS features. Now if I could
LA> just get the *best* multitasker to treat it as an *intelligent*
LA> exe, I'll be happy.
LA> Got any ideas ? What I want is that secret Int call that OS/2
LA> will treat as an instruction to take the rest of the slice
LA> away...but don't put me so far to sleep that I can't wake up
LA> again without keyboard intercession.
It's not secret at all...
Use the standard INT 2F function 1680, from Ralf Brown's interrupt list:
___-----W-2F1680-----------------------------
INT 2F - MS Windows, DPMI, various - RELEASE CURRENT VIRTUAL MACHINE TIME-SLICE
AX = 1680h
Return: AL = status
00h if the call is supported
80h (unchanged) if the call is not supported
Notes: programs can use this function in idle loops to enhance performance
under multitaskers; this call is supported by MS Windows 3.0, DOS 5+,
DPMI 1.0+, and in OS/2 2.0+ for multitasking DOS applications
does not block the program; it just gives up the remainder of the time
slice
should not be used by Windows-specific programs
when called very often without intermediate screen output under WIN 3+,
the VM will go into an idle-state and will not receive the next slice
before 8 seconds. This time can be changed in SYSTEM.INI through
"IdleVMWakeUpTime=". Setting to zero
results in a long wait.
SeeAlso: INT 15/AX=1000h,INT 15/AX=5305h,INT 21/AH=89h,INT 7A/BX=000Ah
He also documents the OS/2 specific interrupts available in the DOS
box to set the session title and a host of other useful things.
George
* SLMR 2.1a * Desk: A very large wastebasket with drawers.
--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)SEEN-BY: 50/99 270/101 620/243 625/160 711/401 409 410 413 430 808 809 934 SEEN-BY: 711/955 712/407 515 624 628 713/317 800/1 @PATH: 440/4 141/209 270/101 712/515 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.