X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Rod Pemberton" Newsgroups: comp.os.msdos.djgpp Subject: Re: code from BC31(16bits) to DJGPP(32 bits) Date: Mon, 28 Nov 2005 10:12:58 -0500 Organization: Aioe.org NNTP Server Lines: 38 Message-ID: References: <1133146328 DOT 335307 DOT 54810 AT g44g2000cwa DOT googlegroups DOT com> NNTP-Posting-Host: pCFjXAYAthfOLF6YhIh1ZA.user.domitilla.aioe.org X-Complaints-To: abuse AT aioe DOT org X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Priority: 3 X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MSMail-Priority: Normal To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com wrote in message news:1133146328 DOT 335307 DOT 54810 AT g44g2000cwa DOT googlegroups DOT com... > sorry, i got confused to change source code form bc31 to djgpp > should i change the following code because i changed compiler > > regs.x.di = (WORD)(&PRD_EDDS);for bc31 > > i should use > reg.x.di = (WORD)(&PRD_EDDS); for djgpp > or > reg.x.di = (DWORD)(&PRD_EDDS); for djgpp > ************************************************************************** > > offset32 = _ES << 4 + _BX; for bc31 > > i should use > offset32 = _ES << 4 + _BX; for djgpp > or > offset32 = _ES << 16 + _BX; for djgpp > > Thanks for your help Both of these are the same... offset32 = r.x.dx << 4 + r.x.bx offset32 = r.x.dx * 16 + r.x.bx When you use dosmemput/get to copy to __tb, all three are the same... offset32 = __tb; offset32 = __tb_segment << 4 + __tb_offset; offset32 = __tb_segment * 16 + __tb_offset; RP