12 lines
286 B
Python
12 lines
286 B
Python
|
CMDs = ["eq"] # , 'en', 'gt', 'lt', 'ge', 'le']
|
||
|
|
||
|
|
||
|
def eq(self, operand):
|
||
|
# 是否等于
|
||
|
a = self.registers[int(operand[0])]
|
||
|
b = self.registers[int(operand[1])]
|
||
|
if a == b:
|
||
|
self.registers[int(operand[2])] = 1
|
||
|
else:
|
||
|
self.registers[int(operand[2])] = 0
|