X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f X-Recipient: djgpp-workers AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=HtVZ6HwHa2EWG14yfXa7KhuLhiwfJG+kFUhGY3sXrOs=; b=jjppSGaOQwXh9q2dZDoO9emT8jv80957brcwwAAw04P/EgplYY8TS/JnRg7L75Cy3l v6UrMf/LLnfKDtOUXOO0mbX+bUZEfzF0cOBJkX23mjwplwHtDDTP/dv6iB8SfbPFRVvB BK7FKGTBLfUeEEcbi9AsqiNSrS9vJlESm/4vQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=TOBFGfwH3QJAsQZOG9DxNJgoGHpsd77TSd0GidFmCsTeboilmfLDKgnvHeOTfQUjDQ utppO9T7zh2JeMxavOAzRQkyHbtc/CXQ8c+FCGtcqrAY2neFVJru+g7nJzoS5CrIRtP8 N84c5CU6bOiiF7DUGNyWYc25gNX2yZEMOwopI= MIME-Version: 1.0 In-Reply-To: <93c172b50906121929u6a0a9c7aw497732cb5c42718d@mail.gmail.com> References: <93c172b50906121929u6a0a9c7aw497732cb5c42718d AT mail DOT gmail DOT com> Date: Fri, 19 Jun 2009 15:44:50 -0500 Message-ID: <93c172b50906191344i1c6aeacdk8f3c1f2eff6251@mail.gmail.com> Subject: Fwd: patch: dosexec.c (from DJLSR203.ZIP) -- adds DR-DOS int 2Fh, 2707h From: Rugxulo To: djgpp-workers AT delorie DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Here's a patch I whipped up recently. ---------- Forwarded message ---------- From: Rugxulo Date: Fri, Jun 12, 2009 at 9:29 PM Subject: patch: dosexec.c (from DJLSR203.ZIP) -- adds DR-DOS int 2Fh, 2707h Hey guys, =A0 I don't use DR-DOS multitasking often (mainly because it's unfamiliar, non-portable, and somewhat unstable in certain circumstances). Also, almost nothing supports its API, so it's hard to find what the heck to do with it. Anyways, I've had an idea for trying this for a few weeks, and it *seems* to work correctly in my tests, but I would appreciate more testing if any of you already have the (admittedly non-free in any sense) DR-DOS 6.0 or newer. This patch basically changes DOSEXEC.C (from DJLSR203.ZIP) to optionally use the TaskMax API (int 2Fh, 27xxh) to start a new task or process if available (else falls back to normal int 21h, 4B00h). http://www.delorie.com/djgpp/doc/rbinter/ix/2F/27.html http://www.delorie.com/djgpp/doc/rbinter/id/06/47.html =A0 =A0 =A0 =A0(2700= h -- installation check) http://www.delorie.com/djgpp/doc/rbinter/id/13/47.html =A0 =A0 =A0 =A0(2707= h -- create new task) http://gd.tuwien.ac.at/pc/dos/djgpp/current/v2/djlsr203.zip =A0 =A0(2.03p2 -- libc sources, including DOSEXEC.C) http://rugxulo.googlepages.com/djlsr203.tbz The example program I'm using is the TDE 5.1v text editor (LShift + LAlt + E -> type what you want to run). http://adoxa.110mb.com/tde/index.html ftp://ftp.sac.sk/pub/sac/utiltext/tde51vs.zip http://rugxulo.googlepages.com/tde51v.txt =A0 =A0 =A0(simple .BAT to compil= e it, but first type "tde51v /gcc -O2 dosexec.c" else it uses default libc version) Heck, if you don't have DJGPP set up already (uh???), you can use this one-floppy version (full sources at base site): http://rugxulo.googlepages.com/djgpp203.7z =A0 =A0 =A0 =A0 =A0 =A0(GCC 2.95= .3 + DJGPP 2.03p2 + BNU 2.16.1) http://rugxulo.googlepages.com/7zdec.zip =A0 =A0 =A0 =A0 =A0 =A0 =A0 (small= unpacker from LZMA SDK w/ srcs) And here's the patch: EDIT: =A0 Bah, it might be easier to just upload a test .EXE build for you, but that won't help you debug it (not that I expect you to, just saying, if you *wanted* to, heh). http://rugxulo.googlepages.com/tdep-dr.zip =A0 (TDEP.EXE [UPX'd], DOSEXEC.C, DOSEXEC.DIF, DOSEXEC.O, TDE51V.BAT, README.TXT) ---------------------------------------------------------------------------= ----------------------------------- --- dosexec.c~ =A02001-12-11 01:42:08 +0000 +++ dosexec.c =A0 2009-06-12 20:09:56 +0000 @@ -327,12 +327,33 @@ =A0 parm.fcb2_off =3D fcb2_la & 15; =A0 dosmemput(&parm, sizeof(parm), parm_la); - =A0r.x.ax =3D 0x4b00; +/* ******************************************************************** */ + + =A0r.x.ax =3D 0x2700; =A0 =A0 =A0 =A0 =A0/* DR-DOS 6.x+ -- check for Task= Max / TaskMgr */ + =A0__dpmi_int(0x2F, &r); + =A0 r.x.ds =3D program_la / 16; =A0 r.x.dx =3D program_la & 15; =A0 r.x.es =3D parm_la / 16; =A0 r.x.bx =3D parm_la & 15; + + =A0if (r.x.ax & 0xFF =3D=3D 0xFF) { =A0 =A0 /* if TaskMax / TaskMgr insta= lled ... */ + + =A0 =A0r.x.ax =3D 0x2707; =A0 =A0 =A0 =A0/* DR-DOS 6.x+ -- start new back= ground task =A0*/ + =A0 =A0r.x.cx =3D 91; =A0 =A0 =A0 =A0 =A0 =A0/* ticks until switch back (= =3D=3D 5 secs.) =A0 =A0 =A0*/ + =A0 =A0__dpmi_int(0x2F, &r); + + =A0} + + =A0else { =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* normal DOS shell */ + + =A0 =A0r.x.ax =3D 0x4b00; =A0 =A0 =A0 =A0/* DOS execute program */ =A0 __dpmi_int(0x21, &r); + + =A0} + +/* ******************************************************************** */ + =A0#if 0 =A0 if (tbuf_selector) =A0 =A0 __dpmi_free_dos_memory (tbuf_selector); ---------------------------------------------------------------------------= -----------------