flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
LiuJunfeng
Someone says segment register is 16-bit in real mode and 32-bit in protected mode, is that right?
|
|||
![]() |
|
f0dder
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.
|
|||
![]() |
|
vid
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)
|
|||
![]() |
|
f0dder
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.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.