Mail Archives: djgpp/2003/03/26/23:45:07
> I wish to know how I would obtain the Address of a Variable,
char *Address;
Address = &Variable;
> such that it can also be broken down into its Segment and Offset,
As has been pointed out repeatedly, DJGPP variables live in 32-bit
address space, so there is no Segment as you are thinking of it,
and the Offset is always 32 bits in size.
> its AOK it I can directly obtain the Segment and Offset information in
> separate calls.
The only reason you might think you want this information is passing
to some old-style DOS/BIOS interrupt. If that is the case you must
have the data in the 1st megabyte of memory. So you would need to
copy it from the DJGPP address space into the first megabyte, then
get the segement:offset of where you passed it. I suggest you look at
the FAQ for examples. In any case, you will not be using FP_SEG or
FP_OFF at all, it's a re-write.
- Raw text -