Date: Mon, 13 May 1996 08:00:35 +0200 (IST) From: Eli Zaretskii To: John Burton Cc: djgpp AT delorie DOT com Subject: Re: Two questions about video access In-Reply-To: <4n4nct$rp4@zinc.compulink.co.uk> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.