delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2005/11/28/10:17:02

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <dont_have AT bitbucket DOT cmm>
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: <dmf6p4$kke$1@domitilla.aioe.org>
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

<blk5743 AT yahoo DOT com DOT tw> 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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019