]>
Commit | Line | Data |
---|---|---|
9e2a82e4 JP |
1 | |
2 | .globl set_cr0 | |
3 | ||
4 | set_cr0: | |
5 | mov 4(%esp), %eax # Load argument | |
6 | movl %eax, %cr0 # Set CR0 | |
7 | pushw %cs # Push 16 bits of %CS | |
8 | pushl $set_cr0_cont # Push 32 bits of %EIP | |
9 | ljmp *(%esp) # "Far jump" (both %CS and %EIP from stack) | |
10 | set_cr0_cont: # Hey, here we are! | |
11 | addl $6, %esp # Un-do 48 bits of pushing | |
12 | ret | |
13 |