How would you obtain segment and offset addresses from a far address of a memory location?

Showing Answers 1 - 1 of 1 Answers

Pointers to far objects are stored using four bytes (32 bits). The bytes are stored little endian or low to high order. The first word contains the 14-bit memory offset (bits 14 and 15 are always 0). The second word contains the page number (or segment number for function pointers). The memory address is calculated as follows:

Variable Address = (Page * 0x4000L) + Offset

Function Address = (Segment * 0x10000L) + Offset

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions