LGDT

From OSDev Wiki
Jump to: navigation, search

The LGDT instruction is used to load the Global Descriptor Table. It takes a pointer to a GDT descriptor structure, not the table itself.

Example

	;-- Some code before
	lgdt [gdt_info]
	;-- Some code after
 
gdt_start:
	;-- Some GDT entries, like null, kernel code, kernel data, user code, user data, TSS...
 
gdt_info:
	dw gdt_info - gdt_start - 1
	dq gdt_start
Personal tools
Namespaces
Variants
Actions
Navigation
About
Toolbox