delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/29/23:15:38

From: DavMac AT iname DOT com (Davin McCall)
Newsgroups: alt.lang.asm,comp.os.msdos.djgpp,comp.os.msdos.programmer
Subject: Re: NASM + DJGPP linking
Date: Wed, 30 Jun 1999 02:15:04 GMT
Organization: Monash Uni
Lines: 37
Distribution: world
Message-ID: <37797987.12076388@newsserver.cc.monash.edu.au>
References: <930622805 DOT 86738 AT kyle DOT inet DOT net DOT nz> <377909E8 DOT 3497 AT erols DOT com>
NNTP-Posting-Host: damcc5.halls.monash.edu.au
X-Trace: towncrier.cc.monash.edu.au 930708874 3792 130.194.198.138 (30 Jun 1999 02:14:34 GMT)
X-Complaints-To: abuse AT monash DOT edu DOT au
NNTP-Posting-Date: 30 Jun 1999 02:14:34 GMT
X-Newsreader: Forte Free Agent 1.1/32.230
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Tue, 29 Jun 1999 14:01:12 -0400, "John S. Fine"
<johnfine AT erols DOT com> wrote:

>  DJGPP is a 32-bit environment.  That means you must use
>esp instead of sp, ebp instead of bp, and ebp+8 instead of
>bp+4.

For some reason I missed that. Must be too used to 16-bit assembly
code.

>  DJGPP is a protected mode environment.  Instructions like
>"int 10h" cannot go directly to the BIOS.  They must be
>intercepted by the DOS extender and redispatched in V86 or
>real mode.

I think you are incorrect - any interrupts under DPMI are echoed
through to V86/real mode with the same register values; it is only the
functions which use pointers which have to be caught by a DOS
extender.

Of course, issuing interrupts this way is probably not the recommended
way of calling BIOS services, it would be better to use the DPMI
functions.

>  DJGPP code can be run several different environments (such
>as CWSDPMI or Windows DOS boxes etc.).  I don't remember whether
>all, some or none of them redispatch int 10h's for you.  I
>expect it is in the FAQ.

As far as I understand it, they all should as it's part of the DPMI
specification.

Davin.

__________________________________________________________
       *** davmac - sharkin'!! davmac AT iname DOT com ***
my programming page: http://yoyo.cc.monash.edu.au/~davmac/

- Raw text -


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