How can I subtract 64-bit unsigned integers using 32 bit instructions only?
Here is a post made by Edward E. Jaffe on comp.lang.asm370 in January 1998: To subtract two TOD clock values (64-bit unsigned integers), I generally use something like (for A-B): LM R0,R1,A Load A SL R1,B+4 Subtract low order part of B BC 11,*+6 Branch if no borrow BCTR R0,0 Perform borrow SL R0,B Complete the subtraction . . A DS 2F B DS 2F John Erhman of IBM sent me some sample programs which do 128-bit Math. These are provided without warranty – “any bugs/disasters are the responsibility of the user.