delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/17/22:38:16

Message-ID: <34209575.19A4@sercomtel.com.br>
Date: Wed, 17 Sep 1997 23:44:05 -0300
From: Alessandro Moure <moure AT sercomtel DOT com DOT br>
Reply-To: moure AT sercomtel DOT com DOT br
Organization: LIEB/CIP/CPG/UEL
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Memory address, protected mode, real mode... Arghhhhhhhhhh!
References: <199709170103 DOT SAA26420 AT adit DOT ap DOT net>

> Strange. Your second code should definitely work. You do have add and data declared as int or long, right?

	Right.

> I assume counter is an offset into the 0xD000 segment. This would be even simpler:
 
	Right again.

> unsigned long data;
> data = _farpeekl(_dos_ds, 0xD0000 + counter);
> 
> Maybe try this:
> sel = __dpmi_segment_to_descriptor(0xD000);
> data = _farpeekl(sel,counter);
> 
> Nate Eldredge
> eldredge AT ap DOT net

	First of all, thnx for replying. :)
	It won't work. I always get the same trash. This is even more strange!
Always the same numbers!
	My old code (16 bits) was:

#define MASK 0xFFFFFFFL
#define BASEADD 0xD0000000L

	for(counter = foo; counter < foo2; counter++)
	data[counter] = MASK & *(BASEADD + counter);

where data[] is float.

	It is important to say that when I use sel =
__dpmi_segment_to_descriptor(0xD000 + counter); I DO get the right data,
but not one by one (of course, cause counter should be the offset). Or,
in other words, the data IS there.
	Sorry to post it again, but it is the very last thing I got to do to
finish the project.
	[]'s

Alessandro Moure
moure at sercomtel com br
762816
JG27

- Raw text -


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