Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vm:
- pop ebx ;pop bytecode-programm-adress
- .loop:
- movzx al,[ebx] ;fetch instruction
- inc ebx ;increase instruction pointer
- shl eax,2 ;jmp to instruction table
- jmp [instr_tab+eax]
- instr_tab:
- jmp instr_or ;jmp to instruction or
- jmp instr_not ;jmp to instruction not
- jmp instr_mova
- jmp instr_movb
- jmp instr_movc
- jmp instr_jz
- ... ...
- jmp ...
- instr_or:
- or ecx,edx ;standard-operants
- jmp .loop
- instr_not:
- not ecx ;standard-operant
- jmp .loop
- instr_mova:
- mov eax,[ebx]
- add ebx,4
- mov ecx,[eax]
- jmp .loop
- instr_movb:
- mov eax,[ebx]
- add ebx,4
- mov edx,[eax]
- jmp .loop
- instr_movc:
- mov eax,[ebx]
- add ebx,4
- mov [eax],ecx
- jmp .loop
- instr_jz:
- or eax,eax
- jnz .loop
- mov ebx,[ebx]
- jmp .loop
Advertisement
Add Comment
Please, Sign In to add comment