Untitled
public text v1 · immutable#pagma optimize("",off)
.text
.globl _pmode, pmode
pmode:
_pmode:
cli /* atomic */
pop %eax /* pull the pointer to the GDT off the stack */
lgdt $(%eax) /* point it */
mov %eax, %cr0
or %eax, 1
mov %cr0, %eax
jmp somewhere_else /* to clear out the instruction prefetch queue */
nop
somewhere_else:
sti /* end of atomic */
ret