import struct mem = bytearray(open('bytecode.bin', 'rb').read()) reg = [0]*8 stack = [] pc = 0
Dump it:
while (1) opcode = memory[pc++]; switch(opcode) case 0x01: // MOV reg, imm case 0x02: // ADD case 0x03: // XOR ...
Run the binary:
import struct mem = bytearray(open('bytecode.bin', 'rb').read()) reg = [0]*8 stack = [] pc = 0
Dump it:
while (1) opcode = memory[pc++]; switch(opcode) case 0x01: // MOV reg, imm case 0x02: // ADD case 0x03: // XOR ...
Run the binary:
import struct mem = bytearray(open('bytecode.bin', 'rb').read()) reg = [0]*8 stack = [] pc = 0
Dump it:
while (1) opcode = memory[pc++]; switch(opcode) case 0x01: // MOV reg, imm case 0x02: // ADD case 0x03: // XOR ... f1vm 32 bit
Run the binary: