[SOLVED] How can I test my GDT?
Posted: Tue Feb 12, 2013 2:27 pm
How can I check if my GDT is loaded correctly, and populated correctly?
If the following code does not cause a triple fault, can I assume that the GDT is correct?
If the following code does not cause a triple fault, can I assume that the GDT is correct?
Code: Select all
reloadSegments:
; Reload CS register containing code selector:
jmp 0x08:reload_CS ; 0x08 points at the new code selector
reload_CS:
; Reload data segment registers:
mov ax, 0x10 ; 0x10 points at the new data selector
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
ret