Advertisement
Guest User

io.asm

a guest
Sep 1st, 2023
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ....
  2. global load_idt
  3.  
  4. load_idt:
  5.     push rbp
  6.     mov rbp, rsp
  7.    
  8.     lidt [rdi]
  9.    
  10.     mov rsp, rbp
  11.     pop rbp
  12.    
  13.     ret
  14.  
  15.  
  16.  
  17. global gdt_flush
  18. gdt_flush:
  19.     lgdt [rdi]
  20.     mov ax, 0x30
  21.     mov ds, ax
  22.     mov es, ax
  23.     mov fs, ax
  24.     mov gs, ax
  25.     mov ss, ax
  26.     pop rdi
  27.     mov rax, 0x28
  28.     push rax
  29.     push rdi
  30.     retfq
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement