u 0x8:0x100000 - returns okay.
There are some cases that I must not use the "linear sel", a direct example: video driver, which would behave abnormally if DS and ES would be set to "linear sel" - 0x8 (since the chars/strings would point at completely different location).
If I don't use the "linear sel" selector and try to point to 0x100000, it will point to completely another location, because the active selector is 0x18, "sys_data", and that'll point to address 0x100000 + 0x83340 = 0x183340 .
So if I want to display contents of the first megabyte to screen using the SYS_DATA selector and using WriteS in ESI the specified pointer, I must use:
Code: Select all
LinearSelDifferential equ 0x83340
...
mov esi,0x100000 - LinearSelDifferential
call WriteS
Ah well, just another hair-tearing course of segmentation...