Guest User

Untitled

a guest
Oct 15th, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. vm:
  2. pop ebx ;pop bytecode-programm-adress
  3. .loop:
  4. movzx al,[ebx] ;fetch instruction
  5. inc ebx ;increase instruction pointer
  6.  
  7. shl eax,2 ;jmp to instruction table
  8. jmp [instr_tab+eax]
  9.  
  10. instr_tab:
  11. jmp instr_or ;jmp to instruction or
  12. jmp instr_not ;jmp to instruction not
  13. jmp instr_mova
  14. jmp instr_movb
  15. jmp instr_movc
  16. jmp instr_jz
  17. ... ...
  18. jmp ...
  19.  
  20. instr_or:
  21. or ecx,edx ;standard-operants
  22. jmp .loop
  23.  
  24. instr_not:
  25. not ecx ;standard-operant
  26. jmp .loop
  27.  
  28. instr_mova:
  29. mov eax,[ebx]
  30. add ebx,4
  31. mov ecx,[eax]
  32. jmp .loop
  33.  
  34. instr_movb:
  35. mov eax,[ebx]
  36. add ebx,4
  37. mov edx,[eax]
  38. jmp .loop
  39.  
  40. instr_movc:
  41. mov eax,[ebx]
  42. add ebx,4
  43. mov [eax],ecx
  44. jmp .loop
  45.  
  46. instr_jz:
  47. or eax,eax
  48. jnz .loop
  49. mov ebx,[ebx]
  50. jmp .loop
Advertisement
Add Comment
Please, Sign In to add comment