Guest User

tasks.asm

a guest
Nov 5th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "config.h"
  2.  
  3. [GLOBAL tasks_switch_to_user]
  4.  
  5. tasks_switch_to_user:
  6.     mov ebx, [esp+4]
  7.  
  8.     mov ax, GDT_USER_DS_SELECTOR
  9.     mov ds, ax
  10.     mov es, ax
  11.     mov fs, ax
  12.     mov gs, ax
  13.  
  14.     mov eax, esp
  15.     push GDT_USER_DS_SELECTOR
  16.     push eax
  17.     pushf
  18.     push GDT_USER_CS_SELECTOR
  19.     push ebx
  20.     iret
Add Comment
Please, Sign In to add comment