Let’s say you want to check if EAX
is equal to 5
, and perform different actions based on the result of that comparison. An if-statement, in other words.
; ... some code ... cmp eax, 5 je .if_true ; Code to run if comparison is false goes here. jmp short .end_if .if_true: ; Code to run if comparison is true goes here. .end_if: ; ... some code ...