delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/20/07:37:48

Message-ID: <3A40A4C1.6040207@htsol.com>
Date: Wed, 20 Dec 2000 14:23:29 +0200
From: Yoram Hofman <yoram AT htsol DOT com>
Organization: Hi-Tech Solutions
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; m18) Gecko/20001108 Netscape6/6.0
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: BorlandC to GCC translation
NNTP-Posting-Host: bzq-143-56.bezeqint.net
X-Trace: 20 Dec 2000 14:22:17 +0200, bzq-143-56.bezeqint.net
Lines: 26
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Can anybody help to translate this code to GCC:
{
union REGS r;
struct SREGS sr;
unsigned char *buff;

buff = farmalloc(0x05);

r.x.ax = 0xEEEE;
r.x.bx=0xABCD;
int86(0x15,&r,&r);

sr.es  = FP_SEG(buff);
r.x.bx = FP_OFF(buff);
r.x.ax = 0xEEEE;
r.x.di = 0x4444;
r.x.si = 0xAAAA;
r.x.cx = 0x05;
int86x(0x15, &r,&r, &sr);
}
(NOTE: values don't matter)
I read DLGPP help about int86, but in my case I don't know which define 
I have to choose (NAIVE_DOS_REGS or _BORLANDC_DOS_REGS)  with purpose to 
transfer to registers my buffer address rightly .
Thanks.

- Raw text -


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