Code:
#define SEG(type,base,lim) \
.word (((lim) >> 12) & 0xffff), ((base) & 0xffff); \
.byte (((base) >> 16) & 0xff), (0x90 | (type)), \
(0xC0 | (((lim) >> 28) & 0xf)), (((base) >> 24) & 0xff)
I know it's a segment descriptor structure.
But i don't understand the code : ((lim) >> 12 & 0xffff)
Why need right shift 12 bit?
I need help.