partially implement flags, opcodes, memory and offset, still more to do