www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/10/05/12:34:48

Date: Wed, 5 Oct 94 09:55:52 -0400
From: dj AT stealth DOT ctron DOT com (DJ Delorie)
To: sl5h9 AT cc DOT usu DOT edu
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: segment:offset notation and normal addressing

>    Is there a way to convert a normal memory address to segment:offset 
> notation?

What do you mean by normal memory address?  If you mean "char *", then
yes, you can.  The segment is _go32_my_cs, and the offset is (int)ptr.
I don't think this will do you much good though - I think you're
talking about something you can use in real mode.  Sorry, real mode
programs won't be able to see the 32-bit memory anyway.

You can convert a linear address in the dos memory by using divide and
remainder functions.  This is useful for the linear addresses in
_go32_info_block.


- Raw text -


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