CPU/ASM/Jump.py

11 lines
173 B
Python
Raw Normal View History

2024-04-29 16:00:03 +08:00
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])