bunnytaur

Untitled

May 3rd, 2012
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. <header>
  2. .model tiny
  3. .code
  4.  
  5. ORG 100h
  6.  
  7. .data
  8.  
  9. <gleu>
  10. SWITCHER:
  11. call program 1
  12. let it run for x seconds
  13. push registers onto a stack
  14. clear registers
  15. run program 2
  16. push registers onto a stack
  17. clear registers
  18. run program 3
  19. do it all again
  20. <program 1>
  21. print out zomg multi
  22. <program 2>
  23. print out threading programs
  24. <program 2>
  25. in DOS!!!!!!!111
  26.  
  27. <end>
  28. end Switcher
  29.  
  30. <apparently, i can use PUSHAD and POPAD as well>
  31. <ZOMG YEY, found something, it is in gnu syntax T_T>
  32. swap32: #(old,new)
  33. mov 4 (%esp),%eax
  34. mov 8 (%esp),%ecx
  35. #save registers
  36. push %ebp
  37. push %ebx
  38. push %esi
  39. push %edi
  40. #save the old stack
  41. mov %esp,(%eax)
  42. #load the new stack
  43. mov (%ecx),%esp
  44. #restore registers
  45. pop %edi
  46. pop %esi
  47. pop %ebx
  48. pop %ebp
  49. ret
Advertisement
Add Comment
Please, Sign In to add comment