Thread: test ds,4
View Single Post
  #4  
Old 01-16-2005, 18:54
Mkz Mkz is offline
Friend
 
Join Date: Jan 2002
Posts: 98
Rept. Given: 0
Rept. Rcvd 2 Times in 2 Posts
Thanks Given: 5
Thanks Rcvd at 25 Times in 17 Posts
Mkz Reputation: 2
That bit is not related to alignment, but with the place where the selector points to.
The DS segment register (and others) are divided in 3 fields. The lower 2 bits are the RPL - Request Privilege Level, which map to ring 0 or 3 in Windows; the next bit is the TI - Table Index, and indicates if the segment (remainging bits to the left) are defined in the GDT (0) or in the LDT (1).
Probably, Win9x uses LDT for application segment selectors, while NT+ always use GDT.
You can find more info on this topic on http://www.acm.uiuc.edu/sigops/roll_your_own/i386/regs.html#segments or google for more.
Reply With Quote