www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/13/01:18:31

Date: Mon, 13 May 1996 08:00:35 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: John Burton <john AT bilton DOT compulink DOT co DOT uk>
Cc: djgpp AT delorie DOT com
Subject: Re: Two questions about video access
In-Reply-To: <4n4nct$rp4@zinc.compulink.co.uk>
Message-Id: <Pine.SUN.3.91.960513075133.27468D-100000@is>
Mime-Version: 1.0

On 12 May 1996, John Burton wrote:

> 1. To set the video mode I want I've just been using
>       movw $0x13, %ax
>       int $0x10
> 
>    in an assemly language module. All the other examples
>    I've seen use __dpmi_int or similar to call the
>    interrupt. Is my code reliable?

That depends on the definition of ``reliability''.  The INT instruction is
typically caught by the DPMI host and interpreted in a way that's specific
to each host.  For example, Windows, which is both a DPMI host and a DOS
extender, does its own things to some services, sometimes bypassing the
real service you mean to call altogether.  When you use `__dpmi_int', you
issue an Int 31h call which is more likely to be simply reflected to the
real-mode service.

However, in practice, the two methods yield very similar results, 
especially when you call simple register-based functions (i.e. those 
which don't use any memory buffers to pass data).

> 2. The __djgpp_nearptr_enable functions appears to 
>    return sucess but any attempt to access the
>    video memory fails under NT. 

Not every DPMI server allows you to use near pointers.  When you use them,
memory protection is momentarily disabled (since `__djgpp_nearptr_enable'
defines a segment that spans the entire address space), and some operating
systems that take memory protection seriously don't allow such things. 

- Raw text -


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