I have this very simple assembly code:
start:
add ax, 100
; if ax overflow add to bx 1
jmp start
but i don’t know how to detect ax register overflow, can anyone help me?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
ADDinstruction sets appropriateFLAGSreflecting the overflow condition. There are two kinds of overflow: signed and unsigned. You have to decide what’s appropriate and usejc/jncfor unsigned andjo/jnofor signed.