daily pastebin goal
80%
SHARE
TWEET

Untitled

jazz_vico Dec 9th, 2018 (edited) 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;mapa virtual
  2. ;  |-------------|0x000000
  3. ;  |             |
  4. ;  |   kernel    |
  5. ;  |             |0x0fffff
  6. ;  |-------------|0x100000
  7. ;  |codigo tar n |
  8. ;  |-------------|0x100fff
  9. ;  | data tar n  |
  10. ;  |-------------|0x101fff
  11. ;  | pila nivel 0|
  12. ;  |-------------|0x102fff
  13. ;  |             |
  14. ;  |             |
  15.  
  16.  
  17.  
  18. ;pila nivel 0 si hay error code
  19.  
  20. ;  |------------|<--esp
  21. ;  | error code |
  22. ;  |------------|
  23. ;  |   eip      |
  24. ;  |------------|
  25. ;  |   cs       |
  26. ;  |------------|
  27. ;  |   eflags   |
  28. ;  |------------|
  29. ;  |   esp3     |
  30. ;  |------------|
  31. ;  |   ss       |
  32. ;  |------------|
  33.  
  34.  
  35. _int_sin_errorcode:
  36.     mov eax, actual
  37.     xor ebx, ebx
  38.     .resto:
  39.     xor ecx, ecx
  40.     ;xor con todos los demas regs para reiniciarlos
  41.     ;modifico eip
  42.     mov [esp], 0x100000
  43.     ;Modifico cs
  44.     mov [esp+4] cod_3<<3
  45.     ;Modifico eflags
  46.     Mov [esp+8], 0x202
  47.     ;modifico esp3
  48.     mov [esp+12],0x102000
  49.     ; Modifico ss
  50.     Mov [esp+16] datos_3<<3
  51.     ;modifico los demas registros
  52.     mov ax datos_3<<3
  53.     mov gs ax
  54.     ;asi con fs,ds,es
  55.     iret
  56.  
  57. _int_con_errorcode:
  58.     mov eax, actual
  59.     ;guardo en ebx el error code
  60.     pop ebx
  61.     jmp .resto
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top