How can I substract 64 bit numbers using 3开发者_如何学编程86 assembler?
The idea is to use the SBB (sub with borrow) instruction.  For instance, if I have two numbers:
- edx:eax
- ecx:ebx
then this will put the difference in edx:eax:
sub eax, ebx
sbb edx, ecx
The idea is that you can subtract each part separately, but you need to borrow from the MSBs to the LSBs.  SBB does just that:
SBB dest, src means:
dest <-- dest - src - EFLAGS.CF
Which is convenient because:
SUB dest, src means:
dest <-- dest - src
EFLAGS.CF <-- borrow from subtraction
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论