flat assembler
Message board for the users of flat assembler.
  
       
      Index
      > Main > Subtracting two 64bit values? | 
  
| Author | 
  | 
              
| 
                  
                   Madis731 05 Feb 2006, 22:42 
                  You just look at them as unsigned numbers. This is the right way to do 64-bit arithmetic:
 
                  
                Code: add eax,ebx adc edx,ecx ;edx:eax holds the result sub eax,ebx sbb edx,ecx ;edx:eax holds the result ;if carry occurs the eax would wrap around to 0FFFFFFFFh which is 4294967295 ;in unsigned world but if you want you can consider it -1 too multiplication is a bit harder and division a lot harder  | 
              |||
                  
  | 
              
| 
                  
                   Karl20001 06 Feb 2006, 21:07 
                  Hi, thx for your answer   
                  
                 | 
              |||
                  
  | 
              
< Last Thread | Next Thread >  | 
    
Forum Rules: 
  | 
    
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.