flat assembler
Message board for the users of flat assembler.
Index
> Main > How many bits does the segment register has? |
Author |
|
LiuJunfeng 04 Apr 2004, 00:15
Someone says segment register is 16-bit in real mode and 32-bit in protected mode, is that right?
|
|||
04 Apr 2004, 00:15 |
|
f0dder 04 Apr 2004, 09:03
16bit indeed - however, there's a "shadow cache", invisible to you, that stores base/limit meaning the CPU doesn't have to consult the LDT/GDT every time a segment is used, only when loaded.
|
|||
04 Apr 2004, 09:03 |
|
vid 04 Apr 2004, 15:08
you can treat it as 16bit. In reality it is bigger because of speed optimization, but it beheaves like 16bit. (address of paragraph in real, index to descriptior table in protected mode)
|
|||
04 Apr 2004, 15:08 |
|
f0dder 05 Apr 2004, 20:25
Since the shadow cache is 100% invisible to programmers, whether it be ring3 or ring0 programmers, it "is" 16-bit. Imo it's somewhat weird that you can move a segment register to a 32bit register, since you're never going to get more than the 16 low bits.
|
|||
05 Apr 2004, 20:25 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.