Exemple #1
0
Fichier : cmp.py Projet : en0/emu
 def execute(self, eu: IExecutionUnit, *args) -> bool:
     a, b = args
     eu.clear_flag(FLG_CORE_EQ | FLG_CORE_LT | FLG_CORE_GT)
     if a < b:
         eu.set_flag(FLG_CORE_LT)
     if a > b:
         eu.set_flag(FLG_CORE_GT)
     if a == b:
         eu.set_flag(FLG_CORE_EQ)
     return True
Exemple #2
0
Fichier : hlt.py Projet : en0/emu
 def execute(self, eu: IExecutionUnit, *args) -> bool:
     eu.set_flag(FLG_CORE_HLT)
     return False