Isaimini.6 New! π
binary = "./isaimini.6" elf = ELF(binary)
regs[0] -> 0x00602000 regs[1] -> 0x00602008 ... regs[15] -> 0x00602078 regs[16] -> 0x00602080 <-- this is exactly the address of `callback` Therefore, a overwrites callback with the address of win . isaimini.6
if (callback != NULL) ((void (*)(void))callback)(); callback is a global 8βbyte variable at 0x00603010 , initialised to 0 . The only way to set it is through the ST instruction (store to memory). binary = "
parse_input tokenises the input and stores each instruction as a struct in a global array insts[128] . execute iterates over insts and dispatches to the appropriate handler based on the first byte (the opcode). The interpreter keeps a register file : 0x00602000 regs[1] ->