🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #3318

Re: Surrendering timeslice under DOS?

#3318
From: David Burton
Date: Thu, 07 Jan 1993 05:06
29 lines
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( &regs, 0, sizeof(union REGS) );
    (void)int86( 0x28, &regs, &regs );  /* 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( &regs, 0, sizeof(union REGS) );
        regs.x.ax = 0x1680;
        (void)int86( 0x2F, &regs, &regs );  /* 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!dburton
References: <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