anchor.diff:    st Z, R25
   end;
   
  -function fpc_div_mod_qword(Dividend, Divisor: qword; out Remainder: qword): qword; assembler; {nostackframe;}
  +function div_mod_qword(Dividend, Divisor: qword; out Remainder: qword): qword; assembler; {nostackframe;}
   label
     start, div1, div2, div3, finish;
   asm
  
positive.code:   st  Z, R24
  end;
  
  procedure fpc_div_mod_word(Dividend, Divisor: word; var Result, Remainder: word); assembler; nostackframe;
  label
    start, div1, div2, div3, finish;
  asm
  
negative.code: unit integermath;
  
  interface
  
  // Based on restoring division algorithm
  // Algorithm source document: Lecture notes by S. Galal and D. Pham, Division algorithms and hardware implementations.
  // Link to documentation http://www.seas.ucla.edu/~ingrid/ee213a/lectures/division_presentV2.pdf
  
  // Note these functions do not generate runtime errors
  // Note that the algorithm automatically yields the following results for special cases:
  // x div 0 = MAX(type)
  // 0 div 0 = MAX(type)
  