www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/31/02:31:11

Date: Wed, 31 Jan 1996 09:16:13 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Casper Schougaard <caspers AT ozemail DOT com DOT au>
Cc: djgpp AT delorie DOT com
Subject: Re: Help:Using far ptr from real mode interrupt

On 30 Jan 1996, Casper Schougaard wrote:

> The problem is when I try to print the OEM string using the supplied far pointer. I am
> using the line;
> 
>       c = _farpeekb(_dos_ds, (ptr>>16)*16 + (unsigned short)ptr);
> 

What you do to `ptr' above doesn't change it a bit!  If you get a 
segment/offset pair from a real-mode software interrupt, then you should 
do this:

	c = _farpeekb(_dos_ds, (segment << 4) + offset);

If that doesn't help, please tell how did you get that `ptr' above.

- Raw text -


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