более лаконично:
if(variable1 < 10) {
SomeFunction();
} else if(variable1 == 345) {
SomeOtherFunction()
}
Объяснение:
cmp [Variable1], 10
jae AlternateBlock ; if variable1 is >= 10 then go to alternate block
call SomeFunction ; else fall through and call SomeFunction(). ie. when variable1 < 10
jmp AfterIfBlock ; prevent falling through to next conditional
cmp [Variable1], 345
jne AfterIfBlock ; if variable1 is not equal to 345 then jump to afterifblock
call SomeOtherFunction ; else fall through to call SomeOtherFunction
Если вам потребуется некоторое время, чтобы понять это, вы должны увидеть, что он семантически эквивалентен C-коду. Возможно, это помогает.
cmp [Variable1], 10
jb @f
call SomeFunction
jmp end
@@:
cmp [Variable1], 345
jnz end
call SomeOtherFunction
end:
Я думаю, что у вас есть вторая ошибка. –
@Mike Да, я только что заметил, что при проверке снова. Благодарю. –