How can I substract 64 bit numbers using 386 assembler?
Share
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.
The idea is to use the
SBB(sub with borrow) instruction. For instance, if I have two numbers:edx:eaxecx:ebxthen this will put the difference in
edx:eax:The idea is that you can subtract each part separately, but you need to borrow from the MSBs to the LSBs.
SBBdoes just that:SBB dest, srcmeans:Which is convenient because:
SUB dest, srcmeans: