TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Stacy Smith
from: Faye Pearson
date: 1996-02-19 15:32:08
subject: Dos Timeslice

SS> MB| does it differently.  OS/2 DOS programs should use the same
 SS> method as is u MB| by DOS programs running under Windows: call Int 2Fh
 SS> with AX=1680h.  As of MB| 5.0, this method is documented as a DOS
 SS> method, but DOS itself never does MB| anything in response to it.

 SS> EMFBI, but I've always called INT 28h to give up time slices in the
 SS> OS/2 DOS box.  I don't recall where I picked up this information on
 SS> giving up time slices in the OS/2 DOS boxes, but it seems to have
 SS> worked reliably for the past few years, using Pulse as a measure. 
 SS> Changing to the Windows method would be a no-brainer, but I'm curious
 SS> as to why two time slice release calls under OS/2...

EMFBI2, but I don't use an interrupt call at all for OS/2 Timeslicing in
dos sessions,  rather I use the following:

#define GIVE_UP 0

void near OS2_21_slice() 
{
    asm{
    xor    dx ,dx 
    mov    ax ,GIVE_UP
    sti
    hlt
    db     0x35 ,0xCA 
    }
}

It works here under 2.1/Warp... As far as I know the HLT instruction passes
the two databytes to the KERNEL where it interpreted as an API call using
DX and AX as data.

GIVE_UP =0 means give away the rest of the timeslice, larger values give away
specific amounts of time (ms?).

So now, why *3* timeslicing methods under OS/2 ??? :-)

Faye

--- Fe-line Software, FastLog/IEMSI
* Origin: Fe-line, London, UK (2:254/278)
SEEN-BY: 50/99 78/0 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 254/278 1 255/1 440/4 141/209 270/101 712/515 711/808 809 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™.