Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Are comparison flags cleared after a jump in assembly?

A basic question but I have trouble finding an answer. In assembly, disregarding which one, are the flags used to perform JE, JNE, JL, JG, JLE, JGE usually all cleared after the jump is done ?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Conditional jump instructions do not set flags. So you can for example jump multiple times on the same comparison:

cmp eax, ecx
jl foo         ; if eax < ecx jump to foo
jg bar         ; if eax > ecx jump to bar
jmp baz        ; otherwise jump to baz
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading