Last active
August 29, 2015 14:12
-
-
Save segrax/006e04be77b36382f776 to your computer and use it in GitHub Desktop.
Memory Segment Calculations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To calculate the segment of a memory address, | |
Memory Address >> 4 = Segment | |
----------------------------- | |
0xFFFF0 >> 4 = 0xFFFF | |
To calculate the memory address from a segment | |
Segment << 4 = Memory Address | |
----------------------------- | |
0xFFFF >> 4 = 0xFFFF0 | |
=============================================== | |
Each segment begins on a Paragraph Boundary (which is an address that is evenly divisible by 16). | |
Segment MemoryAddress | |
0x0000 = 0x00000 | |
0x0001 = 0x00010 | |
0x0002 = 0x00020 | |
0x0003 = 0x00030 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment