Article View: comp.os.os2.programmer
Article #3318Re: Surrendering timeslice under DOS?
From: David Burton
Date: Thu, 07 Jan 1993 05:06
Date: Thu, 07 Jan 1993 05:06
29 lines
1296 bytes
1296 bytes
kevin@wicat.com (Kevin Vigor) writes:
> Once you know you're in an OS/2 DOS box, calling interrupt 2F with AX set to
> 01680h will release the timeslice.
Here's what I do:
/* do DOS multiplex interrupt to let other programs run */
void tick(void)
{
union REGS regs;
long far * ptrkludge;
memset( ®s, 0, sizeof(union REGS) );
(void)int86( 0x28, ®s, ®s ); /* the old DOS idle handler */
ptrkludge = MK_FP( 0, 4*0x2F ); /* address of the int 2Fh vector */
if ((_osmajor >= 3) && *ptrkludge)
{ /* if DOS 3 or later, and the 2Fh (multiplex) vector is non-zero
*/
memset( ®s, 0, sizeof(union REGS) );
regs.x.ax = 0x1680;
(void)int86( 0x2F, ®s, ®s ); /* the new DOS idle call */
}/*if*/
} /* tick */
I hope this helps.
-Dave Burton, Burton Systems Software
Tel: 919-233-8128 Fax: 919-233-0716
dburton@salzo.cary.nc.us Bix: dburton
Technical Details
Message-ID:
<8oqZwB4w165w@salzo.Cary.NC.US>Path:
arc1-ca.pugleaf.net!sparky!uunet!psinntp!dg-rtp!salzo!dburtonReferences:
<1993Jan5.231303.14795@wicat.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!dg-rtp!salzo!dburton From: dburton@salzo.Cary.NC.US (David Burton) Newsgroups: comp.os.os2.programmer Subject: Re: Surrendering timeslice under DOS? Message-ID: <8oqZwB4w165w@salzo.Cary.NC.US> Date: Thu, 07 Jan 93 00:06:18 EST References: <1993Jan5.231303.14795@wicat.com> Organization: SalzoBoard BBS Lines: 29