Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. cli ; No more interrupts
  2. lgdt [cs:GDTR] ; Load GDT register
  3. mov eax, cr0
  4. or al, 0x01 ; Set protected mode bit
  5. mov cr0, eax
  6. jmp 8:0x8060
  7.  
  8. mov ecx, ss ; Get stack segment
  9. shl ecx, 4 ; Convert to absolute value
  10. add ebp, ecx ; BP becomes EBP
  11. add esp, ecx ; SP becomes ESP
  12.  
  13. ; Initialize segments to point to data area
  14.  
  15. mov eax, 16
  16. mov es, ax
  17. mov ds, ax
  18. mov ss, ax
  19. mov fs, ax
  20. mov gs, ax
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement