Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <header>
- .model tiny
- .code
- ORG 100h
- .data
- <gleu>
- SWITCHER:
- call program 1
- let it run for x seconds
- push registers onto a stack
- clear registers
- run program 2
- push registers onto a stack
- clear registers
- run program 3
- do it all again
- <program 1>
- print out zomg multi
- <program 2>
- print out threading programs
- <program 2>
- in DOS!!!!!!!111
- <end>
- end Switcher
- <apparently, i can use PUSHAD and POPAD as well>
- <ZOMG YEY, found something, it is in gnu syntax T_T>
- swap32: #(old,new)
- mov 4 (%esp),%eax
- mov 8 (%esp),%ecx
- #save registers
- push %ebp
- push %ebx
- push %esi
- push %edi
- #save the old stack
- mov %esp,(%eax)
- #load the new stack
- mov (%ecx),%esp
- #restore registers
- pop %edi
- pop %esi
- pop %ebx
- pop %ebp
- ret
Advertisement
Add Comment
Please, Sign In to add comment