Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I subtract 64-bit unsigned integers using 32 bit instructions only?

0
10 Posted

How can I subtract 64-bit unsigned integers using 32 bit instructions only?

0
10

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123