delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/07/10/03:15:11

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: gohyongkwang AT hotmail DOT com (Goh, Yong Kwang)
Newsgroups: comp.os.msdos.djgpp
Subject: Recommend use of __dpmi_int over int86?
Date: 10 Jul 2004 00:14:35 -0700
Organization: http://groups.google.com
Lines: 29
Message-ID: <354933d6.0407092314.376127b0@posting.google.com>
NNTP-Posting-Host: 137.132.3.12
X-Trace: posting.google.com 1089443675 22912 127.0.0.1 (10 Jul 2004 07:14:35 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Sat, 10 Jul 2004 07:14:35 +0000 (UTC)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi.

I'm beginning to delve a little deeper into programming invoking DOS
and BIOS interrupts, so I picked up an old book "MSDOS 5 Programming:
The Complete Reference" and it is filled with 16-bit C programming
code which I believed was written for Turbo C or Borland C compiler.

Most of them worked though when compiled under DJGPP, using the REGS
structure and then invoking int86, intdos, or int86x etc.

Then while trying to figure out the subtle differences between 16-bit
and 32-bit C code (the usual questions of segread(), FP_SEG and FP_OFF
which Eli has probably answered a million times and getting really fed
up), I was introduced to this function called __dpmi_int().

Don't worry Eli, this posting is not about how to write a replacement
for MK_OFF or MK_SEG or if there's a function called segread() in
DJGPP. :) I know I'll have to rewrite this piece of code for DJGPP and
I'll go read up the DJGPP FAQ section 18.1 to 18.5 on my own.

So in short, can I say that in general while developing program under
32-bit DJGPP, I should use __dpmi_int instead of int86 instead and
int86 is only left behind for backward compatibility for some old
16-bit code?

Thanks!

Goh, Yong Kwang
Singapore

- Raw text -


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