CPU/ASM/Jump.py
2024-04-29 16:01:52 +08:00

11 lines
173 B
Python

CMDs = ["jmp", "jmp_if"]
def jmp(self, operand):
self.pc = int(operand[0])
def jmp_if(self, operand):
if int(operand[1]) == 1:
self.pc = int(operand[0])